Click here to Skip to main content
15,913,669 members
Home / Discussions / COM
   

COM

 
GeneralRe: Get the caller thread Id of a marshalled interface Pin
4-Jul-02 21:50
suss4-Jul-02 21:50 
GeneralRe: Get the caller thread Id of a marshalled interface Pin
Len Holgate4-Jul-02 22:22
Len Holgate4-Jul-02 22:22 
GeneralRe: Get the caller thread Id of a marshalled interface Pin
4-Jul-02 22:43
suss4-Jul-02 22:43 
GeneralRe: Get the caller thread Id of a marshalled interface Pin
Len Holgate4-Jul-02 22:49
Len Holgate4-Jul-02 22:49 
GeneralRe: Get the caller thread Id of a marshalled interface Pin
4-Jul-02 23:29
suss4-Jul-02 23:29 
GeneralRe: Get the caller thread Id of a marshalled interface Pin
Len Holgate5-Jul-02 0:05
Len Holgate5-Jul-02 0:05 
GeneralRe: Get the caller thread Id of a marshalled interface Pin
5-Jul-02 0:13
suss5-Jul-02 0:13 
GeneralRe: Get the caller thread Id of a marshalled interface Pin
Len Holgate6-Jul-02 0:57
Len Holgate6-Jul-02 0:57 
Anonymous_com wrote:
well, you can imagine this scenario as a super marshal :
certain threads cannot perform some operation
on certain methods. This could be achieved splitting the interface
but at the moment it's impossible


What I find difficult to reconcile is the fact that the knowledge of when the operation can safely be called by a particular thread is being placed in the object, rather than in the thread. If the thread deals with this issue then your problem goes away. The ideal solution is splitting the interface as you say. If that's not possible then personally I'd prefer to put the code that decides if the call is allowable or not on the caller's side of the interface rather than on the object's side. Doing it the way you're doing at the moment is likely to come back and bite you at a later date Frown | :(

Not amazingly helpful advice I know Wink | ;) but I usually find it's worth dealing with the pain of these kinds of problems straight away - ie refactor the interface and adjust the design - rather than patching in a quick fix and finding myself with strangeness occurring just as I'm about to ship the product.

This code from Dharma Shukla's CoHack pages might help.

Len Holgate
www.jetbyte.com
The right code, right now.
GeneralKill a non-responsive COM Object Pin
Anders Molin2-Jul-02 1:18
professionalAnders Molin2-Jul-02 1:18 
GeneralRe: Kill a non-responsive COM Object Pin
Rama Krishna Vavilala2-Jul-02 6:35
Rama Krishna Vavilala2-Jul-02 6:35 
GeneralRe: Kill a non-responsive COM Object Pin
soptest2-Jul-02 12:32
soptest2-Jul-02 12:32 
QuestionHow to use an OCX Pin
yuval30-Jun-02 21:02
yuval30-Jun-02 21:02 
AnswerRe: How to use an OCX Pin
Ernest Laurentin1-Jul-02 8:49
Ernest Laurentin1-Jul-02 8:49 
GeneralChange path of an open Windows File Open/Save common dialog Pin
Jonatan Dahl30-Jun-02 12:33
Jonatan Dahl30-Jun-02 12:33 
GeneralEnlist the Transaction of two transactional com+ object Pin
Lizp28-Jun-02 22:51
Lizp28-Jun-02 22:51 
GeneralOverwriting COM Pin
28-Jun-02 4:38
suss28-Jun-02 4:38 
GeneralRe: Overwriting COM Pin
soptest28-Jun-02 9:20
soptest28-Jun-02 9:20 
GeneralRe: Overwriting COM Pin
28-Jun-02 18:31
suss28-Jun-02 18:31 
GeneralRe: Overwriting COM Pin
Ramu Pulipati29-Jun-02 4:15
Ramu Pulipati29-Jun-02 4:15 
GeneralRe: Overwriting COM Pin
Sam Hobbs1-Jul-02 13:50
Sam Hobbs1-Jul-02 13:50 
GeneralATL - Class Factory and Interface Implementation Seperation Pin
Marc Bednar27-Jun-02 9:57
Marc Bednar27-Jun-02 9:57 
GeneralFiring an event from an MFC ActiveX control Pin
twomagiclovers27-Jun-02 8:59
twomagiclovers27-Jun-02 8:59 
GeneralRe: Firing an event from an MFC ActiveX control Pin
Ernest Laurentin27-Jun-02 19:29
Ernest Laurentin27-Jun-02 19:29 
GeneralSimple Srting Conversion Pin
Ryan B.27-Jun-02 5:19
Ryan B.27-Jun-02 5:19 
GeneralRe: Simple Srting Conversion Pin
Ernest Laurentin27-Jun-02 19:27
Ernest Laurentin27-Jun-02 19:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.