Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How to read a ptr to a string (returned by WM_Settingchange

$
0
0
Hello all,

in my program I would like to respond to the WM_Settingchange, so I use

GUIRegisterMsg($WM_SETTINGCHANGE , "WM_SETTINGCHANGE")


The lParam parameter is a pointer to a string (see http://msdn.microsoft.com/en-gb/library/windows/desktop/ms725497(v=vs.85).aspx). How can I read this string from memory?

I've tried already with DLLStruct, but this doesn't seem to work well (I also don't know the length of the string). In another topic I found a reference to using __SQLite_szStringRead from SQLite.au3 but this doesn't work either. Any help is welcome.

Func WM_SETTINGCHANGE($hWnd, $iMsg, $wParam, $lParam)
#forceref $hWnd, $iMsg,$wParam
;$myString = __SQLite_szStringRead($lParam)
;$lParamString = DllStructCreate("char[128]", $lParam)
;$myString = DllStructGetData ($lParamString,1)
ConsoleWrite($myString & @cr)
EndFunc



Brgds
Dieter

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>