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:
00102087
Views:
26
Steve,

If you have Visual Studio there is a sample app on my website in spyin.zip to show how to create and use a VC++ DLL from VFP. It's much, much easier that the gyrations you heve to use for the older style of FLLs.

>Well, it gets better. Not only do the several DLL functions require a pointer to the address space, they also want the size. I also believe several K of memory needs to be allocated because many of the functions cache info in this buffer as you call certain functions. This info can build up (to what extent, I don't know, I'm still trying to get past the initialization!).
>
>I was thinking that maybe I could use the LCK and create an FLL as a makeshift "wrapper". I should be able to call a function in an FLL to allocate the memory, and have it return the pointer to the memory and the size of memory allocated. I should then be able to use these numbers in my app to call the functions in the custom DLL. I could use that same DLL to deallocate the memory (if for some reason it can't be deallocated from my app with globalunlock() and globalfree()). How does that sound? If VFP had a pointer type, I wouldn't have to go through any of this trouble (GlobalLock() requires a pointer type arg).
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