I have the code:
foreach (var process in Process.GetProcesses()) {
if (process.ProcessName.ToLowerInvariant().StartsWith(\"iexplore\")) {
I have the same problem in my application, although I think you got it backwards (see may comment to your question).
Actually, it is not possible to enumerate the modules of 32bit process on 64bit Windows, if your own process is a 64bit process.
You'll only see the following modules (which are the only 64bit modules in the 32 bit process):
Which is most likely due to the fact that Process.Modules
uses the EnumProcessModules Win32 API internally, which has limitations when working with 32/64 bit. MSDN suggests (for native applications) to use EnumProcessModulesEx, which you could P/Invoke as well.
It looks like others have discovered this issue as well.