GetModuleFileNameEx

[DllImport("coredll.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern uint GetModuleFileNameEx(
   IntPtr hProcess,
   IntPtr hModule,
   StringBuilder lpFilename,
   uint nSize
);

Microsoft documentation: Link

Last updated