views:

241

answers:

2

Hi- I'm still fairly new to PInvoke calls, so I'm hoping that someone out there can help me clear this up:

I'm trying to PInvoke a call to CeGetVolumeInfo()- which is kept in CoreDll.dll- from a C# project. Here is the definition for this function from MSDN:

 WINBASEAPI BOOL CeGetVolumeInfo(  
 LPCWSTR pszRootPath,  
 CE_VOLUME_INFO_LEVEL InfoLevel,  
 LPCE_VOLUME_INFO lpVolumeInfo );

My problem is with the CE_VOLUME_INFO_LEVEL parameter. I'm assuming it's an enum of some kind, but I can't figure out what its actual value is (MSDN provides NO value info for it), and googling it comes up with almost nothing.

Any suggestions on how to get/use the unknown value of an enum defined in a PInvoke reachable dll?

Thanks!

A: 

Look at the following link link text

"InfoLevel [in] Type of information requested. Currently, this value must be set to CeVolumeInfoLevelStandard."

From the header storemgr.h

typedef enum _CE_VOLUME_INFO_LEVEL { CeVolumeInfoLevelStandard, } CE_VOLUME_INFO_LEVEL;

Just a Bill
Actually I didn't answer the question. In C++ the default value for the first item in an enumeration is 0. You want to pass 0 for the value of CeVolumeInfoLevelStandard in your PINVOKE call.
Just a Bill
Good enough for me- thanks!
A: 

I knew it had to be something simple. I just completely glazed over that whole "header file" part... Downloaded the Windows CE 5.0 sdk and now I'm straight.

Thanks again!