Is it possible to increase the counter of RCW links on an unknown interface? (i.e. not counting references to the underlying COM object)
I have an old COM server code
int Method1(object comobject) {
try {
return 0;
}
finally {
Marshal.ReleaseComObject(comobject);
}
}
This code works fine, but now I need to call it from another method.
int Method2(object comobject) {
int result = Method1(comobject);
}
The type of co-object will change (therefore it is an object)
source
share