Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / End Users / ActiveSync / August 2006

Tip: Looking for answers? Try searching our database.

RAPI CeGetDiskFreeSpaceEx with WM2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wade - 30 Aug 2006 02:44 GMT
When calling the RAPI function

CeGetDiskFreeSpaceEx("\Program Files", ...)

in WM2005, it works fine, returning correct values.

Calling the same function when a WM2003 device or WM2003 emulator is
attached fails.  I.e the return value is 0.

Looking at the documentation...

Requirements
Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: Rapi.h

... I would expect it to work.

Does anyone know why this does not work with a WM2003 device?

Thanks
Wade
hel@40th.com - 30 Aug 2006 03:13 GMT
See, GetLastError()

Signature

40th Floor - Software  @  http://40th.com/
iPlay : the ultimate audio player for mobiles
mp3,mp4,m4a,aac,ogg,wma,flac,wav, play+record
parametric eq, xfeed, reverb; all on a mobile

Wade - 30 Aug 2006 05:13 GMT
GetLastEror returns 0

Perhaps your comment should have referred to "CeGetLastError"

CeGetLastError returns 120.

Error 120 is ERROR_CALL_NOT_IMPLEMENTED, This function is not valid on
this platform.

Which takes back to my original question.  The documentation clearly
indicates that CeGetDiskFreeSpaceEx is available on a variety of CE
versions, but on WM2003 it fails.

Anyone have any ideas why?

>See, GetLastError()
hel@40th.com - 30 Aug 2006 06:11 GMT
At least that got you going.  Here's a real old
note I found

File: ...\40ce2\arm\cesupp_old.cpp
  182: // nts: calls GetDiskFreeSpaceEx(), since
there is no CeGetDiskFreeSpaceEx() RAPI version

which is from a routine in a DLL I (have to)
(rapi) invoke.  Since that goes back more than
4 years, the docs have been wrong for a while
(or the code never caught up).

CeGetStoreInformation()

get the object store info.  That's all you
get to rapi with.
Signature

40th Floor - Software  @  http://40th.com/
iPlay : the ultimate audio player for mobiles
mp3,mp4,m4a,aac,ogg,wma,flac,wav, play+record
parametric eq, xfeed, reverb; all on a mobile

hel@40th.com - 30 Aug 2006 06:26 GMT
But if you use a DLL, you can:

c:\>ce -dir -s

Directory for ce:/*

1998-01-01  07:00:00         C <dir>     SD Card
1998-01-01  07:00:00         C <dir>     Storage Card
2005-05-09  12:00:00           <dir>     Documents and Settings
2005-05-09  12:00:02   s       <dir>     Windows
2005-05-09  12:00:02   s       <dir>     Temp
2005-05-09  12:00:08           <dir>     My Documents
2005-05-09  12:00:08           <dir>     Program Files
2006-08-29  23:06:32  hs a        118784 mxip_system.vol
2006-08-30  00:00:02   s a        135168 mxip_notify.vol
2006-08-29  23:06:32   s a         28672 mxip_lang.vol
2006-09-26  16:51:34  hs a         32768 mxip_initdb.vol
2005-05-09  12:00:16           <dir>     Application Data
2005-05-09  12:00:24           <dir>     ConnMgr
2006-08-30  00:15:54     a        204800 pim.vol
2006-08-29  01:13:22  h  a        147456 cemail.vol
2006-08-29  23:13:20  h  a           289 40_excpt.txt
2006-08-29  23:11:52  h  a           172 40_details.txt
2006-08-15  01:46:54           <dir>     music
2006-08-29  23:03:28     a           135 40_excpt_ceB5.txt
2006-08-28  14:32:32           <dir>     pl
         9 File(s)     668244 bytes
:
:  ... and so on (very fast if you set up a stream)
:
    Total Files Listed:
      1724 File(s)  1653127310 bytes
       118 Dir(s)   112582656 bytes free in object store

   Volume       MB total    Free     Used    %Used
----------------------------------------------------
Object Store       133.23   107.37    25.87  [  19 ]
SD Card            489.25    11.44   477.81  [  98 ]
Storage Card      1025.53     4.94  1020.59  [ 100 ]
----------------------------------------------------
       Total     1648.02   123.74  1524.27  [  92 ]

It's not the "Object Store" in Wm5 anymore, but
it works out the same, except for name.  I
de-tabbed the output for your viewing pleasure.

Signature

40th Floor - Software  @  http://40th.com/
iPlay : the ultimate audio player for mobiles
mp3,mp4,m4a,aac,ogg,wma,flac,wav, play+record
parametric eq, xfeed, reverb; all on a mobile

Wade - 30 Aug 2006 09:02 GMT
Thanks

CeGetStoreInformation() gets the amount of space free in the main
memory, but not in each storage card.

>At least that got you going.  Here's a real old
>note I found
[quoted text clipped - 12 lines]
>get the object store info.  That's all you
>get to rapi with.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.