0

Possible Duplicate:
what is pvoid

Hi,

Is PVoid is same as void* ? I want to know how to pass a pvoid to a function.

Say PVOID p; // In calling fn

callFn(&p);

//In calee

callfn(PVOID p) { //change p here

 *p= *s; or p = *s; 

}

Community
  • 1
  • 1

2 Answers2

0

looks like

callFn(PVOID p)

should be

callFn(PVOID *p)

which woul be the same as

callFn(void **p)

and callFn(&p) is passing the address of a pointer to the function callFn.

Bayou Bob
  • 103
  • 7
0

PVOID is the same as void *. Unfortunately, a void ** can be assigned to/passed as a void * without a cast. I think you may be running into this.

MSN
  • 53,214
  • 7
  • 75
  • 105