Yes, as far as DLLs are managed assemblies. Here is how:
System::Diagnostics::StackTrace^ stackTrace = gcnew System::Diagnostics::StackTrace();
int count = stackTrace->FrameCount;
for (int level = 0; level < count; level++) {
System::Diagnostics::StackFrame^ frame =
stackTrace->GetFrame(level);
System::Reflection::MethodBase^ method = frame->GetMethod();
System::Type^ type = method->GetType();
System::Reflection::Assembly^ assembly = type->Assembly;
System::String^ location = assembly->Location;
System::String^ name = method->Name;
}
Sorry if you find it a bit "sharpish" -- I just translated from my C# code and added a bit.
For more incite, see my article:
Wish You Were Here… Only Once[
^]
[EDIT]
Wait! I just realized, maybe we all answered not exactly your question.
It gives some ideas, but it may be not that.
If I'm right, the final answers will depend on many other factors. Please indicate:
1) Do you need information about managed assembly calls or also native unmanaged?
2) Can you modify those DLLs?
3) At what time do you want to obtain the names: if at the time of loading library/assembly -- this is trivial, if on each call -- may or may not be possible, depending on other factors.
4) How exactly do you load DLLs?
5) Do you need just first-level calls (from your project) or also all indirect calls?
5a) Do you want only DLLs directly loaded from your project or also indirectly loaded?
Thank you.
--SA