Login

 

Site Menu

How to find if a process exists by it's executable filename

How do you find out if a process exists by its executable filename? Unfortunately there isn't a simple way to do this with Windows API. To accomplish this you will have to enumerate all of the processes using CreateToolhelp32Snapshot. You also may not see every process depending on what user you're running as. For most, this gets the job done. Feel free to use this and change it to fit your needs.

Add a comment

Read more ...

How to make RegEnumValue vector friendly

I often get some fun challenges from coders looking for help in the #winapi channel I frequent on freenode. The coder today was looking for a way to get the output from RegEnumValue and values of type REG_SZ into a vector. Start by creating a Win32 project. In your stdafx.h here's what we need to include:

Add a comment

Read more ...

How to use EndTask

Recently someone in the #winapi channel I frequent ask about EndTask. It doesn't seem to be declared in windows.h. Well, it was a late comer to the API after Windows XP and it doesn't even seem to be in windows.h for Visual Studio 2012's included SDK either.

Add a comment

Read more ...

Using GetProcAddress is not as hard as it seems

Recently a user in the irc channel I frequently visit had some trouble understanding this, so I decided it would be a simple thing to show that others could benefit. Using GetProcAddress is really quite simple, but the way you declare the function you're getting often looks alien to a beginner.

Add a comment

Read more ...