Traitée WM6 FindFirstStore/FindNextStore

  • vendredi 28 décembre 2007 10:56
     
     
    Hi!

    I'm trying to use FindFirstStore and FindNextStore functions using Windows Mobile 6 SDK but I just can't get it right.
    WM6 documentation says that the functions need storemgr.h and coredll.lib. However, they are not found in coredll.lib so I get a linker error. WM5 documentation says that those functions need storeapi.lib, but WM6 SDK doesn't include it.
    What am I missing here?

    Basically what I'm trying to do, is to get the available disk space on every drive present. If there is some other way to enumerate the drives, please tell me how...

Toutes les réponses

  • vendredi 28 décembre 2007 17:10
     
     

    Instaed of coredll.lib use Storeapi.lib and i think it will work proper for you.
    Thanx
  • lundi 31 décembre 2007 06:21
     
     
    As I pointed out in my first post, there is no Storeapi.lib in the Windows Mobile 6 SDK.

    And the documentation says that coredll.lib should have these functions. However, the doc seems to match the actual product as well as usual...
  • lundi 31 décembre 2007 08:05
    Modérateur
     
     Traitée

    Hi JuhoO,

    Please look at the following issue which may help you:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1583241&SiteID=1

     

    It give an alterative method to do it.

     

    Best regards,

    Guang-Ming Bian - MSFT

  • mercredi 2 janvier 2008 11:59
     
     
    Thanks. That helped me a lot.

    However, the solution given there seems quite hackish and non-standard (using undocumented functions etc.
    But I'll do it this way unless anyone knows more standard way of enumerating the storages and getting the free disk space.
  • mercredi 27 juin 2012 04:01
     
     
    Hi!

    I'm trying to use FindFirstStore and FindNextStore functions using Windows Mobile 6 SDK but I just can't get it right.
    WM6 documentation says that the functions need storemgr.h and coredll.lib. However, they are not found in coredll.lib so I get a linker error. WM5 documentation says that those functions need storeapi.lib, but WM6 SDK doesn't include it.
    What am I missing here?

    Basically what I'm trying to do, is to get the available disk space on every drive present. If there is some other way to enumerate the drives, please tell me how...
    HI. I have the same problem. Only I am working with WIN CE6.0 Who can help me? Link to Alex Feinman blog is broken.
  • lundi 2 juillet 2012 07:20
     
      A du code

    Since you have not the import library on hand, have you considered using dyamic loading?

    //NOTE: no error checking
    #include <storemgr.h>
    //...
    typedef HANDLE (*PFNFINDFIRSTSTORE)(PSTOREINFO);
    typedef HANDLE (*PFNFINDNEXTSTORE)(HANDLE, PSTOREINFO);
    //...
    HINSTANCE hCoredll = LoadLibrary(_T("coredll"));
    PFNFINDFIRSTSTORE pfnFindFirstStore = 
    	(PFNFINDFIRSTSTORE)GetProcAddress(hCoredll, _T("FindFirstStore"));
    	
    PFNFINDNEXTSTORE pfnFindNextStore = 
    	(PFNFINDNEXTSTORE)GetProcAddress(hCoredll, _T("FindNextStore"));


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com