Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert a negative value into hexadecimal
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00742608
Message ID:
00742734
Views:
24
Pablo,

Does this work for you?

? 0xFFFFFFFF80624EC8 && hex conversion of -2141040952 by the Windows calculator

Are you sure you have that much memory?

>When I needed to convert a negative value into hexadecimal to use it in a WinAPI function I used this routine based in a clever conversion function by Ed Rauh. It works like a charm in Windows 98, but in Windows XP I only get a "Declare DLL caused an exception" error. Anybody kwnows how to make this routine works in WinXP o has an alternative method?
>
>
>Declare Integer RtlMoveMemory in Win32API String @lpDest, Long nSource, Integer nBytes
>
>nNumber = -2141040952
>cRes = Replicate(Chr(0), 4)
>If RtlMoveMemory(@cRes, nNumber, 4) > 0
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform