rifter1818
Junior Contributor
Im trying to get a pointer to a Device, actually trying to get an intPtr, but...
so far as close as i could get is
[C#]
// With Dev being the device i want to point at
Device* pDev = &Dev;
void* vDev = pDev;
IntPtr X = new IntPtr(vDev);
return X;
[/C#]
Which of course Crashes as you cant get a pointer to a managed object or something like that (first line is wrong...) so folks how do i do it?
so far as close as i could get is
[C#]
// With Dev being the device i want to point at
Device* pDev = &Dev;
void* vDev = pDev;
IntPtr X = new IntPtr(vDev);
return X;
[/C#]
Which of course Crashes as you cant get a pointer to a managed object or something like that (first line is wrong...) so folks how do i do it?