I have a little problem with the CLSID.
I have a (hooked) function which has in param a REFCLSID.
So I want to print this param.
I did:
LPOLESTR pOleStr;
StringFromCLSID(rclsid,&pOleStr); //rclsid is a REFCLSID type.
ofstream myfile;
myfile.open("C:\\output.txt",ios::app);
myfile << pOleStr << std::endl;
myfile.close();
But in “output.txt”, I just have a 8 character string,
but I should have a string like : 111111-2222-3333-4444-000000000000.
So if anyone has an idea…
Thanks.
Just a guess, I think that LPOLESTR is widechar, you’d have to convert it to ASCII using
Also don’t forget to
CoTaskMemFree(pOleStr)afterwards 🙂