Michel Claveau Posted October 3, 2006 Share Posted October 3, 2006 Hi! Is it possible to obtain a handle on a string, and/or UDF function? (I want use these handles for callback in COM server) Link to comment Share on other sites More sharing options...
piccaso Posted October 3, 2006 Share Posted October 3, 2006 no but you can create your own Null terminated strings...$sString = "Test" $vStruct = DllStructCreate("char[" & StringLen($sString) + 1 & "]") DllStructSetData($vStruct,1,$sString) $szPtr = DllStructGetPtr($vStruct) ConsoleWrite(DllStructGetData($vStruct,1)) but keep in mind that memory is freed when $vStruct is destroyed... but you can allways manualy 'malloc' and 'free' with dllcall if you need something more presistent CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Michel Claveau Posted October 4, 2006 Author Share Posted October 4, 2006 Hummm.... Thanks for your (fast) answer. But your solution is an ersatz, with some limits for use. Perhaps, in a future release of AutoIt? Perhaps a possible way in DLL-callback direction? Have a good night-or-day Link to comment Share on other sites More sharing options...
piccaso Posted October 4, 2006 Share Posted October 4, 2006 i tought com events are supported... but i hadly use com so i cant tell you for sure of course you could have more complex structures than the one mentioned above... and you can trigger events with windows messageing ( Check out GUIRegisterMsg and 'PostMessage' Api...) CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
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