Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
QuestionHow to customize PropertyGrid ToolTip Pin
LotusM4-May-04 0:53
LotusM4-May-04 0:53 
Generalcombobox datasource Pin
brain2cpu4-May-04 0:21
professionalbrain2cpu4-May-04 0:21 
GeneralRe: combobox datasource Pin
Colin Angus Mackay4-May-04 0:42
Colin Angus Mackay4-May-04 0:42 
GeneralUpdating More than One table Pin
sreejith ss nair3-May-04 23:46
sreejith ss nair3-May-04 23:46 
GeneralRe: Updating More than One table Pin
Heath Stewart4-May-04 4:13
protectorHeath Stewart4-May-04 4:13 
GeneralAlan Murta's - General Polygon Clipper Pin
d-mon3-May-04 22:55
d-mon3-May-04 22:55 
GeneralRe: Alan Murta's - General Polygon Clipper Pin
Daniel Turini4-May-04 0:07
Daniel Turini4-May-04 0:07 
GeneralRe: Alan Murta's - General Polygon Clipper Pin
Heath Stewart4-May-04 3:52
protectorHeath Stewart4-May-04 3:52 
Yeah, but I have to agree with Daniel on this one. P/Invoke is great when you have to call a few exported functions, but many times you run into a lot of problems, especially with lots of exports.

Say one of these exported functions uses nested structs. The marshellers used by the CLR does not support nested structs (and the .NET Compact Framework doesn't even support marshalling a struct at all). All this is easy to accomplish using a mixed-mode MC++ wrapper, exposing classes as a managed class (using the __gc extension, at least until .NET 2.0 is released) and using the native APIs from the native library you're trying to wrap.

I do a lot of interop (both COM and P/Invoke) for fun and I typically choose this route when I need to use a lot of exported functions or more complex functions with nested structs and the like. For an example, see my article, Using XML Digital Signatures for Application Licensing[^] where I use a MC++ assembly that uses a lot of the LSA APIs and exposes that as a managed class I can use with any other ".NET language".

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Alan Murta's - General Polygon Clipper Pin
d-mon5-May-04 10:41
d-mon5-May-04 10:41 
QuestionBest C# IRC Channel? Pin
Marlun3-May-04 22:36
Marlun3-May-04 22:36 
AnswerRe: Best C# IRC Channel? Pin
Heath Stewart4-May-04 3:47
protectorHeath Stewart4-May-04 3:47 
GeneralRe: Best C# IRC Channel? Pin
Marlun4-May-04 6:27
Marlun4-May-04 6:27 
GeneralRe: Best C# IRC Channel? Pin
Heath Stewart4-May-04 8:02
protectorHeath Stewart4-May-04 8:02 
GeneralRe: Best C# IRC Channel? Pin
Marlun4-May-04 10:08
Marlun4-May-04 10:08 
GeneralRe: Best C# IRC Channel? Pin
eggie54-May-04 15:54
eggie54-May-04 15:54 
GeneralRe: Best C# IRC Channel? Pin
Marlun4-May-04 20:23
Marlun4-May-04 20:23 
GeneralRe: Best C# IRC Channel? Pin
eggie55-May-04 2:01
eggie55-May-04 2:01 
Generalusing API in C# Pin
nthevu3-May-04 20:18
professionalnthevu3-May-04 20:18 
GeneralRe: using API in C# Pin
Heath Stewart4-May-04 3:46
protectorHeath Stewart4-May-04 3:46 
GeneralRe: using API in C# Pin
nthevu4-May-04 5:15
professionalnthevu4-May-04 5:15 
GeneralRe: using API in C# Pin
Heath Stewart4-May-04 8:00
protectorHeath Stewart4-May-04 8:00 
GeneralRe: using API in C# Pin
nthevu4-May-04 18:18
professionalnthevu4-May-04 18:18 
GeneralAbout WebServer Pin
Moon Boy3-May-04 13:24
Moon Boy3-May-04 13:24 
GeneralRe: About WebServer Pin
TigerNinja_3-May-04 17:39
TigerNinja_3-May-04 17:39 
GeneralRe: About WebServer Pin
Heath Stewart4-May-04 3:40
protectorHeath Stewart4-May-04 3:40 

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.