>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
llresult = (SetDllDirectory(@lcPathName) # 0)
DELCARE INTEGER GetDllDirectory IN Win32API;
INTEGER nBufferLen, STRING @lpBuffer
lnBufferLen = 260
lcBuffer = SPACE(lnBufferLen)
lnBufferLen = GetDllDirectory(lnBufferLen, @lcBuffer)
? LEFT(lcBuffer, lnBufferLen)
George
Ubi caritas et amor, deus ibi est