Unable to get next partition in flash WinCE 6.0 RRS feed

  • Question

  • Hi All,

    We are trying to fetch detail about partitions in NAND Flash, which we have created throught RedBoot . We are able to see partition using RedBoot code. But When we tried with WinCE Partition Manager API's. FindNextPartition() is getting failed.

    We are able to open FirstPartition using FindFirstPartition(). please help are we missing anything? Here is the code snippet:-

    HANDLE m_hStore = OpenStore(L"DSK1:");

    if(INVALID_HANDLE_VALUE != m_hStore)

      PARTINFO lpartinfo;
      lpartinfo.cbSize = sizeof(PARTINFO);
      HANDLE m_henum = FindFirstPartition(m_hStore,&lpartinfo);
      if(INVALID_HANDLE_VALUE != m_henum)
             // Open the enumerated partition
          m_hparition = OpenPartition (m_hStore, lpartinfo.szPartitionName);

      if (INVALID_HANDLE_VALUE != m_hparition)

        if(TRUE == MountPartition(m_hparition))
        CloseHandle (m_hparition);


       lpartinfo.cbSize = sizeof(PARTINFO); */

      } while (FindNextPartition (m_henum, &lpartinfo));

    FindClosePartition (m_henum);


    In firstPartition we are getting NandFlash current partition , and also we are able to mount/dismount it .But for other two partition it is coming out of the loop, FindNextPartition() is failing, is we need to enable it from Nand.reg ?

    We tried with GetStoreInfo() and following are the observation:-


    StoreInfo {cbSize=240 szDeviceName="DSK1:" szStoreName="NANDFLASH" ...} 
      cbSize 240 
    +  szDeviceName 0x0004f3d4 "DSK1:" 
    +  szStoreName 0x0004f3e4 "NANDFLASH" 
      dwDeviceClass 1 
      dwDeviceType 2 
    +  sdi {cbSize=0 szProfile="FlashDisk" dwDeviceClass=1 ...}
      dwDeviceFlags 5 
      snNumSectors 7680 
      dwBytesPerSector 2048 
      snFreeSectors 0 
      snBiggestPartCreatable 0 
    +  ftCreated {dwLowDateTime=0 dwHighDateTime=0} 
    +  ftLastModified {dwLowDateTime=0 dwHighDateTime=0} 
      dwAttributes 0 
      dwPartitionCount 1 
      dwMountCount 1 

    means we are only getting the information of current partition in which NK.bin is loaded. But we have created 3 partition using Redboot command and we are able to see those partition. It is giving partiton Count as 1 Please help us why we are not abe access other two partition. We want to write files on those partition.



    • Edited by Mukesh_Patel Tuesday, November 29, 2011 1:52 PM
    • Changed type Mukesh_Patel Wednesday, November 30, 2011 7:13 AM
    • Moved by Jesse Jiang Thursday, December 1, 2011 6:04 AM (From:Visual Studio Smart Device Development - Native C++ Project)
    Tuesday, November 29, 2011 1:08 PM

All replies