M
Michael Brown
Sup ya'll.. got an interesting question, I can't figure out if I'm on crack
or if ATL is messing with me. I'm not *completely* comfortable with C++ and
am primarily a C# and old-school C++ developer..
I've got a hardware device with a library written as a C++ lib. I need to
acess it from C#. So I created a C++ ATL Project in VS 2005 Beta 2 that acts
as a wrapper to the C++ lib. Everything seems to work ok, except:
I need to create 4 instances of the wrapper in C#, which each address a
seperate hardware device (PTZ controller). When I do that, all instances of
the object point to the hardware device specified in the last instance of
the object created, as if my wrapper is somehow overwriting the pointers
instead of being created as unique objects? (Did I explain that right?)
I can't figure out what I'm doing wrong, it's as if each time I create a new
instance of my ATL object, it's all referencing a single object inside the
wrapper?
-Mike
or if ATL is messing with me. I'm not *completely* comfortable with C++ and
am primarily a C# and old-school C++ developer..
I've got a hardware device with a library written as a C++ lib. I need to
acess it from C#. So I created a C++ ATL Project in VS 2005 Beta 2 that acts
as a wrapper to the C++ lib. Everything seems to work ok, except:
I need to create 4 instances of the wrapper in C#, which each address a
seperate hardware device (PTZ controller). When I do that, all instances of
the object point to the hardware device specified in the last instance of
the object created, as if my wrapper is somehow overwriting the pointers
instead of being created as unique objects? (Did I explain that right?)
I can't figure out what I'm doing wrong, it's as if each time I create a new
instance of my ATL object, it's all referencing a single object inside the
wrapper?
-Mike