I am working on program using COM object. I try to get CLSID from ProgID of COM object. The ProgID is "ProvisioningWapDPURemote" and I am using this funtion "CLSIDFromProgID". The code is as follows.
CLSID clsid;
LPCOLESTR pProgID = L"ProvisioningWapDPURemote";
hr = CLSIDFromProgID(pProgID, &clsid);
When I execute this code, I can't get error code "Invalid class string". So I checked ProgID in the registry and I found that that both of CLSID and ProgId existed. I don't understand what is wrong here. I tried this function with another ProgId, and surprisingly it works. What's going on here? Anyone knows about this, please give some answers. Thanks.
You can try this code: