Re: WM6.1-Storage manager function OpenStore fails but FindFirstStore

Error 4319 is "The device is not ready for use.". Can you access files on the store you're trying to open just before calling "OpenStore"? Or are you executing the program calling OpenStore very early in the boot process, like for instance from the HKLM\Init key? If you, you need to wait for the store to mount before you can open it.

Good luck,

Michel Verhagen, eMVP
Check out my blog:

Microsoft Embedded Partner
Consultancy, training and development services.

curious1 wrote:

I am seeing a wierd problem with OpenStore() function.

If I use OpenStore(_T("DSK1:") it returns error 4319 everytime.

But If I use FindFirstStore --> FindNextStore ---> OpenStore(si.DeviceName), it works perfectly.
si.cbSize = sizeof(STOREINFO);
hStore = FindFirstStore(&si);
FindNextStore(hStore , &si);
hStore = OpenStore(si.szDeviceName);

Do I need to initialize any structure etc ? What am I doing incorrect ? Please help me figure out