A wild guess. The third argument of the GetArchivedKey
method should be a number. You're passing the string CR_OUT_BASE64
. Probably this should work:
certadmin._ICertAdmin2__com_GetArchivedKey('hostname\\simpleca', 35, 1, comtypes.BSTR(' '))
CR_OUT_BASE64
constant is equal to 1.