We have an application running on a Citrix Metaframe 1.8 for Windows 2000 server (SP2) + HOTFIX.
Inside this application, we call a menu option that attempts to open a file and import some data.
If this data file is located on the local hard drive of the citrix server, the import routine runs fine.
If the data file is located on another Windows 2000 server within the Citrix environment
(eg. <\\SERVER2\DATA\DATAFILE.TXT>) the import runs
without error.
If the data file is located on the client's drive and the import run on the file <\\client\c$\DATA\DATAFILE.TXT>, we get an error.
The software has been written to use the Win32API to open the file.
The DLL that does the file opening performs the following functions in order:
lFileHandle = CreateFile("\\client\c$\data\datafile.txt", GENERIC_READ, 0,
SecAttributes, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)
Then, the CreateFileMapping funtion is called:
lFileMap = CreateFileMapping(lFileHandle, SecAttributes, PAGE_READONLY, 0,0, sFileMapName)
This function returns an error. NOT_ENOUGH_MEMORY.
As this is a Win32API call, I would have thought it would be fine to work across a client mapped drive as it is essentially just a network share.
If this is not the case, what are the limitations on
programmatically opening files on client mapped drives?
Any assistance would be appreciated.
Inside this application, we call a menu option that attempts to open a file and import some data.
If this data file is located on the local hard drive of the citrix server, the import routine runs fine.
If the data file is located on another Windows 2000 server within the Citrix environment
(eg. <\\SERVER2\DATA\DATAFILE.TXT>) the import runs
without error.
If the data file is located on the client's drive and the import run on the file <\\client\c$\DATA\DATAFILE.TXT>, we get an error.
The software has been written to use the Win32API to open the file.
The DLL that does the file opening performs the following functions in order:
lFileHandle = CreateFile("\\client\c$\data\datafile.txt", GENERIC_READ, 0,
SecAttributes, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)
Then, the CreateFileMapping funtion is called:
lFileMap = CreateFileMapping(lFileHandle, SecAttributes, PAGE_READONLY, 0,0, sFileMapName)
This function returns an error. NOT_ENOUGH_MEMORY.
As this is a Win32API call, I would have thought it would be fine to work across a client mapped drive as it is essentially just a network share.
If this is not the case, what are the limitations on
programmatically opening files on client mapped drives?
Any assistance would be appreciated.