Click here to Skip to main content
16,011,120 members
Home / Discussions / C#
   

C#

 
GeneralRe: Bizarre remoting problem Pin
Judah Gabriel Himango5-Aug-04 10:10
sponsorJudah Gabriel Himango5-Aug-04 10:10 
GeneralRe: Bizarre remoting problem Pin
Heath Stewart5-Aug-04 10:39
protectorHeath Stewart5-Aug-04 10:39 
GeneralRe: Bizarre remoting problem Pin
Judah Gabriel Himango5-Aug-04 10:54
sponsorJudah Gabriel Himango5-Aug-04 10:54 
GeneralRe: Bizarre remoting problem Pin
Tom Larsen5-Aug-04 12:17
Tom Larsen5-Aug-04 12:17 
GeneralRe: Bizarre remoting problem Pin
scadaguy6-Aug-04 6:30
scadaguy6-Aug-04 6:30 
GeneralConverting .rc files to .resx Pin
BrcKcc5-Aug-04 7:20
BrcKcc5-Aug-04 7:20 
QuestionHow to pass array or VARIANT from ATL COM to .NET. Pin
al_1_@hotmail.com5-Aug-04 6:58
al_1_@hotmail.com5-Aug-04 6:58 
AnswerRe: How to pass array or VARIANT from ATL COM to .NET. Pin
Heath Stewart5-Aug-04 8:41
protectorHeath Stewart5-Aug-04 8:41 
Search CodeProject.

The important thing is developing your .NET code correctly. Use the MarshalAsAttribute with the appropriate UnmanagedType enumeration member. For an object[] array, you can use a myriad of choices but commonly - if you're passing an array of variants - you'll either use UnmanagedType.LPArray or UnmanagedType.SafeArray. A SAFEARRAY in unmanaged code stores information for each elements (what VARTYPE it is).

Read about the MarshalAsAttribute in the .NET Framework SDK to start. You should also read Interoperating with Unmanaged Code[^] in the .NET Framework SDK, specifically Marshalling Data with COM Interop[^]. This presents a lot of information you must understand, as well as some examples.

 

Microsoft MVP, Visual C#
My Articles
GeneralEmpty collections in web services Pin
Diego F.5-Aug-04 6:46
Diego F.5-Aug-04 6:46 
GeneralRe: Empty collections in web services Pin
leppie5-Aug-04 20:09
leppie5-Aug-04 20:09 
GeneralRe: Empty collections in web services Pin
Diego F.6-Aug-04 7:31
Diego F.6-Aug-04 7:31 
GeneralDelivery of parameters to dynamically generated dll Pin
depechemode20015-Aug-04 6:15
depechemode20015-Aug-04 6:15 
GeneralRe: Delivery of parameters to dynamically generated dll Pin
Heath Stewart5-Aug-04 6:21
protectorHeath Stewart5-Aug-04 6:21 
GeneralLogon screen Pin
bthumber5-Aug-04 3:33
bthumber5-Aug-04 3:33 
GeneralRe: Logon screen Pin
Nick Parker5-Aug-04 7:19
protectorNick Parker5-Aug-04 7:19 
GeneralRe: Logon screen Pin
bthumber5-Aug-04 8:12
bthumber5-Aug-04 8:12 
GeneralRe: Logon screen Pin
Nick Parker5-Aug-04 10:10
protectorNick Parker5-Aug-04 10:10 
QuestionKeyDown event for a button?? Pin
misterbear5-Aug-04 2:46
misterbear5-Aug-04 2:46 
AnswerRe: KeyDown event for a button?? Pin
Heath Stewart5-Aug-04 3:38
protectorHeath Stewart5-Aug-04 3:38 
Generaltransparent gif images showing wrong background Pin
ddelapasse5-Aug-04 2:43
ddelapasse5-Aug-04 2:43 
GeneralRe: transparent gif images showing wrong background Pin
ddelapasse5-Aug-04 3:01
ddelapasse5-Aug-04 3:01 
GeneralRe: transparent gif images showing wrong background Pin
Heath Stewart5-Aug-04 3:19
protectorHeath Stewart5-Aug-04 3:19 
GeneralWeb Services: FileNotFoundException Pin
Escroto5-Aug-04 2:14
Escroto5-Aug-04 2:14 
GeneralRe: Web Services: FileNotFoundException Pin
Heath Stewart5-Aug-04 2:34
protectorHeath Stewart5-Aug-04 2:34 
GeneralJetBrains ReSharper. The Most Intelligent Add-In To VisualStudio.NET Pin
Anonymous5-Aug-04 1:52
Anonymous5-Aug-04 1:52 

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.