Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / April 2006

Tip: Looking for answers? Try searching our database.

convert unmanaged pointer to managed pointer?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan Baljeu - 13 Apr 2006 15:36 GMT
I have some C# code I want to use from C++.  One of the C# method's
parameters expects a COM interface (which was defined in a separate COM
component, which is used by both of my assemblies), but I can't seem to pass
a COM interface over to C# because I get error C2664:
   cannot convert parameter 1 from 'DesignServicesLib::IDsCadCallbacks *'
to 'DesignServicesLib::DsCadCallbacks __gc *'

But a straight pointer is what the COM component gives me, so I'm stuck.
(Of course if the C# assembly called that COM method to obtain a C#
reference, it would just work, but that doesn't help me.)

Ideas?
Alan Baljeu - 13 Apr 2006 18:41 GMT
>I have some C# code I want to use from C++.  One of the C# method's
>parameters expects a COM interface (which was defined in a separate COM
[quoted text clipped - 8 lines]
>
> Ideas?

If I replace  using "foo.dll" with #import "foo.dll", this problem goes
away.  What do you make of that?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.