Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

Problem getting string from memory address

$
0
0
I am using Event() to capture a Windows API message sent to my WinDev (20) application.

The event capture works well, I get the MessageID and the HWnd id but I can't retrieve the message string.

In my test I am simply sending "Hello" as UniCode terminated with character 0.

PROCEDURE EventDataCapture(nMessageID is int, nHWnd is system int , nMessagePointer is system int)

sMessage is string on 6

sMessage = StringRetrieve(nMessagePointer,srUNICODEAddress)   // Crashes WinDev - Unexpected internal error
sMessage = StringRetrieve(&nMessagePointer,srUNICODEAddress)   // Returns "??????"

Transfer(&sMessage,nMessagePointer,5)			// Says Bad Source It does not match a valid memory address in read mode.
Transfer(&sMessage,&nMessagePointer,5)			// Produces "Á??‡"

I know that nMessagePointer is the same value as when it left the sending application, so it seems to be an issue with WinDev accessing the memory address.

Any ideas?


Gary

Viewing all articles
Browse latest Browse all 1914

Trending Articles



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