|
Hello and good day
Windows XP Professional allows for "locking" of a computer as opposed to logging out or shutting down. Currently, the network I am on has no Event Sync for this practice whereas it does have them for Logon and Logout.
I'm trying to write a small application that will populate a column in a datagrid with the status of individuals on the network (whether they are in or out of the office). To do this, I need an Event Sync to push out to all network machines that fires when their computer is locked.
Any help would be greatly appreciated. I have also posted in this in a couple other message boards because I'm not 100% certain which board it most pertains to.
Thank you!
|
|
|
|
|
If a program that is displaying an icon in the notification area (aka tray) of the Windows taskbar crashes or is terminated, the icon still remains until you move the mouse over it. (I guess Windows doesn't remove the icon until it determines that it the program is non responding).
Does anybody know of a way to cause Windows to force a refresh of the notification area and thereby remove the orphaned icon? I need to do this programmatically (from a process that is monitoring the program which created the icon but then crashed or was terminated).
|
|
|
|
|
nrcaliendo wrote: Does anybody know of a way to cause Windows to force a refresh of the notification area and thereby remove the orphaned icon
AFAIK, there is no way to force a cleanup of the tray area. I haven't been able to find any API's in Win32 to do this.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: AFAIK, there is no way to force a cleanup of the tray area. I haven't been able to find any API's in Win32 to do this.
There is always a way! Use a hook and send a WM_MOUSEMOVE? event across the entire task bar every 5 seconds or so.
static int Sqrt(int x) { if (x<0) throw new ArgumentOutOfRangeException(); int temp, y=0, b=0x8000, bshft=15, v=x; do { if (v>=(temp=(y<<1)+b<<bshft--)) {="" y+="b;" v-="temp;" }="" while="" ((b="">>=1)>0); return y;
|
|
|
|
|
Lousy solution since it actually moves the mouse pointer away from where you put it with the mouse. You'd have to reposition the mouse to where you found it, just before you hijacked it, then put it back. Oh! You also have to hope that the user isn't actually using the mouse at the time!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: Lousy solution since it actually moves the mouse pointer away from where you put it with the mouse. You'd have to reposition the mouse to where you found it, just before you hijacked it, then put it back. Oh! You also have to hope that the user isn't actually using the mouse at the time!
Not so becuase you are not moving the mouse. You are sending the mouse move event to a window. You can also send keyboard events to "type" in a window even though that window does not have focus. The same is true for the mouse or any other events. If you had a top level window you could send a WM_MOUSEMOVE to a window that is underneith it. Hooks allow you to have alot of power.
static int Sqrt(int x) { if (x<0) throw new ArgumentOutOfRangeException(); int temp, y=0, b=0x8000, bshft=15, v=x; do { if (v>=(temp=(y<<1)+b<<bshft--)) {="" y+="b;" v-="temp;" }="" while="" ((b="">>=1)>0); return y;
|
|
|
|
|
Hi.I need any advice.We have a server with 2 hard disks each by 250 Gb.Which is the most efficent partition I have to use?I mean from your experience how many parts is better to create?
Best Regards
|
|
|
|
|
Efficiency depends on the application.
What I've done in the past is a smaller hard drive that holds only the boot and system, mirrored with an identical drive, and the remaining, larger capacity drives, reserved for applications and user data, usually RAID 5.
I don't partition the drives at all in the method you're thinking of. I consider it a waste because if the drive goes down, partitioning won't make any difference what-so-ever. In the above solution, if a drive goes down, I'll lose either the system, which is backed by a mirror drive, or the RAID 5 array keeps running without the bad drive, until it's replaced.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: I consider it a waste because if the drive goes down, partitioning won't make any difference what-so-ever.
True, but only if the *drive* fails. File systems can also become corrupt do to software failures. Each partition contains a seperate file system.
static int Sqrt(int x) { if (x<0) throw new ArgumentOutOfRangeException(); int temp, y=0, b=0x8000, bshft=15, v=x; do { if (v>=(temp=(y<<1)+b<<bshft--)) {="" y+="b;" v-="temp;" }="" while="" ((b="">>=1)>0); return y;
|
|
|
|
|
I've had drives fail FAR more than I've had a file system get corrupted unrecoverably.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Do you beat them with a sledge hammer or something?
Touch wood I've never had a hard-drive fail on me in 7 years, only one to "fail" resulted in me pulling the power connector too hard when it got jammed in, but then just whipped out the soldering iron and put it back on.
I've had corrupted file systems more than hard-drive failures, but even then not than many, maybe once or twice.
Just Google it.
Failing that try phoning
|
|
|
|
|
Man, I've had 3 fail in one week! Western Digitals and a Maxtor. No, I didn't touch them. When I was at [major automotive manufacturer], we had 8 drives fail (all Seagates), out of some 1,200+, in 4 years in the manufacturing plants.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Ouch, any idea what caused them to fail?
|
|
|
|
|
Nope. No time to really get into it - replace 'em and move on. Compaq ships everything Next Day Air, so we really didn't care, so long as we didn't run into a large string of 'em.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hello all
i need a program that changes system date and makes it persian.
not a date convertor. i need a system date convertor , if there is any?
|
|
|
|
|
Are you saying that you want Windows to process all dates on the Persian calender? System wide, not just in your app?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
To all the people that have performed clean installs of the Vista RC1 build.
Has microsoft delivered on the feature of FAST full install times taking less then 15 minutes from DVD. I found the early beta's took forever.
Heston
________________________________
Heston T. Holtmann, B.Sc.Eng.
Software Engineer
|
|
|
|
|
Heston wrote: FAST
Heston wrote: less then 15 minutes from DVD
Took Vista about 4 hours to install on a clean disk on my machine (not very powerful though). Didn't even finish, got to the point where it rebooted to finish off (add users etc) and it continually crashed & rebooted, couldn't go into safe mode because it said it hadn't finished installing.
Wiped the disk and retried, didn't work so I said f**k Vista lets put Linux back on. Got a entire system of Gentoo 2005 up and running in 4 hours including updating quite a bit of it off the net (and that included a kernal compile )
Just Google it.
Failing that try phoning
|
|
|
|
|
Heston wrote: full install times taking less then 15 minutes from DVD
On what? A CRAY?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All,
If I update the value of File key in registry of Application event log (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application) to D:\ApplicationLog\Loggggggggggggggggggggggggggggggggggggggggggggggggggggg\AppEvent.Evt which has a length of 87characters, and restart the system windows event log will still write events to its default file in %SystemRoot%\System32\config directory. However if i give the path as D:\ApplicationLog\Logggggggggggggggggggggggggggggggggggggggggggggggggggg\AppEvent.Evt whose length is 86characters and restart then events will be written to this file. It seems windows will not consider a path whose length is greater than 86 characters in registry for event logging. I have tried expandable path also, and the issue remains even though the full path after expanding can be greater than 86 characters. That is %xxxx%/etc/etc will not be taken if length greater than 86. I have searched a lot for a an explanation for this behaviour but found none. Anyone here has some idea why this is happening.
Thanks
C++beginer
|
|
|
|
|
From your testing, it indeed looks like there is a limit on the filepath size. I can't, for the life of me, find any documentation on this limit though. It doesn't look like Microsoft is even aware of it.
It looks like you're stuck dealing with the problem and keeping the filepath for you custom log shorted than 86 characters...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Yeah. We have created a custom log for one of the applications and came across this behaviour by chance. Now the customer wants any microsoft document on this but we cant find any.
C++beginer
|
|
|
|
|
Well, about the only thing you can do to get that is to open a support incident with MS, probably for some $, and see what they can give you.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I just got back from holiday, to find my Windows XP PC has somehow started getting this error (BAD_POOL_CALLER 0x000000C2).
I can only assume it did a windows update or something before I turned it off and went away.
The first parameter of the error is 0x43, which the KB says is something to do with a corrupt pool header. I get the error just after the windows loading bar, I think when it tries to load the login.
Does anybody have any ideas as to what is causing it? Im pretty sure its not a hardware problem memory wise, as I ran memtest and it passed.
|
|
|
|
|
From what I've seen Googling the message, it looks like you've either got a driver problem or a hardware problem.
You can TRY to get a crash dump and run it through WndDbg. See this[^] for a bit of an explaination.
You can also try to strip the machine down to nothing but a power supply, motherboard, RAM, and the Windows hard drive and see what happens. If it works, try adding one device back to the machine. Keep going until it fails again.
Or, you're last resort is to reinstall Windows.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|