Hi,

Is it possible to (forcibly) unload the python engine after executing
a python script?

I would like to have the Dlls unloaded after Release in the following code:

#define WINVER 0x400
#define _WIN32_WINNT 0x400

#include <windows.h>
#include <ObjBase.h>
#include <activscp.h>

int main(int argc, char* argv[])
{
  CoInitializeEx(0, COINIT_APARTMENTTHREADED);
  GUID clsid;

  HRESULT hr = CLSIDFromProgID( L"Python", &clsid );

  IUnknown* tmp = 0;
  if (S_OK == hr) hr = CoCreateInstance(clsid, NULL,
CLSCTX_INPROC_SERVER, IID_IActiveScript, (void **)&tmp);
  if (tmp) tmp->Release(); // python still loaded at this point?

  return 0;
}

Thanks

-- 
/Johan.
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to