Connecting Tech Pros Worldwide Help | Site Map

ATL question

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 7th, 2005, 07:15 PM
Michael Brown
Guest
 
Posts: n/a
Default ATL question

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, 07:45 PM
Victor Bazarov
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.