title: Preferred way of getting module filename of dll in C++/CLI
body: <p>I have a C++/CLI dll and I'd like to know what the preferred alternative to the Win32 API function <code>GetModuleFilename</code> would be. I've found <code>Assembly::GetExecutingAssembly()-&gt;ManifestModule-&gt;FullyQualifiedName</code> (<a href="http://msdn.microsoft.com/en-us/library/system.reflection.assembly.manifestmodule.aspx" rel="nofollow">MSDN</a>). This seems to be working, but I'd like to know if there's a different or "better" way. Of course, I know that technically nothing prohibits me from using <code>GetModuleFilename</code> directly, but I hate mixing different APIs and this would also require to create a string buffer which I'd then have to convert back into a <code>System::String</code>. I know it's only two more lines of code but still ... ;-)</p>