Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / July 2006

Tip: Looking for answers? Try searching our database.

Hex value for GENERIC_READ or GENERIC_WRITE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mario - 31 Jul 2006 18:41 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
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



©2008 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.