Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change dll search order in Win 2003 and XP SP1
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00891847
Message ID:
00891854
Vues:
15
>I have posted this in VFP 8 category but I believe posting this thread in this category is more appropriate.
>
>Has anyone tried to use SetDllDirectory function to change dll search order? This function is referred in the following article:
>
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncode/html/secure06122003.asp
>
>I wonder whether this function can be called in a VFP 8 application.
>
>
>Thank you,
>
Peter,

After looking at the function, it should be fairly easy to implement in VFP. Unfortunately, I can't test it here since I'm using a W2K box. The caveat is that you have to be running XP SP1, which I have at home. Here's the declaration of it and GetDllDirectory.
DECLARE INTEGER SetDllDirectory IN Win32API;
  STRING @lpPathName
* lcPathName is a series of paths separated 
* by semi-colons, Like a VFP path.
llresult = (SetDllDirectory(@lcPathName) # 0)

DELCARE INTEGER GetDllDirectory IN Win32API;
  INTEGER nBufferLen, STRING @lpBuffer
lnBufferLen = 260 && MAX_PATH
lcBuffer = SPACE(lnBufferLen)
lnBufferLen = GetDllDirectory(lnBufferLen, @lcBuffer)
? LEFT(lcBuffer, lnBufferLen)
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform