As I use Windows 7 64bit, just solved this issue, by first running WDK setenv.bat <path_to_wdk> x64
. After that, generate the typelib either using midl netcfg.idl /env x64
(for 64bit TLB) or midl netcfg.idl
(for 32bit TLB).
I opted to use generate the 64bit TLB
Hope it helps somebody who just get in touch with this COM beast!