473,472 Members | 1,728 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Pointer for a managed datatype

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
Jul 19 '06 #1
4 1401
"Abhishek" <sh***@activelement.coma écrit dans le message de news:
%2****************@TK2MSFTNGP05.phx.gbl...

| 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

--
Joanna Carter [TeamB]
Consultant Software Engineer
Jul 19 '06 #2
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

"Joanna Carter [TeamB]" <jo****@not.for.spamwrote in message
news:eV**************@TK2MSFTNGP05.phx.gbl...
"Abhishek" <sh***@activelement.coma écrit dans le message de news:
%2****************@TK2MSFTNGP05.phx.gbl...

| 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

--
Joanna Carter [TeamB]
Consultant Software Engineer


Jul 20 '06 #3
using System;
class Test
{
static void Main() {
int i;
unsafe {
int* p = &i;
*p = 123;
}
Console.WriteLine(i);
}
}

"Abhishek" <sh***@activelement.comwrote in message
news:ui**************@TK2MSFTNGP04.phx.gbl...
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

"Joanna Carter [TeamB]" <jo****@not.for.spamwrote in message
news:eV**************@TK2MSFTNGP05.phx.gbl...
"Abhishek" <sh***@activelement.coma écrit dans le message de news:
%2****************@TK2MSFTNGP05.phx.gbl...

| 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

--
Joanna Carter [TeamB]
Consultant Software Engineer


Jul 27 '06 #4
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

"lightHammer" <li*********@webmail.co.zawrote in message
news:ea**********@ctb-nnrp2.saix.net...
using System;
class Test
{
static void Main() {
int i;
unsafe {
int* p = &i;
*p = 123;
}
Console.WriteLine(i);
}
}

"Abhishek" <sh***@activelement.comwrote in message
news:ui**************@TK2MSFTNGP04.phx.gbl...
>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

"Joanna Carter [TeamB]" <jo****@not.for.spamwrote in message
news:eV**************@TK2MSFTNGP05.phx.gbl...
"Abhishek" <sh***@activelement.coma écrit dans le message de news:
%2****************@TK2MSFTNGP05.phx.gbl...

| 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

--
Joanna Carter [TeamB]
Consultant Software Engineer




Jul 27 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Cancerbero | last post by:
Hi (first, excuse me for my bad english) As I know, the semantics for typedef is: typedef A B; I think this makes B a synonym of A, where A is an existing data type. Is that right? Based...
6
by: Itay_k | last post by:
Hello, I want a member in my class that will save pointer to pointer to System::Drawing::Image class. When I write on my class code: System::Drawing::Image **bmp; I get this error message:...
6
by: da.colonel | last post by:
Hello, I'm having some trouble with implementing a hashtable (hashmap) for a class at school. The map's constructor is called with a hash function and the number of possible keys the function...
1
by: Lloyd Dupont | last post by:
I have some managed C++ interacting with native DLL, for good integration I'm setting up some function pointer in the native DLL, passing some function pointer from the managed world....
8
by: Sam | last post by:
I have a situation occuring in my code and I just can't see to figure out why I have an structure called employee that will put all of the employee id's into a char array set to 10 struct...
1
by: interX | last post by:
Hi I'm new in VC++ and have a question to generics. I have a generic class, which contains an array of the generic type. This array I can pin and then I would like to get an unmanaged pointer to...
3
by: vijay.gandhi | last post by:
Hi, I am trying to convert some unmanaged code (C++) to managed code (using C++/CLI). 1) One of the functions used returns a void* which I need to cast into a handle of a managed object. Can...
2
weaknessforcats
by: weaknessforcats | last post by:
Handle Classes Handle classes, also called Envelope or Cheshire Cat classes, are part of the Bridge design pattern. The objective of the Bridge pattern is to separate the abstraction from the...
50
by: Juha Nieminen | last post by:
I asked a long time ago in this group how to make a smart pointer which works with incomplete types. I got this answer (only relevant parts included): ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.