May 15, 2003
Guys,

I have a buffer buf. It's defined as const void* buf (In the param of a
function).

BOOL Write(const void* buf, ULONG nBytes, ULONG* pBytesWritten = NULL)
{

}

How can I access this variable data.

Is it by capturing it in const char* or something else.

Shyam


May 15, 2003
Depends on whether you are coding C or C++


> BOOL Write(const void* buf, ULONG nBytes, ULONG* pBytesWritten = NULL)
> {

        const char   *ptr = ( const char * ) buf;        // Should work for
C and C++
        const char   *ptr = static_cast < const char * > ( buf );    //
Should work for C++

> }
>
> How can I access this variable data.
>
> Is it by capturing it in const char* or something else.

--
ManiaC++
Jan Knepper