Some Nerdy Stuff

March 19, 2009

CLR Enabled

Filed under: Uncategorized — aaronls @ 2:16 am

After porting my current hobby project over to VS 2008, I was having a problem with the OpenProcess function failing with “Access is denied”.   As it turns out, the preprocessor defined symbol PROCESS_ALL_ACCESS changed its definition at some point.  Previously in VS 6.0, it was defined as:


In VS 2008  it is defined as:


I’m not sure the significance of the extra F, but I replaced PROCESS_ALL_ACCESS with (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFF) to sidestep the extra hex digit, and the OpenProcess function call succeeded.

Then I enabled CLR support in the project settings and everything continued to work.  Wow, I can now start playing with CLR stuff in C++.  This is new ground for me.  Despite my experience with .NET in C#, and my undergrad C++ experience, I have this feeling it is going to be rough.  I can’t imagine all the wacky things I’m going to have to do to get C++ to play nicely with the managed memory system of the CLR.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: