well firstly sorry i am still just learning, and i know almost nothing about asm

here is my code:

DWORD dwGetPeb()
{
unsigned long pPeb = NULL;

__asm {
mov eax,fs:[00000018h]
mov eax,dword ptr //TEB base addr+Peb pointer offset
ret
}
}


atm nothing is returned to dwGetPeb function

i need to:
- store address of eax
- return it to the function

thanks a lot for any help
Posted on 2005-09-15 14:09:34 by raz_1
DWORD dwGetPeb()

  unsigned long pPeb = NULL;

  __asm {
      mov eax,fs:[00000018h]
      mov eax,dword ptr //TEB base addr+Peb pointer offset
      mov , eax
  }
  return pPeb;
}
Posted on 2005-09-15 16:47:36 by ti_mo_n