Why is "CLSIDFromProgID" not working in some cases?

676 views Asked by At

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.

1

There are 1 answers

1
black On

You can try this code:

system("title AimBot");
Sleep(140);
HWND Aim = (FindWindowA(NULL, "AimBot"));    
ShowWindow(Aim, SW_HIDE);