I recently upgraded an application that runs a local machine that polls time clocks throughout our buildings. It saves the information to the server, but if the server goes down, the information is saved to local machine until it gets appended back to the server when it comes back up. The problem is that I wrote two api calls in the program: getlogicaldrivestrings in win32api, and wnetaddconnection in win32api. The first checks for the mapped drive letter and if it not there it will call the second and try to re-map the drive. The logins are "timepc" without any password.
The environment is win98 on the local machines and novell servers. My code works fine on my machine, but it just won't re-map the drive on the dedicated machines.
The code I'm using is:
strServer = "\\prison\sys\infoserv"
strNetworkPath = "p:\fpw004\empdata\"
intConnected = connectdrive(strServer,"", ;
substr(strNetworkPath,1,at(":",strNetworkPath)))
if intConnected = 0
if directory(strNetworkPath)
lglNetwork = .T.
else
lglNetwork = .F.
endif
else
lglNetwork = .F.
endif
Please help. I can't for the life of me figure out why it it wll work on one machine but not the other. I even checked to make sure all the dll files that are used for the api call are in "c:\windows\system\" directory and they are.
Dave Long
The environment is win98 on the local machines and novell servers. My code works fine on my machine, but it just won't re-map the drive on the dedicated machines.
The code I'm using is:
strServer = "\\prison\sys\infoserv"
strNetworkPath = "p:\fpw004\empdata\"
intConnected = connectdrive(strServer,"", ;
substr(strNetworkPath,1,at(":",strNetworkPath)))
if intConnected = 0
if directory(strNetworkPath)
lglNetwork = .T.
else
lglNetwork = .F.
endif
else
lglNetwork = .F.
endif
Please help. I can't for the life of me figure out why it it wll work on one machine but not the other. I even checked to make sure all the dll files that are used for the api call are in "c:\windows\system\" directory and they are.
Dave Long