Click here to Skip to main content
15,913,587 members
Home / Discussions / C#
   

C#

 
AnswerRe: Marshalling Pin
DaveyM6926-Jan-10 11:52
professionalDaveyM6926-Jan-10 11:52 
I'm no expert so this is a rough overview. I'm sure Luc will be along soon to offer a much better description!

Marshalling is data transformation. Things in the managed world are different from the unmanaged world and marshalling takes care of transforming the data so we can pass it between the two worlds.

Unmanaged code often uses pointers to pass the references to values rather than the values themselves. These pointers are marshalled back to managed code to an IntPtr. To get the actual value pointed to, we can use the Marshal class to transform the data at the given reference to a structure as in your example.

Dave

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus)

GeneralRe: Marshalling Pin
Luc Pattyn26-Jan-10 13:42
sitebuilderLuc Pattyn26-Jan-10 13:42 
QuestionDisplaying the contents of a List<string[]> in a ListBox Pin
Douglas Kirk26-Jan-10 9:47
Douglas Kirk26-Jan-10 9:47 
AnswerRe: Displaying the contents of a List<string[]> in a ListBox Pin
DaveyM6926-Jan-10 10:33
professionalDaveyM6926-Jan-10 10:33 
GeneralRe: Displaying the contents of a List<string[]> in a ListBox Pin
Douglas Kirk26-Jan-10 10:58
Douglas Kirk26-Jan-10 10:58 
GeneralRe: Displaying the contents of a List<string[]> in a ListBox Pin
DaveyM6926-Jan-10 11:23
professionalDaveyM6926-Jan-10 11:23 
AnswerRe: Displaying the contents of a List<string[]> in a ListBox Pin
sanforjackass26-Jan-10 10:37
sanforjackass26-Jan-10 10:37 
GeneralRe: Displaying the contents of a List<string[]> in a ListBox Pin
sanforjackass26-Jan-10 11:10
sanforjackass26-Jan-10 11:10 
AnswerRe: Displaying the contents of a List<string[]> in a ListBox Pin
Alex Manolescu26-Jan-10 11:13
Alex Manolescu26-Jan-10 11:13 
GeneralRe: Displaying the contents of a List<string[]> in a ListBox Pin
Douglas Kirk26-Jan-10 16:15
Douglas Kirk26-Jan-10 16:15 
GeneralRe: Displaying the contents of a List<string[]> in a ListBox Pin
Alex Manolescu26-Jan-10 22:33
Alex Manolescu26-Jan-10 22:33 
AnswerRe: Displaying the contents of a List<string[]> in a ListBox Pin
Luc Pattyn26-Jan-10 13:47
sitebuilderLuc Pattyn26-Jan-10 13:47 
QuestionRegistry Permission Issues Pin
cc034926-Jan-10 8:55
cc034926-Jan-10 8:55 
AnswerRe: Registry Permission Issues Pin
DaveyM6926-Jan-10 9:34
professionalDaveyM6926-Jan-10 9:34 
GeneralRe: Registry Permission Issues Pin
cc034926-Jan-10 9:44
cc034926-Jan-10 9:44 
GeneralRe: Registry Permission Issues Pin
Dave Kreskowiak26-Jan-10 10:49
mveDave Kreskowiak26-Jan-10 10:49 
AnswerRe: Registry Permission Issues Pin
Ennis Ray Lynch, Jr.26-Jan-10 10:25
Ennis Ray Lynch, Jr.26-Jan-10 10:25 
QuestionBeginner C# homework project - stuck Pin
tinnpot26-Jan-10 8:06
tinnpot26-Jan-10 8:06 
AnswerRe: Beginner C# homework project - stuck Pin
harold aptroot26-Jan-10 8:17
harold aptroot26-Jan-10 8:17 
AnswerRe: Beginner C# homework project - stuck Pin
OriginalGriff26-Jan-10 8:20
mveOriginalGriff26-Jan-10 8:20 
GeneralRe: Beginner C# homework project - stuck Pin
tinnpot26-Jan-10 10:12
tinnpot26-Jan-10 10:12 
GeneralRe: Beginner C# homework project - stuck Pin
Ennis Ray Lynch, Jr.26-Jan-10 10:29
Ennis Ray Lynch, Jr.26-Jan-10 10:29 
GeneralRe: Beginner C# homework project - stuck Pin
Luc Pattyn26-Jan-10 13:51
sitebuilderLuc Pattyn26-Jan-10 13:51 
QuestionHow to display image in crystal report? Pin
mahdi136726-Jan-10 7:27
mahdi136726-Jan-10 7:27 
QuestionTroubles with a DPI Aware application Pin
Antonino Porcino26-Jan-10 6:50
Antonino Porcino26-Jan-10 6:50 

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.