elfenliedtopfan5
Member
- Joined
- Feb 9, 2023
- Messages
- 16
- Programming Experience
- 10+
Good Morning,
so i have a little issue that i have run into well least i think this is the problem,
so have tryied the basic,
very basic one however i had issue it did not return anything so thought i would check names
so tryied the following,
witch also returned false,
so thought i would check details and see what application is called there,
and found in details its called,
HydraMobile.exe
so i created another methord,
and then passed in HydraMobile.exe
however still would not find it,
so did some more searching and noticed it could be because its in 32 bit app,
now my program is a anycpu and that has to be like that because i need it to run on both 32 and 64 bit os ,
my question is is it possible to access a 32bit process and stop and start it in a 64 bit os ?
kind regards,
elfenliedtopfan5
so i have a little issue that i have run into well least i think this is the problem,
so have tryied the basic,
check if process exists:
Process[] processes = Process.GetProcessesByName("HydraMobile.exe");
if (processes.Length > 0)
processes[0].CloseMainWindow();
very basic one however i had issue it did not return anything so thought i would check names
so tryied the following,
attempt 2:
public bool checkIfProcessIsRunning()
{
Process[] processes = Process.GetProcesses();
foreach (Process process in processes)
{
if (process.ProcessName.ToLower().Contains("HydraMobile v3.11"))
{
return true;
}
else
{
return false;
}
}
return false;
}
witch also returned false,
so thought i would check details and see what application is called there,
and found in details its called,
HydraMobile.exe
so i created another methord,
Attempt 3:
public string GetProcessPath(string name)
{
Process[] processes = Process.GetProcessesByName(name);
if (processes.Length > 0)
{
return processes[0].MainModule.FileName;
}
else
{
return string.Empty;
}
}
and then passed in HydraMobile.exe
however still would not find it,
so did some more searching and noticed it could be because its in 32 bit app,
now my program is a anycpu and that has to be like that because i need it to run on both 32 and 64 bit os ,
my question is is it possible to access a 32bit process and stop and start it in a 64 bit os ?
kind regards,
elfenliedtopfan5