Alterego Posted February 20, 2005 Share Posted February 20, 2005 We would have to first enable SeRestorePriviledge for the process, then identify the thread performing the download, then invoke SuspendThread, and finally ResumeThreadSomething like the following..but I have no idea how to actually use DllCall...just reading documentationDllCall("kernel32.dll","int","SuspendThread","str",$thread)I used SysInternals Process Explorer to suspend my download program, and on resume it also resumed the download. I can also kill threads individually with it. For example, I can kill the thread producing the GUI (see the Scripts and Scraps forum) and the process will stay alive and continue downloading the file in the background. They must be using the methods mentioned above. I was able to get the following information about the thread. maybe it will help.ntdll.dll!KiFastSystemCallRetWS2_32.dll!WSARecv+0x61WSOCK32.dll!recv+0x33wininet.dll!HttpSendRequestA+0x51awininet.dll!HttpSendRequestA+0x484wininet.dll!HttpSendRequestA+0x423wininet.dll!Ordinal101+0x142wininet.dll!Ordinal101+0xf0wininet.dll!HttpSendRequestA+0x325wininet.dll!InternetReadFile+0x87fwininet.dll!InternetReadFile+0x1a5bwininet.dll!Ordinal101+0x142wininet.dll!Ordinal101+0xf0wininet.dll!InternetReadFile+0x19d9wininet.dll!InternetReadFile+0x1492wininet.dll!InternetReadFile+0x144bwininet.dll!Ordinal101+0x142wininet.dll!Ordinal101+0xf0wininet.dll!InternetReadFile+0x13dawininet.dll!InternetReadFile+0x1351wininet.dll!InternetReadFile+0x131bwininet.dll!Ordinal101+0x142wininet.dll!Ordinal101+0xf0wininet.dll!InternetReadFile+0x1b8downloader.exe+0xdcb4downloader.exe+0x29b70kernel32.dll!GetModuleFileNameA+0x1b4It looks like coding InetGet must have been fun. This dynamic web page is powered by AutoIt 3. Link to comment Share on other sites More sharing options...
Alterego Posted February 20, 2005 Author Share Posted February 20, 2005 anyone? is it possible? This dynamic web page is powered by AutoIt 3. Link to comment Share on other sites More sharing options...
Alterego Posted February 20, 2005 Author Share Posted February 20, 2005 55 views...could someone at least tell me if its possible to do this via dllcall or not before i run out of hair to pull? This dynamic web page is powered by AutoIt 3. Link to comment Share on other sites More sharing options...
this-is-me Posted February 21, 2005 Share Posted February 21, 2005 That call only works on 2k and above. No win98 support. Who else would I be? Link to comment Share on other sites More sharing options...
Valik Posted February 21, 2005 Share Posted February 21, 2005 It might work, but I think the odds are better that the connection will die resulting in an incomplete transfer. I also think that it's almost totally useless. Even if it did work, pausing a thread and resuming during the same session doesn't seem all that useful. Pausing/Resuming across sessions is something that would be uesful, but that's not possible with the current implementation. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now