Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with GetLongPathName()
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00871372
Message ID:
00871402
Views:
17
>>>It's not supported on NT. From the Platform SDK
>>>
>>>Windows NT and Windows 95: Include an additional header file called NewAPIs.h to make GetLongPathName available on these operating systems. The function is not implemented natively, but by a wrapper that utilizes other native functions on these systems. See the header file for details of the use of preprocessor directives that make the function available. If you do not have this header file, it can be obtained by downloading the most recent SDK from the SDK Update Site.
>>>
>>>Is the Windows Script Host an option for your client?
>>
>>Thank you so much for your helpful reply. Let me explain about the actual problem the customer is having.
>>
>>In my program I have a code creating a cursor. Then when program tries to select the cursor, the customer gets error message:
>>
>>
>>File 'c:\temp\Gw9eoi14.tmp' does not exist.
>>
>>
>>So I thought that they are having problem with VFP 6 app creating cursor in a TEMP folder but not finding it. That is why I sent them a little test program to determine where their PC/OS is looking for a temp file.
>>
>>They say that this code (creating and using a cursor) used to work, not consistently, but still worked. But now it stopped working with the above error message.
>>
>>Do you think that the problem is related to the fact that WinNt does not support GetLongPathName?
>>
>>Thank you.
>
>Besides what Sergey suggested, I'd suggest a couple of things.
>
>Not having worked with NT, but with experience with just about all other flavors of Windows, one of the following may work for you.
>
>1. You say you're creating the cursor. It's fully qualified path should be available from the DBF() function.
>
>2. If you need the location of the temp files folder, GETENV("Temp") should work. Then simply use ADDBS() and concatenate file file name.
>
>3. You can specify the location of the file using the TMPFILES configuration setting. Despite what the documentation says, it allows you to specify a path. This has been confirmed by MS. Note, however, that if any other setting of this type (namely, EDITWORK, PROGWORK, and SORTWORK) follow the TMPFILES statement, they will take precedence.

George,
Thank you very much for the suggestions. I will follow them.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform