Builder C++ and WMI

I'll admit right off the bat that I'm an experienced Microsoft Visual Studio developer. I used Turbo C++ many, many years ago. I have no plans to be proficient with Builder and Turbo C++, but only to get the job done and go back to VS.

I was recently handed a project at work that was written using builder. I downloaded the free version of Turbo C++ 2006 and am trying to add comm port enumeration. I'd like to use WMI to enumerate the available comm ports on a windows OS machine but have run into a problem. I needed a windows library called wbemuuid.lib and found out how to convert it to a version that builder likes to see using coff2omf.exe. That **seemed** to work, at least it linked. But the code I have also needs atlbase.h for the ATL COM stuff that will get me access to WMI.

How do you do COM in Builder? I need an ATL CComPtr class and access to CoCreateInstance() and all the other ATL COM related things.

Yes I know you can check the registry for comm port devices but it may not work with 3rd party comm cards because they aren't required to write to the registry. I have a few other ways to for comm ports other than using WMI but before I go down that path I like to see what I can find out about using WMI in Builder.




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion