开发者

Need some help with PVoid [duplicate]

This question already has answers here: Closed 12 years ago.

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; 

}


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜