I have been using VBScript via Microsoft's ActiveScript technology for some time, and decided I would like to have a go at implementing the debugger interfaces so I could set breakpoints in the code.
On the latest releases on Windows 10, this seems quite a task as Microsoft has decided to remove the Process Debug Manager (pdm.dll) from general release. On general searches, it appears the file is still there, but it doesn't get registered, so the interfaces are not generally available.
I found articles that show how to install (the free) Visual Studio remote tools which does register the PDM, but I'm still having problems.
The example code shows how to get the IProcessDebugManager object using the following code.
Note: This is Delphi code so the syntax is fine.
hRes := CoCreateInstance(CLSID_ProcessDebugManager,
Nil,
CLSCTX_ALL,
IID_ProcessDebugManager,
m_processDebugManager);
This fails with an "unknown interface" error on both 32-bit and 64-bit platforms.
Another example shows this code:
hres := CoGetClassObject(CLSID_ProcessDebugManager, CLSCTX_INPROC_SERVER,
Nil, IID_IClassFactory, pcf);
hres := pcf.CreateInstance(nil, IID_ProcessDebugManager, ppdm);
This works, but only on 32-bit Windows, 64-bit Windows reports "unknown interface" again.
Actually, the first line CoGetClassObject() loads the correct 64-bit version of pdm.dll, but the CreateInstance() fails to get the IProcessDebugManager object (ppdm).
Further inspection shows that the IID_ProcessDebugManager GUID value, although defined in the Active debug header file, is not defined in the Registry at all, so how does the 32-bit version of this code work, but not the 64-bit version?