As it is stated here: https://www.python.org/doc/essays/omg-darpa-mcc-position/
How can I do as the title says?
Currently I do this
- Install python-3.9.4-amd64.exe
- Run “pip install pywin32” in cmd
- Run this program and check hr after CoCreateInstance
#include <atlbase.h>
#include <activscp.h>
int _tmain(int argc, _TCHAR* argv[])
{
HRESULT hr = S_OK;
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
GUID guid; CLSIDFromProgID(L"Python", &guid); //this does not work in CoCreateInstance (guid is valid)
//GUID guid; CLSIDFromProgID(L"JavaScript", &guid); //this works in CoCreateInstance
IActiveScript* script; hr = CoCreateInstance(guid, 0, CLSCTX_INPROC_SERVER, IID_IActiveScript, (void**)&script);
::CoUninitialize();
return 0;
}