Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GlobalLock()
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00101339
Message ID:
00101341
Views:
27
Steve,

Why can't you just allocate the memory from VFP's address space and send it to the function? That's typically the way you do it:

declare integer TheFunc in TheDLL string @ buffer
lcBuffer = space( 256 )
? TheFunc( @lcBuffer )

>Is it possible to allocate global memory via the DECLARE DLL commands in VFP? I tend to believe it's not possible because the function GlobalLock() returns a pointer to the memory allocated by GlobalAlloc() and as far as I know, VFP doesn't support pointers or structurs that are commonly used in the winAPI. A proprietary DLL i'm using requires allocation of memory before calling it's functions (one of it's args is the pointer to the memory). I would like to allocate the memory from DLL calls from my program, but I think I may have to create some sort of wrapper DLL that will act as the middleman between my application and the proprietary DLL.
>
>Bottom line: Can I use GlobalLock via DECLARE? (GlobalAlloc() *seems* to work)
df (was a 10 time MVP)

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

Click here to load this message in the networking platform