:8Xayd.3$Tg5.67@news.oracle.com...
> Hi Expert,
[quoted text clipped - 5 lines]
> Thanks,
> GP.
Thanks for your reply,
But the problem here is different, due to some valid reason I can't modify
the signature of unmanaged call, In my appdomain there may be more than one
or more assemblies loaded and each may try to call unmanaged function
concurrently and based on the caller of the assembly I need to perform some
operation in my unmanaged function. I know that using managed & unmanaged
call stack trace I can retrieve the assembly name, but this is very lengthy
procedure. I looking for more easy way to do the same!!!
-GP
> Hello GP,
> Perhaps you may get the assebmly name on the managed side, then pass it by
[quoted text clipped - 11 lines]
> > Thanks,
> > GP.
David Levine - 23 Dec 2004 11:14 GMT
If you cannot add an argument to the method signature to identify the caller
then you are left with walking the stack to determine the caller. This is
expensive (i.e. non-performant) but if it is your only option, there you
are. You can cache the results so that further calls can be quickly looked
up.
Your best solution is to modify the unmanaged call signature.
> Thanks for your reply,
>
[quoted text clipped - 28 lines]
>> > Thanks,
>> > GP.