Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any VFP 7 like version of GETDIR() for VFP 6?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00724840
Message ID:
01186004
Views:
41
LOCAL lcPath,lcBuffer,liBuffer,liLevel
lcPath="z:\coms\XmlActiveX.msi"+CHR(0)
liBuffer=256
lcBuffer=REPLICATE(CHR(0),liBuffer)

#define UNIVERSAL_NAME_INFO_LEVEL   0x00000001
#define REMOTE_NAME_INFO_LEVEL      0x00000002

DECLARE INTEGER WNetGetUniversalName IN mpr.dll;
  STRING @ lpLocalPath, ;
  INTEGER dwInfoLevel, ;
  STRING @ lpBuffer, ;
  INTEGER  @ lpBufferSize


liLevel=UNIVERSAL_NAME_INFO_LEVEL

* This level return structure about
*!*	liLevel=REMOTE_NAME_INFO_LEVEL

*!*	*!*	typedef struct _REMOTE_NAME_INFO { 
*!*	*!*	  LPTSTR  lpUniversalName; 
*!*	*!*	  LPTSTR  lpConnectionName; 
*!*	*!*	  LPTSTR  lpRemainingPath; 
*!*	*!*	} REMOTE_NAME_INFO; 


?WNetGetUniversalName(@lcPath,liLevel,@lcBuffer,@liBuffer)
?SUBSTR(lcBuffer,5) && I don't know, why first 4 bytes are...
MartiJ

>>>Let me preface this with the following points:
>>>1. I have to use Visual FoxPro 6.0 (SP 5)
>>>2. I know GETDIR() in Visual FoxPro 7.0 has what I want
>>
>>>I would like to have a function (either User Defined Function, API call, ActiveX, wrapper, etc.) that I could use instead of the Visual FoxPro 6.0 GETDIR() function to retrieve a directory/folder path name that will allow the user to create a folder "on-the-fly" via the dialog box when necessary. I know that there is one in Windows (Copy/Move To displays this one). I just cannot seem to find the API name/call/define for it.
>>
>>You can try this:
>>--- How can I use GETDIR with a network drive? ---
>>--- Alex Feldstein ---
>>http://www.feldstein.net/netgetdir.asp
>>
>>Hope this Help.
>
>Esparta,
>
>Thanks a lot. Do you know how can I make GetDir to return UNC path instead of the actual drive name? I could not find all the flags for SHBrowseForFolder function in MSDN as Help file suggests, so I don't know if a flag exists.
>
>Thanks a lot in advance.
>
>After quick research on the topic I don't think there is a flag for that, though I didn't find SHLOBJ.h on my local drive.
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform