Digisoul 1 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 Share this post Link to post Share on other sites
Digisoul 1 Posted August 8, 2011 please don't mind i figure it out! 73 108 111 118 101 65 117 116 111 105 116 Share this post Link to post Share on other sites