Digisoul Posted August 8, 2011 Posted August 8, 2011 Hello there;i want to know that how can i convert this function in AutoIt ?<code> DWORD WINAPI PowerSetActiveScheme( __in_opt HKEY UserRootPowerKey, __in const GUID *SchemeGuid);</code>this is my rough attempt, i want to know about __in const GUID *SchemeGuidFunc PowerSetActiveScheme($sGUID) ConsoleWrite("> sel: "&$sGUID&@CRLF) Local $tGUID = DllStructCreate($tagGUID) Local $pGUID = DllStructGetPtr($tGUID) DllCall("ole32.dll", "long", "CLSIDFromString", "wstr", '{' & $sGUID & '}', "ptr", $pGUID) If @error Then Return SetError(@error, @extended, 0) Local $res = DllCall('PowrProf.dll', "int", 'PowerSetActiveScheme', 'ptr', 0, 'ptr', $pGUID) ConsoleWrite($res[0] & @CRLF) EndFunc ;==>PowerSetActiveSchemethanks in advance 73 108 111 118 101 65 117 116 111 105 116
Digisoul Posted August 8, 2011 Author Posted August 8, 2011 please don't mind i figure it out! 73 108 111 118 101 65 117 116 111 105 116
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now