how to copy data?
<p>I have a callback function which has the parameter <code>const unsigned char *pData</code>. everytime I hit the callback function I need to store the <code>pData</code> value into my local <code>unsigned char*</code> variable. Is there any function to copy the data?</p>

<hr>

<p><strong>Edit:</strong> Here is a code sample:</p>

<pre><code>void Callbackfun(int x, const unsigned char* pData, const UINT cbData) {
    switch(x) {
    case 0:
        // ptr is a global variable of structure containg name and number
        ptr.name = (unsigned char*)pData;
        break;
    case 1:
        ptr.number = (unsigned char*)pData;
        break;
    }
}
</code></pre>

<p>now every time this function is called i want to store the <code>pData</code> values in my local structure (as shown by <code>ptr.name</code>).</p>
