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: http://GuruCE.com/blog

GuruCE
Microsoft Embedded Partner
http://GuruCE.com
Consultancy, training and development services.

curious1 wrote:
Hello,

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.
==============================
STOREINFO si;
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

thanks

.