Click to See Complete Forum and Search --> : GetPrivateProfileString and network
jkw2068
June 14th, 2004, 09:19 AM
I am trying to query a value from an ini file placed on a server immediatly after the clients initial bootup. Problem is, it takes roughly 60 or so seconds for the query to take place. However, if I use explorer to view the network share with in this time, the share is immediatly brought up in view and is shown as available.
CopyFile shows the same affect too. Is this by design within MFC?
Any ideas?
Bond
June 14th, 2004, 01:23 PM
When is your program being executed? Login script/startup folder/registry key?
I put a small EXE in my Startup folder that queried an INI file from the network for a value using code like this:
do
{
Sleep(100);
GetPrivateProfileString("Test", "Key", "", szString, sizeof(szString), "f:\\test.ini");
iCount++;
} while (GetLastError() == ERROR_INVALID_HANDLE);
and it returned the proper value on the first try (iCount = 1).
jkw2068
June 21st, 2004, 01:31 PM
Bond,
Thanks for the reply. I did the same thing too, still the same issue though.
I do not think it is code related because mapped drives do not immediatly become available as well. However, I can still acess the network via the explorer view during this 'unavailable' time.
I have several different things to look at now. Thanks
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.