Connecting Tech Pros Worldwide Help | Site Map

ATL question

  #1  
Old November 7th, 2005, 08:15 PM
Michael Brown
Guest
 
Posts: n/a
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


  #2  
Old November 7th, 2005, 08:45 PM
Victor Bazarov
Guest
 
Posts: n/a

re: ATL question


Michael Brown wrote:[color=blue]
> 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#. [...][/color]

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

V
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
ATL question Grey Alien answers 2 July 27th, 2007 05:35 PM
How to compile ATL module with CLR Genady Beryozkin answers 13 July 3rd, 2006 09:35 AM
Using ATL Classes (especially ATL MFC Shared Classes) in a Win32 A Greg answers 3 November 17th, 2005 04:00 PM
ATL Question Fredrik Wahlgren answers 4 November 17th, 2005 03:59 PM