Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IMPLEMENTS Statement
Message
From
25/02/2004 17:22:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00880818
Message ID:
00880924
Views:
20
>I would like to change the IMPLEMENTS statemany so that it gets
>it's DLL path from a function:
>
>I want to change:
>IMPLEMENTS _SomeEvents IN "c:\some.dll"
>
>
>to
>
>IMPLEMENTS _SomeEvents IN GetDLLFilePath()
>
>FUNCTION GetDLLFilePath()
>
>cDrive = GetDriveLetter()
>cRetVal = cDrive + "\some.dll"
>
>RETURN cRetVal

I think you can't call a function to return an element of a class definition which needs to be known at compile time.

What I think you can do is to have your dll name in a .h file...:
* dllloc.h
#define C_DLLDIR  "C:\mydlls\"
#define C_SOMEDLLFILENAME C_DLLDIRS+"some.dll"

* and your class definition
#include dllloc.h
Define Class blabla
implements _someevents in C_SOMEDLLFILENAME
I know this is not the best solution there is. You may try to omit the path and make sure the dll is in a system directory (such as the windows, or windows\system32).

Don't trust me on this one, I haven't tried it out. Just thinking aloud and saying what I'd try next.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform