hexagon logo

Got Visual Studio and the Interop.PCDLRN.dll... Now what?

As I upgraded one CMM to Windows 7 64-bit, my small VBS helpers died in the process (still kickin' butt on XP though).
So, I have begun re-coding them in Visual Studio 2010 (I think). I have gotten so far in the coding where I need to connect to PC-DMIS and start interfacing with it. Now, I managed to find the DLL that is supposed to expose some interfaces and methods and I have successfully added it to my project.

Then what? How do I use the DLL to connect to PC-DMIS and expose the PartPrograms collection for instance?

Oh, I am using C# for this...

Any and all input, examples or suggestions are VERY welcome!

TIA!
Parents
  • Well, something you will learn pretty quickly is that C# is not particularly conducive to working with COM, just like C++, Objective C, and all the other "C" based languages. Unfortunately, it just wasn't a particularly high concern at the time of the design. VB, however, is pretty specifically designed with COM in mind for non-programmers to script automation of simple tasks in applications with an API. Whenever you hear hardcore C# programmers talking (or rather, complaining) about having to work with COM, they will generally mention the massive wrapper classes they have to write.

    In my spare time, I am (or should say 'was' since I don't know what spare time is anymore) developing a machine/robotic vision application, the interface to which is actually through COM. To make life easier, the camera manufacturer includes a utility that will generate a wrapper class for my specific model of camera and in my choice of a few different languages. Since I'm currently developing that application in C# (in Mono on a MacBook), that utility has been a Godsend.

    Edit: Here's a little PC-DMIS wrapper class for C# I picked up somewhere along the way: https://www.dropbox.com/s/o91x6gqkfwkuok7/H_Pcdmis.zip
Reply
  • Well, something you will learn pretty quickly is that C# is not particularly conducive to working with COM, just like C++, Objective C, and all the other "C" based languages. Unfortunately, it just wasn't a particularly high concern at the time of the design. VB, however, is pretty specifically designed with COM in mind for non-programmers to script automation of simple tasks in applications with an API. Whenever you hear hardcore C# programmers talking (or rather, complaining) about having to work with COM, they will generally mention the massive wrapper classes they have to write.

    In my spare time, I am (or should say 'was' since I don't know what spare time is anymore) developing a machine/robotic vision application, the interface to which is actually through COM. To make life easier, the camera manufacturer includes a utility that will generate a wrapper class for my specific model of camera and in my choice of a few different languages. Since I'm currently developing that application in C# (in Mono on a MacBook), that utility has been a Godsend.

    Edit: Here's a little PC-DMIS wrapper class for C# I picked up somewhere along the way: https://www.dropbox.com/s/o91x6gqkfwkuok7/H_Pcdmis.zip
Children
No Data