Click here to Skip to main content
16,005,734 members
Home / Discussions / C#
   

C#

 
GeneralRe: RCW question when returning a string Pin
Nish Nishant22-May-04 4:17
sitebuilderNish Nishant22-May-04 4:17 
GeneralRe: RCW question when returning a string Pin
Heath Stewart22-May-04 4:18
protectorHeath Stewart22-May-04 4:18 
Generallistbox control in C# Pin
HowRU21-May-04 22:22
HowRU21-May-04 22:22 
GeneralRe: listbox control in C# Pin
Heath Stewart22-May-04 4:52
protectorHeath Stewart22-May-04 4:52 
GeneralPassing a Class to an Unmanaged function as parameter Pin
shajuMathew21-May-04 20:49
shajuMathew21-May-04 20:49 
GeneralRe: Passing a Class to an Unmanaged function as parameter Pin
Heath Stewart22-May-04 4:17
protectorHeath Stewart22-May-04 4:17 
GeneralRe: Passing a Class to an Unmanaged function as parameter Pin
shajuMathew26-May-04 1:32
shajuMathew26-May-04 1:32 
GeneralRe: Passing a Class to an Unmanaged function as parameter Pin
Heath Stewart26-May-04 3:23
protectorHeath Stewart26-May-04 3:23 
In that case, use a GCHandle to pin the class instance in memory. The GC (Garbage Collector) may relocate the object in memory, so the address would change. Unmanaged code can't deal with those changes so you'll get all sorts of errors since your object isn't where it's supposed to be.

You can find more information about the GCHandle class in the .NET Framework SDK.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Passing a Class to an Unmanaged function as parameter Pin
Member 93002222-May-04 9:18
Member 93002222-May-04 9:18 
GeneralRe: Passing a Class to an Unmanaged function as parameter Pin
shajuMathew26-May-04 1:35
shajuMathew26-May-04 1:35 
QuestionHow to use a DirectShow filter in C# ? Pin
ro_angel_bv21-May-04 20:11
ro_angel_bv21-May-04 20:11 
AnswerRe: How to use a DirectShow filter in C# ? Pin
Heath Stewart22-May-04 4:00
protectorHeath Stewart22-May-04 4:00 
GeneralRe: How to use a DirectShow filter in C# ? Pin
ro_angel_bv22-May-04 9:21
ro_angel_bv22-May-04 9:21 
GeneralRe: How to use a DirectShow filter in C# ? Pin
Heath Stewart23-May-04 3:31
protectorHeath Stewart23-May-04 3:31 
GeneralRe: How to use a DirectShow filter in C# ? Pin
mjKPL1-Sep-10 5:55
mjKPL1-Sep-10 5:55 
GeneralFile Compression Pin
demasoni.com21-May-04 19:34
demasoni.com21-May-04 19:34 
GeneralRe: File Compression Pin
David M. Kean22-May-04 0:35
David M. Kean22-May-04 0:35 
GeneralRe: File Compression Pin
demasoni.com22-May-04 12:48
demasoni.com22-May-04 12:48 
GeneralSetup with InstallShield Pin
quocbao21-May-04 16:34
quocbao21-May-04 16:34 
GeneralRe: Setup with InstallShield Pin
Heath Stewart22-May-04 2:38
protectorHeath Stewart22-May-04 2:38 
GeneralCalling a function in another window. Pin
Bojan Rajkovic21-May-04 16:13
Bojan Rajkovic21-May-04 16:13 
GeneralRe: Calling a function in another window. Pin
Dimitris Iliopoulos22-May-04 0:06
Dimitris Iliopoulos22-May-04 0:06 
GeneralTest and label fields misalign on windows 2000 Pin
Parrish Pope21-May-04 15:58
sussParrish Pope21-May-04 15:58 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Dimitris Iliopoulos22-May-04 0:10
Dimitris Iliopoulos22-May-04 0:10 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Heath Stewart22-May-04 2:47
protectorHeath Stewart22-May-04 2:47 

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.