Hallo.
I have this DllCall:
DllCall( "CoInitialize", UInt, 0 )
it seem to work, but if I put
iTest := DllCall( "CoInitialize", UInt, 0 )
it no return any value, the iTest var is == "" (no any value).
Can anyone tell me why?
The Microsoft site tell it must return a^numeric value.
DllCall no return any value
Re: DllCall no return any value
u dont need to call this function per se because autohotkey has already called it internally once as part of OleInitialize
anyway, u can read the DllCall docs to figure out why the call is failing. check ErrorLevel, then reread in the docs what implications passing just a plain function name to call has
anyway, u can read the DllCall docs to figure out why the call is failing. check ErrorLevel, then reread in the docs what implications passing just a plain function name to call has
Re: DllCall no return any value
It is very interesting.
After that function I need to call
DllCall( "SetWinEventHook", UInt, iEvent, UInt, iEvent, UInt, 0, UInt, RegisterCallback( sFunctionName ), UInt, iPID, UInt, 0, UInt, iFlags )
is it no necessary to call
DllCall( "CoInitialize", UInt, 0 )
before that?
I controlled the ErrorLevel value: it is
-4 The specified function could not be found inside the DLL:
DllCall( "CoInitialize", UInt, 0 )
I found the right dll library, and now the CoInitialize call works.
The CoInitialize is on the ole32.dll library, SetWinEventHook is on the user32.dll library.
CoInitialize is on a different libray than SetWinEventHook: is it right?
The returned value is 1 that means "The COM library is already initialized on this thread": than it seem the call is no necessary: is it right?
After that function I need to call
DllCall( "SetWinEventHook", UInt, iEvent, UInt, iEvent, UInt, 0, UInt, RegisterCallback( sFunctionName ), UInt, iPID, UInt, 0, UInt, iFlags )
is it no necessary to call
DllCall( "CoInitialize", UInt, 0 )
before that?
I controlled the ErrorLevel value: it is
-4 The specified function could not be found inside the DLL:
DllCall( "CoInitialize", UInt, 0 )
I found the right dll library, and now the CoInitialize call works.
The CoInitialize is on the ole32.dll library, SetWinEventHook is on the user32.dll library.
CoInitialize is on a different libray than SetWinEventHook: is it right?
The returned value is 1 that means "The COM library is already initialized on this thread": than it seem the call is no necessary: is it right?
Who is online
Users browsing this forum: No registered users and 188 guests