pythoncom.CoInitializeSecurity

CoInitializeSecurity(sd, authSvc, reserved1, authnLevel, impLevel, authInfo, capabilities, reserved2)

Registers security and sets the default security values.

Parameters

sd : PySECURITY_DESCRIPTOR

Security descriptor containing access permissions for process' objects, can be None.
If Capabilities contains EOAC_APPID, sd should be an AppId (guid), or None to use server executable.
If Capabilities contains EOAC_ACCESS_CONTROL, sd parameter should be an IAccessControl interface.

authSvc : object

A value of None tells COM to choose which authentication services to use. An empty list means use no services.

reserved1 : object

Must be None

authnLevel : int

One of pythoncom.RPC_C_AUTHN_LEVEL_* values. The default authentication level for proxies. On the server side, COM will fail calls that arrive at a lower level. All calls to AddRef and Release are made at this level.

impLevel : int

One of pythoncom.RPC_C_IMP_LEVEL_* values. The default impersonation level for proxies. This value is not checked on the server side. AddRef and Release calls are made with this impersonation level so even security aware apps should set this carefully. Setting IUnknown security only affects calls to QueryInterface, not AddRef or Release.

authInfo : object

Must be None

capabilities : int

Authentication capabilities, combination of pythoncom.EOAC_* flags.

reserved2 : object

Must be None