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 / May 2006

Tip: Looking for answers? Try searching our database.

thiscall in .net interface

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lgs.lgs - 09 May 2006 13:15 GMT
I am trying to figure out whether a specific callback interface can be
implemented in .net.  I have done implementations for a number of
interfaces, but this one isn't cooperating.  My guess is that the problem is
due to this line from the method's docs:

This method uses the thiscall calling convention, rather than __stdcall.

The complete docs for the method are here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directshow/htm/
iamfiltergraphcallbackunabletorender.asp


I have seen the CallingConvention enum, but it only seems to apply to
DllImport, not COM interfaces or their methods.  Is there any way to
convince .NET to use thiscall when making the callback to this method?
cody - 19 May 2006 16:57 GMT
you cannot call c++ member methods from .net, just normal plain C functions.

>I am trying to figure out whether a specific callback interface can be
>implemented in .net.  I have done implementations for a number of
[quoted text clipped - 10 lines]
> DllImport, not COM interfaces or their methods.  Is there any way to
> convince .NET to use thiscall when making the callback to this method?
lgs.lgs - 20 May 2006 00:22 GMT
> you cannot call c++ member methods from .net, just normal plain C
> functions.

I'm not trying to call a c++ member method, I'm trying to get a c++ method
to call me.  The interface in question is used for call backs.

>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directshow/htm/
iamfiltergraphcallbackunabletorender.asp

I was not surprised to see my attempt to use this fail, since thiscall uses
a different method of passing params/cleaning the stack.  I was just
wondering if there were some way to convince c# to use this other calling
convention.

Near as I can tell, the answer is what you said: no.

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.