Gordon Hogenson: Documenting Development Technologies
- Posted: May 17, 2007 at 8:19 AM
- 10,433 Views
- 6 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
I think it's good to harc back to the unmanged world once in a while. I havent lived in the land of native since around 2001 but, recently I did a project in C++ and ran into an annoying problem in creating a BSTR from a string that was already in a BSTR-esque format (Apparently Apple has something similiar that they propogate to their Windows APIs). Embarassingly and much to my dismay, it took about 3 days to solve what should have/would have been nearly obvious and instant (although I wasnt able to use a debugger, it was a plugin). But the entire time it felt somewhat like I had a labotomy (or, what I imagine a labotomy must be like), dazed and confused.
-Brian A.
-Brian
Technical topics tend to be covered in workplace literature as if books need to be great tomes of wisdom. Vast swaths of knowledge and experience are treated in depth. Usually, a minimum of 900 pages is required.
So, I was trying to create a managed wrapper written in C# to implement a C++ call to a Win32 API subroutine that gives the program a special privilege. Bah humbug: HRESULT. Of course, such a function should have a managed equivalent, but not yet. Using P/INVOKE, this should be rather simple. But it isn't if you cannot immediately get your hands on the decorations that must be put in the C++ function header. It took Product Support Services several days to correctly identify the decorations. Something this basic should not be buried in musings on how Microsoft actually implemented versus how they should have implemented something. In my experience, there is no distinction between practical and vital information versus trivia in technical books. One must thoroughly plow the books to find the nuggets if they be in the book; something that is not guaranteed.
For anyone who is interested, the following is an example of the correct decoration:
I went ahead and passed on the suggestion to one of the PMs who heads up the Wiki project. If you have some additional ideas on the cool things that could be done, I'd be happy to pass those along as well...
If you do need P/Invoke, you might check out www.pinvoke.net. While it's not yet complete, it contains a wiki-like library of various P/Invoke API calls that other people have already figured out. A great timesaver!
Anand..
Remove this comment
Remove this thread
close