In process Python Com server throws error when created
===

I have created an in-process COM server in Python, it can be accessed by Python code but not other languages, such as vbscript. It throws the error:

    R6034
    An application has made an attempt to load the C runtime library incorrectly.
    Please contact the application's support team for more information.

Then it follows with:

    Error:	A dynamic link library (DLL) initialization routine failed. 
    Code:	8007045A
    Source: 	(null)
The vbscript code is here:

    set x = createObject("Audiclave.Analysis")
    r = x.Process("test")
    MsgBox(r)

This works as a out of process com server. Here is the idl file:

    import "oaidl.idl";
    import "ocidl.idl";

    [
        uuid(A66551C8-ADB4-4A1E-BB19-39F356282A7E),
        dual,
        oleautomation
    ]
    interface IMyInterface : IDispatch {
        HRESULT Process([in] BSTR str, [out, retval] VARIANT *pResult);
    }

    [
      uuid(BE0CDA23-A2D0-40E5-8D33-61DBE78E0A03)
    ]
    library MyTypeLib
    {
        importlib("stdole2.tlb");

        [uuid(F235B9D8-9C1A-44C3-A59F-3C822EC82A67)]
              coclass MyObject {
              [default] interface IMyInterface;
        };
    };
 
Finally the server itself:

    import comtypes
    import comtypes.server.localserver

    from comtypes.client import GetModule
    # generate wrapper code for the type library, this needs
    # to be done only once (but also each time the IDL file changes)
    GetModule("audiclave.tlb")

    from comtypes.gen.MyTypeLib import MyObject

    class AudiclaveImpl(MyObject):
        # registry entries
        _reg_threading_ = "Both"
        _reg_progid_ = "Audiclave.Analysis.1"
        _reg_novers_progid_ = "Audiclave.Analysis"
        _reg_desc_ = "Analysis"
        _reg_clsctx_ = comtypes.CLSCTX_INPROC_SERVER
        _regcls_ = comtypes.server.localserver.REGCLS_MULTIPLEUSE
	
        def Process(self, a):
            return str(a) + "executed"


    if __name__ == "__main__":
        from comtypes.server.register import UseCommandLine
        UseCommandLine(AudiclaveImpl)

    