Pointer for a managed datatype

  • Thread starter Thread starter Abhishek
  • Start date Start date
A

Abhishek

Hi All,

i need to find the address of a variable which is of the type
system.drawing.bitmap which is a managed datatype. how to i get the address
of the variable created of that type

regards
Abhishek
 
"Abhishek" <[email protected]> a écrit dans le message de %[email protected]...

| i need to find the address of a variable which is of the type
| system.drawing.bitmap which is a managed datatype. how to i get the
address
| of the variable created of that type

I have a question in reply to yours ... Why do you want an address ??? .NET
is a managed language where addresses can be changed by the runtime, what
use would you have for the address ?

Joanna
 
Hi,

well, the csharp app will be taking a screenshot of a browser which is
stored in the bitmap variable. My DirectX Dll will then render this bitmap
in game thereby creating a browser ingame. If i write to file then my dll
is giving me a conflict when both systems are accessing the bmp. So i need
the memory address to directly pick the bmp form memory and not have the
access conflict.

any workabout? or other ideas are welcome

regards
Abhi
 
using System;
class Test
{
static void Main() {
int i;
unsafe {
int* p = &i;
*p = 123;
}
Console.WriteLine(i);
}
}
 
Dude LightHammer.

this issue did get solved well not by creating a pointer but creating a
pointer for int type was not the issue
I need to create a pointer for a managed datatype like bitmap (actually for
the bitmap type).

in the end got a work around.

but thanks for posting! :)

regards
Abhi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top