Hey everyone, can anyone direct me to an API that will get me the PID from a process name? (e.g. "notepad.exe")
I can't use the FindWindowA method as the program I'm dealing with draws no windows...
Type: Posts; User: int3
Hey everyone, can anyone direct me to an API that will get me the PID from a process name? (e.g. "notepad.exe")
I can't use the FindWindowA method as the program I'm dealing with draws no windows...
I'm trying to emulate mouse input on an application using DirectX to draw the graphics and the API I have chosen is mouse_event (please don't tell me about SendInput unless it has a direct relation...
Forgive me for my ill placement of this topic, I'm not decisive enough :P
Thank you once again for your support zacs7, this is the third time! I'll try the code under another environment to see if...
I'm trying to emulate mouse input on an application using DirectX to draw the graphics and the API I have chosen is mouse_event (please don't tell me about SendInput unless it has a direct relation...
zacs7, I plan to make a small program that will combat my friend's program :P (reasoning behind it)
I noticed a small but in the dialog which was having messages posted to it. (msWin to mWin) I...
I'm pretty sure it isn't, nonetheless I think I have pin-pointed my problem. Will be back to tell results D:
Sorry to interject, is that the C equivalent for the ASM command SHR?
zacs7, thanks for you ongoing support but it appears I made a typo :P
The program doesn't input anything into the window/application I specified.
Thanks again zacs7! (second time you've helped me)
Now the code parses correctly with no errors but it doesn't actually output anything :P
#include <stdio.h>
#include <windows.h>
HANDLE...
Doesn't work, thanks for the replies however :)
sprintf(buff, "%04d", spam);
PostMessage((HWND) msWin, WM_CHAR, buff,(LPARAM)0);
Worked great :) Thank you to all who answered my question! I have one last one before I run off into the shadows :P How do I implement this with a WinAPI? (e.g. MessageBoxA)
Well, I have a number that I wish to stay at four digits and I have no idea as to how to keep an integer stick to such a scheme.
#include <stdio.h>
int main(void)
{
int number = 0000;...
I posted the actual copy a few posts ago (#7)
http://cboard.cprogramming.com/showpost.php?p=636512&postcount=7
I'm already aware of the issues that I will have, I just can't seem to get past...
The program initially looks to see if a backup of the file in question exists;
if(fopen("C:/test2", "r") != 0)
If one doesn't then a backup is made and a new one is made with certain text;
...
I inverted the IF conditions and I still get the same issue.
Either way, it would end up going one way or another even though it wouldn't execute the renaming function. So before I can even consider that, I must get past the original IF statements.
Sorry for the double post but it appears that it did not work after-all. (should have compiled before i opened my mouth) Can anyone suggest another API that would offer what I need?
EDIT: I tried...
I just saw my mistake before I refreshed this thread :P Thank you very much however, you're all quite a lovely & helpful bunch.
Take care & my regards :)
Thank you very much zacs7, the code worked perfectly. I didn't know there needed to be to be braces between the if statements, I'm too used to pseudo :P
I now have a secondary error however, the...
#include <stdio.h>
int main ()
{
FILE * pFile;
if( rename( "C:/test2", "C:/test1" ) != 0 )
rename( "C:/test1", "C:/test2" );
pFile = fopen ("C:/test1","w+");
fputs ("1...