*MUCH* has been written on BSTR/_bstr_t conversion, but I've been unable to get my head around how it applies here.
Perhaps I just need a nudge.
My 3rd party encryption/decryption routine APIs are
BYTE* EncryptString(const BYTE* data);
BYTE* DecryptString(const BYTE* data);
and I need to store the encrypted data in a SQL Server database.
The data is truly binary. So upon advice from elsewhere in the forum, I chose BSTR and ADO.
But what do I use in place of <<<< ???Code:_bstr_t encryptedBSTR = pRst->Fields->GetItem("data")->Value; BYTE* encryptedData <<<< encryptedBSTR; BYTE* decryptedData = DecryptString(encryptedData); ... BYTE* encryptedData = EncryptString(decryptedData); encryptedBSTR <<<< encryptedData; pRst->Fields->GetItem("data")->Value = encryptedBSTR;
Thanks for any hints
jim




Reply With Quote