ATL question

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
 
V

Victor Bazarov

Michael said:
Sup ya'll.. got an interesting question, I can't figure out if I'm on crack
or [...]

I've got a hardware device with a library written as a C++ lib. I need to
acess it from C#. [...]

Wrong newsgroup. Try 'microsoft.public.dotnet.languages.csharp' or some
such.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,951
Messages
2,570,113
Members
46,698
Latest member
alexxx

Latest Threads

Top