Click here to Skip to main content
15,893,622 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Scanline problem in bitmap Pin
Mark Salsbery12-Jan-08 7:32
Mark Salsbery12-Jan-08 7:32 
GeneralLockWindowUpdate & Vista Pin
baerten9-Jan-08 23:54
baerten9-Jan-08 23:54 
GeneralUsing handle between two process Pin
ashtwin9-Jan-08 23:29
ashtwin9-Jan-08 23:29 
GeneralRe: Using handle between two process Pin
Maxwell Chen9-Jan-08 23:37
Maxwell Chen9-Jan-08 23:37 
GeneralRe: Using handle between two process Pin
CPallini9-Jan-08 23:47
mveCPallini9-Jan-08 23:47 
GeneralRe: Using handle between two process Pin
Maxwell Chen10-Jan-08 0:19
Maxwell Chen10-Jan-08 0:19 
GeneralRe: Using handle between two process Pin
CPallini10-Jan-08 0:36
mveCPallini10-Jan-08 0:36 
GeneralRe: Using handle between two process Pin
Maxwell Chen10-Jan-08 3:48
Maxwell Chen10-Jan-08 3:48 
CPallini wrote:
The type void* is a number that may contain a memory address.


I am not sure, but if it is just a number, a ULONG is just fine. Since it is defined as a pointer type (void*), it must be some address pointing to something.


CPallini wrote:
Since the window handle of a particular window is the same on different process (this, for instance, allows you to use in your application the handle found with Spy++ tool) and the processes have different address spaces, then window handles cannot be valid memory pointers in the context of such processes (at least IMHO ).


I guess that creating handle and free handle are something related with global allocating memory blocks in the heap. Maybe it would be similar (not 100%) to this kind of thing below (I do not have VC++ now, not sure). Smile | :)
// Process A.
struct MyBlock
{
  int a;
};
void main()
{
  MyBlock* p = new MyBlock; // p = 0x00A30210
  p->a = 3;
  // No delete to let it being kept.
}
// Process B.
struct MyBlock
{
  int a;
};
void main()
{
  void* p = reinterpret_cast<void*>(0x00A30210);
  cout << reinterpret_cast<myblock*>(p)->a;
}



Maxwell Chen

GeneralRe: Using handle between two process Pin
CPallini10-Jan-08 3:58
mveCPallini10-Jan-08 3:58 
GeneralRe: Using handle between two process Pin
Maxwell Chen10-Jan-08 4:08
Maxwell Chen10-Jan-08 4:08 
GeneralRe: Using handle between two process Pin
CPallini10-Jan-08 4:35
mveCPallini10-Jan-08 4:35 
GeneralRe: Using handle between two process [modified] Pin
CPallini10-Jan-08 4:18
mveCPallini10-Jan-08 4:18 
GeneralRe: Using handle between two process Pin
Maxwell Chen10-Jan-08 4:36
Maxwell Chen10-Jan-08 4:36 
GeneralRe: Using handle between two process Pin
Mark Salsbery10-Jan-08 7:19
Mark Salsbery10-Jan-08 7:19 
GeneralRe: Using handle between two process Pin
Hamid_RT9-Jan-08 23:47
Hamid_RT9-Jan-08 23:47 
GeneralRe: Using handle between two process Pin
CPallini10-Jan-08 0:22
mveCPallini10-Jan-08 0:22 
GeneralRe: Using handle between two process Pin
Hamid_RT10-Jan-08 0:34
Hamid_RT10-Jan-08 0:34 
GeneralRe: Using handle between two process Pin
CPallini10-Jan-08 0:47
mveCPallini10-Jan-08 0:47 
GeneralRe: Using handle between two process Pin
Nishad S9-Jan-08 23:52
Nishad S9-Jan-08 23:52 
GeneralRe: Using handle between two process Pin
ashtwin10-Jan-08 1:19
ashtwin10-Jan-08 1:19 
GeneralRe: Using handle between two process Pin
Nishad S10-Jan-08 1:43
Nishad S10-Jan-08 1:43 
GeneralRe: Using handle between two process Pin
CPallini10-Jan-08 2:16
mveCPallini10-Jan-08 2:16 
GeneralRe: Using handle between two process Pin
David Crow10-Jan-08 2:19
David Crow10-Jan-08 2:19 
GeneralRe: Using handle between two process Pin
ashtwin10-Jan-08 18:32
ashtwin10-Jan-08 18:32 
GeneralRe: Using handle between two process Pin
David Crow11-Jan-08 2:29
David Crow11-Jan-08 2:29 

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.