Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Include .dll in a project
Message
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00491650
Message ID:
00495323
Views:
12
Include the .DLL in your project so it gets compiled inside the .EXE, and when your app starts up, generate a random name with Sys(3) and copy it to your temp directory and use it from there. That's what I do with FLL's (I don't use any DLLs that are not COM objects and all COM objects get registered at install time).

Something like
* cTempDir is defined earlier in the program
  Declare Sleep IN WIN32API Integer
  cFoxToolsName = cTempDir +  "FT" + Sys(3) + ".FLL"
  nNothing = Sleep(1000)
  Copy File FoxTools.FLL to ( cFoxToolsName )
  Set Library to (cFoxToolsName)  Additive
I think another advantage to doing it this way is that if your stuff is a COM object itself and might be instanced multiple times each instance can have its own copy and instances won't step on each other.
Previous
Reply
Map
View

Click here to load this message in the networking platform