I am trying to generate typelib of INetCfg interface using IDL in this page, seen below:
import "netcfgx.idl";
[
uuid(d99085ff-c5d7-4a4c-a987-91a513e268a9),
version(1.0),
helpstring("NetCfgX 1.0 Type Library")
]
library NetCFGLib
{
interface IEnumNetCfgBindingInterface;
interface IEnumNetCfgBindingPath;
interface IEnumNetCfgComponent;
interface INetCfg;
interface INetCfgProperties;
interface INetCfgLock;
interface INetCfgBindingInterface;
interface INetCfgBindingPath;
interface INetCfgComponentBindings;
interface INetCfgBindingPath;
interface INetCfgClass;
interface INetCfgComponent;
interface INetCfgIdentification;
interface INetCfgClassSetup;
};
Unfortunately, the generated IDL still can't be loaded from comtype, with code given below:
import comtypes.client as cc
cc.GetModule("C:\path\to\netcfg.tlb")
It gives this error WindowsError: [Error -2147312566] Error loading type library/DLL
How do I fix this error? I am using Windows 7 64 bit, and Python 27 64