marshall interface needed?

This is a discussion on marshall interface needed? within the Windows Programming forums, part of the Platform Specific Boards category; Hello everyone, When we have cross-apartment call (inside one process) from ... to ..., 1. STA --> MTA; 2. MTA ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    marshall interface needed?

    Hello everyone,


    When we have cross-apartment call (inside one process) from ... to ...,

    1. STA --> MTA;
    2. MTA --> STA.

    In both cases we must use either GIT (global interface table) or CoMarshalInterThreadInterfaceInStream?

    If call method on destination apartment through interface pointer of component of destination apartment directly is violation (bypass the above two methods)?

    (for example, sharing raw interface pointer directly in global variable and call methods on interface pointer directly)


    thanks in advance,
    George

  2. #2
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,262
    Hi George2.
    I'm having a little trouble understanding your English for this one.

    But, yes afaik you are supposed to use one of the above two methods for cases 1 & 2.

    Although the immediate call might work if you bypass those methods, who knows what might happen when that function goes to call out to something else.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks iMalc,


    Sorry for my bad English description. :-)

    Let me do some simple confirmation.

    1.

    Quote Originally Posted by iMalc View Post
    Hi George2.
    But, yes afaik you are supposed to use one of the above two methods for cases 1 & 2.
    You mean if we call from STA to MTA (or call from MTA to STA), we either use GIT (global interface table) or CoMarshalInterThreadInterfaceInStream? No 3rd "correct" solution according to COM standard?

    2.

    Quote Originally Posted by iMalc View Post
    Although the immediate call might work if you bypass those methods, who knows what might happen when that function goes to call out to something else.
    You mean if we call from STA to MTA (or call from MTA to STA), if we do not use the above two approach mentioned in (1), and choose to call from interface pointer directly, it is not correct coding in COM?


    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to get RSSI value, send to sensor, sensor receive package, repackage it?
    By techissue2008 in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-04-2009, 09:13 AM
  2. Calling IRichEditOle interface methods
    By Niara in forum C Programming
    Replies: 2
    Last Post: 01-16-2009, 12:23 PM
  3. OOP in C
    By lyx in forum C Programming
    Replies: 4
    Last Post: 11-23-2003, 12:12 PM
  4. GUI (Graphical User Interface) Help Needed
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 10-11-2001, 10:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21