Quote Originally Posted by medwrite View Post
CLongBinary* binarydata = varValue->m_pbinary;

But how to write a pdf file using this binary data ?
Please give to us your suggestions.
I believe, the answer is pretty obvious. Did you bother to check CLongBinary documentation. HGLOBAL m_hData member contains data bytes handle, DWORD m_dwDataLength member contains bytes count. What is the problem here? You use GlobalLock function to access actual data bytes. And don't forget to unlock it later.

And I hope you know how to write memory buffer of known size to file.