Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IMPLEMENTS Statement
Message
De
25/02/2004 17:22:27
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00880818
Message ID:
00880924
Vues:
22
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform