Jump to content

Recommended Posts

Posted (edited)

Currently the DLL offers: GetDCName, GetAnyDCName, NetMessageSend, InitiateShutdown, AbortShutdown, PowerStatus, SystemSleep, CountMonitorsOnDesktop, VDesktopX, VDesktopY, VDesktopGetTopLeftX, VDesktopGetTopLeftY

It can retrieve the name of the primary domain controller, a random backup domain controller, send a message using the messenger service, initiate shutdown of a remote system, abort this shutdown, retrieve information about the battery in a laptop/tablet and suspend or hibernate the system with more options than internal Shutdown offers. Now the DLL also offfers some options for retrieving some informations about multiple monitors but this is still missing a lack of information to really make any use of it.

Disclaimer: This is basically the first thing I've written in C so be prepared for problems. And of course no guarantee for anything.

Source is included, feel free to do with it whatever you want. Only thing I want: If you include these functions into your DLLs for AutoIt, the source has to be available to those persons that get your dll.

If you wonder about the name: It's because of the filesize of my first version. I had no idea how three simple functions can blow up to 900k, but thanks to Jon it's a lot smaller now.

EDIT: Attachment deleted as it's far more efficient to use DllCall on the original DLLs now and this "proxy"-DLL is not needed anymore.

Edited by sugi
  • Administrators
Posted

I've written a DLL for my needs to find the PDC and other DCs and send messages in a more reliable way than RunWait("net send ...").

Currently the DLL offers three funtions: GetDCName, GetAnyDCName, NetMessageSend.

Disclaimer: This is basically the first thing I've written in C so be prepared for problems. And of course no guarantee for anything.

Source is included, feel free to do with it whatever you want. And if you wonder about the name: It's because of the filesize. I have no idea how three simple functions can blow up to 900k.

Project Options / Compiler / Linker / Generate debug info = NO

:idiot:

Posted

Added two functions to shutdown a remote system and abort a running shutdown.

BTW: I think that the dll will only work on NT4+ since Win9x is lacking most of the nice features internally, but feel free to try it.

  • 3 weeks later...
Posted

Added functions to retrieve informations about the battery status and put the system into standby or hibernate mode.

Posted

Project Options / Compiler / Linker / Generate debug info = NO

<{POST_SNAPBACK}>

You can also try add to Project Options / Parameters / Linker the tag -s.

(Read here.)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...