I don't fully understand the following line:
<code>
------------------
int AEEClsCreateInstance(AEECLSID ClsId,IShell * pIShell,IModule * po,void ** ppObj)
{some code}
--------------------
</code>
What does the "void **ppobj" argument mean?
Thanks.
This is a discussion on Help understanding function header within the C Programming forums, part of the General Programming Boards category; I don't fully understand the following line: <code> ------------------ int AEEClsCreateInstance(AEECLSID ClsId,IShell * pIShell,IModule * po,void ** ppObj) {some code} ...
I don't fully understand the following line:
<code>
------------------
int AEEClsCreateInstance(AEECLSID ClsId,IShell * pIShell,IModule * po,void ** ppObj)
{some code}
--------------------
</code>
What does the "void **ppobj" argument mean?
Thanks.
It's a double pointer (pointer to a pointer) of an undefined type (could be anything).
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
I don't know what you mean by undefined type. It is clearly a pointer to the type void *. void is a type, it is an incomplete type which cannot be completed, which implies that one cannot apply sizeof to it, the type void still has a utility, one casts the value returned by a function as void when we want to discard the value returned by it. For eg., a typical use might beOriginally posted by Magos
It's a double pointer (pointer to a pointer) of an undefined type (could be anything).
ppobj is a pointer to void *. void * is a an object type. Pointer to any object type can be converted to void * and back again without any loss of information which makes it valuable as a generic pointer.Code:(void) printf("Hello World");
The one who says it cannot be done should never interrupt the one who is doing it.
Thanks to both of you. What you wrote lead me to a section in a book about multiple indirection and void * pointers.
It's c++ book but "a void pointer can be assigned to any type of pointer without the use of a type cast."
and
"The most common use of void * is as a function return type."
Again. thanks.