The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: nathanpc on October 09, 2009, 12:09:15 AM

Title: Progress In Command-Line
Post by: nathanpc on October 09, 2009, 12:09:15 AM
Hello,
I'm developing a test application to download files, but i want to know how i can put a progress bar in this command-line program to show the progress of the download, i don't know if it's possible to do this, but i hope i can, my test code to do this is here:
.386
.model flat,stdcall
option casemap:none
include \masm32\include\masm32rt.inc
include \masm32\include\urlmon.inc
includelib \masm32\lib\urlmon.lib

.code
start proc
    invoke URLDownloadToFile, NULL, chr$("http://website.assemblercode.com/masm32/m32v10r.zip"), chr$("D:\m32v10r.zip"), 0, 0
    inkey
    exit
start endp
end start


Best Regards,
Nathan Paulino Campos
Title: Re: Progress In Command-Line
Post by: jj2007 on October 09, 2009, 12:58:42 AM
Your last parameter is the key. Check MSDN (http://msdn.microsoft.com/en-us/library/ms775060(VS.85).aspx) and Jackal's post (http://www.masm32.com/board/index.php?topic=7667.msg56595#msg56595).
Title: Re: Progress In Command-Line
Post by: nathanpc on October 09, 2009, 01:10:56 AM
I was reading the MSDN article, but i don't know how to implement it in my project.

Regards.
Title: Re: Progress In Command-Line
Post by: jj2007 on October 09, 2009, 01:24:27 AM
I haven't done it myself, but Jackal seems to have gone pretty far. Check the attachment in his top post for this snippet.

OnProgressProc PROC lpThis:DWORD, ulProgress:DWORD,ulProgressMax:DWORD,ulStatusCode:DWORD,szStatusText:DWORD
   mov eax, E_NOTIMPL
   ret
OnProgressProc ENDP
Title: Re: Progress In Command-Line
Post by: nathanpc on October 09, 2009, 01:29:59 AM
I'm going to see it!

Thanks!
Title: Re: Progress In Command-Line
Post by: ragdog on October 10, 2009, 11:18:11 AM
Look in the genesysdownloader here on board
Title: Re: Progress In Command-Line
Post by: PBrennick on October 10, 2009, 03:52:59 PM
Thanks RagDog and, Nathan, I would be glad to help you with your little project if it is necessary. Just PM me. My presence is spotty but right now I am here.

Paul