Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Memory Addressing.

0 views
Skip to first unread message

calvin

unread,
Mar 30, 2007, 12:25:42 AM3/30/07
to
1. I would like to know is there any way ( i get the current address of that
object)
how could i use that object ??

2. is there any way to convert it to the type PVOID from the memeory address
?

3. is the memory address i got from the debugger is the REAL memeory address
or the virtual one ?
will that be affect the way i address it ?

4. can i do pipeline so as unix do ?


Jim Langston

unread,
Mar 30, 2007, 3:09:10 AM3/30/07
to
"calvin" <xay...@msn.com> wrote in message
news:5300691E-FC94-4002...@microsoft.com...

> 1. I would like to know is there any way ( i get the current address of
> that object)
> how could i use that object ??

void* SomeAddress; // Say contains instance to MyClass

MyClass* Instance = reinterpret_cast<MyClass*>( SomeAddress );
(maybe some other cast would work, but I know reinterpret_would)
Now use Instance.

> 2. is there any way to convert it to the type PVOID from the memeory
> address ?

PVOID = reinterpret_cast<PVOID>( SomeAddress );
(no matter what type of pointer SomeAddress is)

> 3. is the memory address i got from the debugger is the REAL memeory
> address or the virtual one ?
> will that be affect the way i address it ?

They are about the same, since windows does paging.

> 4. can i do pipeline so as unix do ?

If you mean something like:
myprogram > sort;
yes, read from std::cin, write to std::cout.

Ben Voigt

unread,
Mar 30, 2007, 11:05:26 AM3/30/07
to
> 3. is the memory address i got from the debugger is the REAL memeory
> address or the virtual one ?

It's the virtual address. Only the kernel uses physical addresses.

> will that be affect the way i address it ?

Yes. It means the address is useless from any other program.

>
> 4. can i do pipeline so as unix do ?

Yes, Windows has pipes.

See my reply to your earlier message.


0 new messages