I was contact by Danila Galimov a while ago because he was working with my JwaWinsta unit. Together we were able (and are still working on) uncovering more of the undocumented API’s in winsta.dll.
We found several new classes for WinStationQueryInformationW that return lots of information:
- The user's password (under special circumstances).
- The Windows Product ID (server and client's).
- Client Info such as Timezone information.
- WinStationGetAllProcesses
- WinStationGetTermSrvCountersValue ("QWinsta /Counter")
- WinStationFreeGAPMemory
- WinStationSendMessage
- WinStationCloseServer
- WinStationDisconnect
- WinStationReset
- WinStationShutdownSystem
Cool! Is the newest JwaWinsta unit available for download? Not found on http://sourceforge.net/projects/jedi-apilib/
Roy, the unit is not in the zip download but in the SVN repository. You can use either a SVN client like TortoiseSVN or just browse the repository on the web.
Please note that JwaWinsta is being worked on because there are several new api's which need to be added.
WinStationReset
WinStationShutdownSystem
So, do you know what these functions actually do?
I wonder, while doing this project of yours, have you ever stumbled upon a some api that lets you 'hard reboot' or 'cold reset' a system programatically? That is, it is as if someone hit the reset switch on the computer, but it happens entirely from software.
Rebooting cold used to be possible using a few bytes of assembler, but I think Windows will trap it.
Client Info such as Timezone information.
I have downloaded the units and have been searching through them trying to piece together how to get the client's timezone information using Delphi, and could use some help in putting it all together. An example would be great.
Bill,
I assume you can use WinstationQueryInformation function using WinstationClientClass and passing WINSTATIONCLIENT structure to it.