Jump to content

Help With Dll's


Cross
 Share

Recommended Posts

Okay I know we can use the dll's in autoit because I've used them before but I'm sort of having a problem targetting specific process's with dlls. Some dll's are compiled to automatically target a specific process, but the one I'm trying to use isn't. Basically, here's what I'm trying to accomplish:

DllCall( "kernal32.dll", "none", "suspendprocess", "hwnd", $iop)

It was a, guess, to use a variable($iop) as the target process, and obviously it didn't work because I wouldn't have posted here. Any advice would be good, and if its in autoit3 beta, can I be pointed into the right direction with it?

-Cross.

Link to comment
Share on other sites

If that is exactly what you are trying to run, then this is a perfect example of why using English correctly is a good idea. First of all, it's kernel32.dll. Second, functions are case sensitive when using DllCall() and knowing the Windows naming conventions it would be "SuspendProcess". That being said, there is no such function "SuspendProcess" in kernel32 or any other Windows DLL so just what function are you trying to call?

Link to comment
Share on other sites

Damn I really feel like a retard right now. Well thanks for correcting my typo, and yes I was thinking it would have been case sensetive, what I'm mainly trying to do is suspend a process thats currently running, I thought that "SuspendProcess" would have been the correct function to use but I suppose I'm a little lost on that at the moment..

Link to comment
Share on other sites

I already have like 2 or 3 programs that can suspend processes/threads but I'm trying to make a program to do it automatically and stuff.. I don't want to USE another program to do it manually if you don't understand. :/

Link to comment
Share on other sites

That is one of the reasons you can use fileinstall and runwait instead of suspending every thread of a process. Suffice it to say that you have a long and hard road ahead of you if you are trying to do it specifically in autoit. You have to add the THREAD_SUSPEND_RESUME right to the autoit process, then get a list of all threads in the target process, then suspend all those threads, then reverse the process to resume the process. If you are really wanting to do this, then you should read the following:

http://msdn.microsoft.com/library/default....spendthread.asp

http://msdn.microsoft.com/library/default....cess_rights.asp

Who else would I be?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...