Using windows DDK with C# -
for little background story, work in computer lab , need have easy method disable network protocol bindings on adapters based on pci bus locations.
so far have written c# command line utility find them, bus locations, netcfginstanceid, etc. 1 thing haven't figured out how remove bindings on adapters, go through , remove them in registry still show in adapter settings.
eventually found out neat utilities in windows ddk, bindview sample program, want take netcfgapi included in bindview sample , use in c# program, problem c++ files. have tried using midl convert them .ddl or .tlb can use pinvoke on know little pinvoke , midl compiler comes errors such "midl : command line error midl1003 : error returned c preprocessor (4)".
my question is, there easier way this? , if there not, best way go converting netcfgapi c++ files usable in c#?
i write utility in c++ more comfortable using c#.
you try compiling stuff c++/cli dll. in project settings under compiler, mention not want clr, ease compilation.
then should able add dll reference in c# project.
Comments
Post a Comment