Click to See Complete Forum and Search --> : Interface pointer from Global Interface Table after network problem


rkarthik2k4
December 22nd, 2004, 05:34 AM
I co create an interface pointer with CoCreateInstanceEx() and I am storing this interface pointer in the Global Interface Table. Let us call this pInterace.

This interface pointer is used in a service (say in machine A), for accessing a windows service hosted in another machine (say B)

Whenever there is a need to use this pointer, I access it from the global interface Table using IGlobalInterfaceTable::GetInterfaceFromGlobal()

1. Assuming that there is a temporary network problem between A and B, will the pointer pInterace obtained from IGlobalInterfaceTable::GetInterfaceFromGlobal() after the network problem be valid?
2. I am asking this because I am consistently observing that using this pointer after a network problem is leading to an exception.

Regards
Karthik

marten_range
December 22nd, 2004, 05:57 AM
1. Assuming that there is a temporary network problem between A and B, will the pointer pInterace obtained from IGlobalInterfaceTable::GetInterfaceFromGlobal() after the network problem be valid?


I must admit that I don't know the _exact_ details of this but there is no guarantee that it will be valid after a network problem.

Hope this helps.

Btw. Global in this context means process global. The GIT is used to transfer interface pointers between different apartments in the process.