Hi,
To access a peripheral I need to provide AccessCode and ShareMode. The
values for AccessMode, per MSDN docs, are 0, GENERIC_READ, and
GENERIC_WRITE. For ShareMode, they are FILE_SHARE_READ and
FILE_SHARE_WRITE. If I want to read and write I would need to OR the
values. However, VS2005 does not recognize them as defined values. I
was thinking if I can find the Hex values for them then I can just pass
the hex values in the function call. If someone could tell me what
these values are or where can I find them is appreciated. Thanks.
Cheers,
Mario
Paul G. Tobey [eMVP] - 31 Jul 2006 18:57 GMT
You'd find them in a C/C++ SDK for the target device or at least for a
device like it. Since you're using VS2005, the header files for the target
device and C/C++ should be there (<x>:\program files\Microsoft Visual Studio
8\SmartDevices\SDK. Search for files like *.h containing those strings and,
no, don't just use hex values. That makes your code very annoying to read.
Paul T.
> Hi,
>
[quoted text clipped - 10 lines]
>
> Mario
Mario - 31 Jul 2006 21:11 GMT
Thanks Paul. I did find the hex values. However, I found them under
PocketPC2003 and SmartPhone2003. Does that mean that I am missing the
SDK for WinCE? My project is on WinCE. Thanks.
Cheers,
Mario
> You'd find them in a C/C++ SDK for the target device or at least for a
> device like it. Since you're using VS2005, the header files for the target
[quoted text clipped - 18 lines]
> >
> > Mario
Paul G. Tobey [eMVP] - 31 Jul 2006 21:48 GMT
No, that's fine. The values don't change from one version to another. I'm
sure that you won't find the C/C++ SDK for your Windows CE device in that
folder. If you figure out where you installed it, probably \program
files\windows ce tools\wce500\<platform name>, you'll find the same values
there.
Paul T.
> Thanks Paul. I did find the hex values. However, I found them under
> PocketPC2003 and SmartPhone2003. Does that mean that I am missing the
[quoted text clipped - 30 lines]
>> >
>> > Mario
Mario - 01 Aug 2006 00:02 GMT
Thanks. This is really helpful.
Cheers,
Mario
> No, that's fine. The values don't change from one version to another. I'm
> sure that you won't find the C/C++ SDK for your Windows CE device in that
[quoted text clipped - 38 lines]
> >> >
> >> > Mario