Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Is there any way to convert System.Object to IntPtr or char* in cpp code.

Philippe Mori 10-Sep-13 16:35pm    
What are you trying to do and why do you need convertion?

Before I made any comment, I would rather like to ask you to provide a bit description about - "What you are trying to achieve?"

Because, if you want to assign value into any variable from a different type, then sometime with out type casting or converting, a simple memory copy can do the same.
Share this answer
I solved this by using GetIUknownForObject[^] and then GetObjectForIUknown[^].
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900