Click here to Skip to main content
15,905,563 members
Home / Discussions / C#
   

C#

 
AnswerRe: C++ Objects in C#? Pin
Heath Stewart6-Jul-04 10:03
protectorHeath Stewart6-Jul-04 10:03 
GeneralRe: C++ Objects in C#? Pin
leppie6-Jul-04 10:48
leppie6-Jul-04 10:48 
GeneralRe: C++ Objects in C#? Pin
Heath Stewart6-Jul-04 10:53
protectorHeath Stewart6-Jul-04 10:53 
GeneralRe: C++ Objects in C#? Pin
MKlucher6-Jul-04 11:22
MKlucher6-Jul-04 11:22 
GeneralRe: C++ Objects in C#? Pin
Heath Stewart6-Jul-04 12:20
protectorHeath Stewart6-Jul-04 12:20 
GeneralRe: C++ Objects in C#? Pin
MKlucher6-Jul-04 13:13
MKlucher6-Jul-04 13:13 
GeneralRe: C++ Objects in C#? Pin
Stefan Troschuetz6-Jul-04 21:16
Stefan Troschuetz6-Jul-04 21:16 
GeneralRe: C++ Objects in C#? Pin
Heath Stewart7-Jul-04 2:54
protectorHeath Stewart7-Jul-04 2:54 
"Wrapper" is such an ambiguous term, you really need to be specific. Any function or method you call uses a calling convention. When you use ThisCall when marshaling from managed to unmanaged code, the address of the object is pushed onto the execution stack before the first parameter (which becomes the second parameter, and so on).

You can wrap native APIs, too. I've written several MC++ assemblies when I've needed to wrap a whole bunch of APIs (otherwise I just P/Invoke them in C#).

All you do is write Managed C++ and call native APIs. If you want to know more about what makes the difference between managed and unmanaged C++, read Managed Extensions for C++ Programming[^] in the Visual Studio .NET documentation.

You can probably find examples here on CodeProject using the other search at the top of the page below Bob, the CodeProject alien.

 

Microsoft MVP, Visual C#
My Articles
GeneralVolume Controls and interop Pin
Oldmate6-Jul-04 4:38
Oldmate6-Jul-04 4:38 
GeneralRe: Volume Controls and interop Pin
Heath Stewart6-Jul-04 5:10
protectorHeath Stewart6-Jul-04 5:10 
GeneralRe: Volume Controls and interop Pin
Oldmate6-Jul-04 15:55
Oldmate6-Jul-04 15:55 
GeneralRe: Volume Controls and interop Pin
Heath Stewart7-Jul-04 3:04
protectorHeath Stewart7-Jul-04 3:04 
GeneralO/R mapping Pin
Serge Lobko-Lobanovsky6-Jul-04 3:11
Serge Lobko-Lobanovsky6-Jul-04 3:11 
GeneralRe: O/R mapping Pin
Steven Campbell6-Jul-04 7:48
Steven Campbell6-Jul-04 7:48 
GeneralRe: O/R mapping Pin
Serge Lobko-Lobanovsky6-Jul-04 22:34
Serge Lobko-Lobanovsky6-Jul-04 22:34 
Generalpicture manipulation Pin
sreejith ss nair6-Jul-04 1:42
sreejith ss nair6-Jul-04 1:42 
GeneralRe: picture manipulation Pin
Heath Stewart6-Jul-04 4:36
protectorHeath Stewart6-Jul-04 4:36 
GeneralRe: picture manipulation Pin
Anonymous6-Jul-04 20:13
Anonymous6-Jul-04 20:13 
GeneralRe: picture manipulation Pin
sreejith ss nair6-Jul-04 20:16
sreejith ss nair6-Jul-04 20:16 
GeneralRe: picture manipulation Pin
Heath Stewart7-Jul-04 3:37
protectorHeath Stewart7-Jul-04 3:37 
Generalbackward compatibility Pin
sreejith ss nair5-Jul-04 23:40
sreejith ss nair5-Jul-04 23:40 
GeneralRe: backward compatibility Pin
Heath Stewart6-Jul-04 4:42
protectorHeath Stewart6-Jul-04 4:42 
GeneralDebug and Trace Pin
sreejith ss nair5-Jul-04 23:33
sreejith ss nair5-Jul-04 23:33 
GeneralRe: Debug and Trace Pin
Heath Stewart6-Jul-04 4:37
protectorHeath Stewart6-Jul-04 4:37 
GeneralDebug and Trace Pin
sreejith ss nair5-Jul-04 23:32
sreejith ss nair5-Jul-04 23:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.