I have developed a windows application and I am using my own invented client/server achitecture. The sever version of my application creates initialization values and all neccessary files and folders at first lunch. Subsequently, it reads the initializationnvalus and reads and writes to files as neccessary as it carries out its function. One Prime File it creates at first lunch is an empty hidden file whose presence merely indicate that the initialization values of the application has been got and saved in the registry.
The client version of the application on the other hand, during it first lunch request for the neccessary informationn about the server computer. The server computer is the computer on which the server version is installed. It request for the sever computer's name, the logon username and password to the server computer and the share name of the folder that holds the server versions database on the server computer. Then with these information the client version Creates a local network drive to the remote database using WNetAddconnection2, and then it verifies to see if the initialization values of the server version has been gotten by using CreateFile to open the Prime File. A successful open of the prime file indicates that initialization values have already been gotten. It then connects to the remote registry using RegconnectRegistry to copy the initialization values.
While the server version also carries out the said initialization values existence verification and access to registry locally successfully, the client version was unable to carry out the initialization values existence verification successfully. Debug efforts showed that after successfully creating a network drive to the shared database, CreateFile returns INVALID_HANDLE_VALUE for an attempt to open the Prime File using the same conditions and parameters hat the server versions used successfully to open the same file. a quick check at MY COMPUTER of my Windows XP operating System showed the existence of a the expected network drive. using the Icon of the network drive created by thee client version of the applixcation I succesfully accessed the remote database and successdfully openfolders and files, yet the client version of my application which created the netwotk drive could not.
Aside from the above, I observed that RgConnectRegistry also failed to connect to the remote registry key in spite of the fact that I had granted permission to the network to access HKEY_CURRENT_USER and the registry key in question.
Please why does RgConnectRegistry fail to connect to the remote registry?
The two applications(server and client) are identical apart from the fact that one acess a local folder while the other access the same folder as a local network drive. Please why cant CreateFile open the said network local drive. I really and urgently need to resovlve this problem. The project is time sensitive.