vfxyb
asked on
Use Windows DLL
Anyone can tell me how to use MS Windows DLL (for example, i want to shutdown Windows using my Delphi program).
ASKER
I already read the windows sdk but i still confused is ExitWindowsEx a function in delphi's unit or in user32.dll. If i'm not wrong it's from user32.dll. so it's not a delphi unit. How can i use it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
MS's "Win32 Programmer's Reference" help file, which comes with Delphi, explains the meaning and use of all the API calls.
ASKER
thank you for your comment, now i will try it at home. if you have a sample delphi program about using windows dll, please send it to vfxyb@yahoo.com
Thanks
Yopie
Thanks
Yopie
Delphi made a great job, you can use most of functions of DLL (API) without declare them, they Encapsulate most of them in delphi units, like windows, messages, and more, but u still could to declare them and use any api function
if you want to shutdown the computer u can simply call the ExitWindowsEx, it found in the windows unit, if you press ctrl and move teh mouse above the ExitWindowsEx, when u see it in blue in underline click the on it by the mouse and it will take u to the windows unit for the declartion
ExitWindowsEx( EWX_FORCE or EWX_SHUTDOWN, 0 );
if you want to see the API reference from delphi help menu, choose windows SDK
Mohammed