I already wrote earlier on 32/64-bit issues with Visual Studio. The problems are not frequent but when they happen they are pretty confusing. Here is another one today. C++ code is simple: #import “libid:59941706-0000-1111-2222-7EE5C88402D2” raw_interfaces_only no_namespace CComPtr<IObject> pObject; ATLENSURE_SUCCEEDED(pObject.CoCreateInstance(__uuidof(Object))); BYTE* pnData; ATLENSURE_SUCCEEDED(pObject->Method((ULONG_PTR) (BYTE*) pnData)); A COM method returns a pointer to data – pretty straightforward,…