Click here to Skip to main content
15,908,626 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: How to use unicode string in MC++ Pin
Anthony_Yio24-Sep-03 16:53
Anthony_Yio24-Sep-03 16:53 
GeneralRe: How to use unicode string in MC++ Pin
David Gao26-Sep-03 15:00
David Gao26-Sep-03 15:00 
AnswerRe: How to use unicode string in MC++ Pin
Tim Smith29-Sep-03 12:34
Tim Smith29-Sep-03 12:34 
GeneralString conversion... Pin
raitz23-Sep-03 9:11
raitz23-Sep-03 9:11 
GeneralRe: String conversion... Pin
Anthony_Yio24-Sep-03 16:55
Anthony_Yio24-Sep-03 16:55 
GeneralRe: String conversion... Pin
raitz25-Sep-03 6:19
raitz25-Sep-03 6:19 
QuestionHow to use c dlls in managed c++ Pin
Shailaja23-Sep-03 0:55
Shailaja23-Sep-03 0:55 
AnswerRe: How to use c dlls in managed c++ Pin
Heath Stewart23-Sep-03 3:01
protectorHeath Stewart23-Sep-03 3:01 
First, understand that there are two types of managed C++ DLLs (assemblies, actually, which contain 0-n modules, a manifest of modules, resources, bindings, and other assembly info, and resources): mixed-mode and pure IL.

Mixed mode: Various understood types (like int, for example) are translated by the compiler to managed types (like System.Int32) whenver possible. Other types and functions are compiled into native code (that is, unmanaged C++) and added to the module as native blocks that are unverifiable by the CLR. DLLs are linked to the assembly using the IL instruction .module extern DLL in many cases. There is much, much more than goes on than this, and you should check out MSDN about it. This is especially good for the first step in moving legacy applications or certain components to managed applications if you have good reasons to do so (i.e., if it isn't broke - don't fix it. The .NET Show on MSDN discussed this in the Sept. 2003 interview with members of our own CP web site).

Pure IL mode: Only managed constructs are used throughout the entire project. This compiles down to IL (specifically, MSIL) like most other languages would, such as C#, VB.NET, and J#.

If you don't see __gc throughout the code, it is most likely mixed mode. The compiler, if I remember correctly, figues this out automatically based on what it can do.

As far as the preproc definitions toward the end of your question, that merely tells the compiler to use C-style decorations (rather, the lack thereof) on the function and to call it using the __stdcall calling convention.

Basically, you'd do well to read the section on MSDN about managed extensions: http://msdn.microsoft.com/library/en-us/vcmex/html/vcconMCOverview.asp[^]

It has a lot of great material that goes in depth (and presents simple concepts) about the very basic things I've touched on here.

I hope this helps.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralInterface between classes Pin
LordVador22-Sep-03 23:31
LordVador22-Sep-03 23:31 
GeneralRe: Interface between classes Pin
Heath Stewart23-Sep-03 2:44
protectorHeath Stewart23-Sep-03 2:44 
QuestionC++ Lib -> Dll (Wrapper) - How? Pin
Chua Wen Ching21-Sep-03 2:03
Chua Wen Ching21-Sep-03 2:03 
AnswerRe: C++ Lib -> Dll (Wrapper) - How? Pin
Nemanja Trifunovic22-Sep-03 10:20
Nemanja Trifunovic22-Sep-03 10:20 
GeneralRe: C++ Lib -> Dll (Wrapper) - How? Pin
Chua Wen Ching23-Sep-03 22:58
Chua Wen Ching23-Sep-03 22:58 
Generalsave a high color image as 256 color or fewer Pin
mr6020-Sep-03 8:52
mr6020-Sep-03 8:52 
GeneralRe: save a high color image as 256 color or fewer Pin
Heath Stewart23-Sep-03 3:03
protectorHeath Stewart23-Sep-03 3:03 
QuestionInterop Marshalling Performance - System.String to BSTR* too slow. Ideas? Pin
Jeremy Kimball17-Sep-03 2:22
Jeremy Kimball17-Sep-03 2:22 
AnswerRe: Interop Marshalling Performance - System.String to BSTR* too slow. Ideas? Pin
Nish Nishant20-Sep-03 17:34
sitebuilderNish Nishant20-Sep-03 17:34 
GeneralOoops Pin
Nish Nishant20-Sep-03 17:36
sitebuilderNish Nishant20-Sep-03 17:36 
GeneralRe: Interop Marshalling Performance - System.String to BSTR* too slow. Ideas? Pin
Jeremy Kimball20-Sep-03 18:00
Jeremy Kimball20-Sep-03 18:00 
GeneralAccessing OLE object from Database in VC++.Net Pin
sivaramakrishna16-Sep-03 23:24
sivaramakrishna16-Sep-03 23:24 
GeneralRe: Accessing OLE object from Database in VC++.Net Pin
Tom Archer22-Sep-03 16:49
Tom Archer22-Sep-03 16:49 
GeneralRe: Accessing OLE object from Database in VC++.Net Pin
sivaramakrishna22-Sep-03 21:38
sivaramakrishna22-Sep-03 21:38 
GeneralApp.Config File Pin
DR Clevenger11-Sep-03 7:44
DR Clevenger11-Sep-03 7:44 
GeneralRe: App.Config File Pin
Mazdak11-Sep-03 8:17
Mazdak11-Sep-03 8:17 
GeneralRe: App.Config File Pin
DR Clevenger11-Sep-03 8:36
DR Clevenger11-Sep-03 8:36 

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.