VerpinZal
VerpinZal
CC#
Created by VerpinZal on 5/3/2024 in #help
Attempting to retrieve a Windows process name causes Access Violation Exception.
since it's debug, shouldn't it be devenv.exe?
12 replies
CC#
Created by VerpinZal on 5/3/2024 in #help
Attempting to retrieve a Windows process name causes Access Violation Exception.
through debug
12 replies
CC#
Created by VerpinZal on 5/3/2024 in #help
Attempting to retrieve a Windows process name causes Access Violation Exception.
checked task manager, processId is my app's id, trying to launch
12 replies
CC#
Created by VerpinZal on 5/3/2024 in #help
Attempting to retrieve a Windows process name causes Access Violation Exception.
No description
12 replies
CC#
Created by VerpinZal on 5/3/2024 in #help
Attempting to retrieve a Windows process name causes Access Violation Exception.
process id is not null
12 replies
CC#
Created by VerpinZal on 5/3/2024 in #help
Attempting to retrieve a Windows process name causes Access Violation Exception.
it's null
12 replies
CC#
Created by VerpinZal on 5/3/2024 in #help
Attempting to retrieve a Windows process name causes Access Violation Exception.
No description
12 replies
CC#
Created by VerpinZal on 12/22/2023 in #help
Auto-translation, HttpClient, Result, await...
thanks a million!
31 replies
CC#
Created by VerpinZal on 12/22/2023 in #help
Auto-translation, HttpClient, Result, await...
apparently no reading documentation is enough
31 replies
CC#
Created by VerpinZal on 12/22/2023 in #help
Auto-translation, HttpClient, Result, await...
i'll do some reading
31 replies
CC#
Created by VerpinZal on 12/22/2023 in #help
Auto-translation, HttpClient, Result, await...
probably
31 replies
CC#
Created by VerpinZal on 12/22/2023 in #help
Auto-translation, HttpClient, Result, await...
😄
31 replies
CC#
Created by VerpinZal on 12/22/2023 in #help
Auto-translation, HttpClient, Result, await...
this is a winform app
31 replies
CC#
Created by VerpinZal on 12/22/2023 in #help
Auto-translation, HttpClient, Result, await...
To be perfectly honest, i get the same error while trying to retrieve the process name that launched the application, but that's another story
31 replies
CC#
Created by VerpinZal on 12/22/2023 in #help
Auto-translation, HttpClient, Result, await...
No description
31 replies
CC#
Created by VerpinZal on 12/22/2023 in #help
Auto-translation, HttpClient, Result, await...
it's GdiPlus.dll exception, access violation at reading address 0x0000000000
31 replies
CC#
Created by VerpinZal on 12/22/2023 in #help
Auto-translation, HttpClient, Result, await...
I will look into all of the things mentioned, thank you very much!
31 replies
CC#
Created by VerpinZal on 9/19/2023 in #help
Is there a way to determine if a Winforms .exe is run by double clicking on it on Windows explorer?
also for further future reference, including the necessary assembly instruction at the top of the code somehow doesn't work, one needs to right click on the project dependencies tree, click on "Add project reference", and then select System.Management from the resulting window.
14 replies
CC#
Created by VerpinZal on 9/19/2023 in #help
Is there a way to determine if a Winforms .exe is run by double clicking on it on Windows explorer?
after that,
parent.processName
parent.processName
yields the desired result, either as "explorer", or "ModOrganizer".
14 replies
CC#
Created by VerpinZal on 9/19/2023 in #help
Is there a way to determine if a Winforms .exe is run by double clicking on it on Windows explorer?
var processId = Process.GetCurrentProcess().Id;
var queryFromId = string.Format("SELECT ParentProcessId FROM Win32_Process WHERE ProcessId = {0}", processId);
var searchById = new ManagementObjectSearcher("root\\CIMV2", queryFromId);
var idResults = searchById.Get().GetEnumerator();
idResults.MoveNext();
var queryObject = idResults.Current;
var parentId = (uint)queryObject["ParentProcessId"];
var parent = Process.GetProcessById((int)parentId);
var processId = Process.GetCurrentProcess().Id;
var queryFromId = string.Format("SELECT ParentProcessId FROM Win32_Process WHERE ProcessId = {0}", processId);
var searchById = new ManagementObjectSearcher("root\\CIMV2", queryFromId);
var idResults = searchById.Get().GetEnumerator();
idResults.MoveNext();
var queryObject = idResults.Current;
var parentId = (uint)queryObject["ParentProcessId"];
var parent = Process.GetProcessById((int)parentId);
14 replies