Jump to content


Photo

Download Manager


  • Please log in to reply
170 replies to this topic

#1 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 10 February 2007 - 10:00 AM

This DLL allows you to download multiple files at the same time.

It has functions to get the total file size, Mime Type, total size downloaded and download status.

Screenshot:
(link removed)

(link removed)

Status: Used Visual Studio now instead of Dev-C++.
This does fix some errors.


Note: File size cannot be found by files that are "live" (files are generated while you are accessing them, like PHP scripts), because such scripts do not send file size headers.

Edited by h0bbel, 19 September 2013 - 06:54 PM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#2 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 10 February 2007 - 10:24 AM

Neat dll, works great. It was even faster than Fox-nl's script (and probably Toon-Master's too as they are GML scripts). Just a question, the handle is closed automatically when the download is complete?
  • 0

#3 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 10 February 2007 - 11:41 AM

Neat dll, works great. It was even faster than Fox-nl's script (and probably Toon-Master's too as they are GML scripts). Just a question, the handle is closed automatically when the download is complete?

<{POST_SNAPBACK}>


No, you have to use the close function.
But this function needs to be updated and I'll upload the new DLL after it.

Edited by h0bbel, 10 February 2007 - 11:48 AM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#4 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 10 February 2007 - 11:50 AM

Neat dll, works great. It was even faster than Fox-nl's script (and probably Toon-Master's too as they are GML scripts). Just a question, the handle is closed automatically when the download is complete?

<{POST_SNAPBACK}>


No, you have to use the close function.
But this function needs to be updated and I'll upload the new DLL after it.

<{POST_SNAPBACK}>


Ok, I updated the function.
Now the DM_CloseDownload (handle) function makes the output file ready to access and closes the download connection.
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#5 Toon-Master

Toon-Master

    Half-Toon Hero!

  • New Member
  • 340 posts

Posted 10 February 2007 - 01:56 PM

This probably has the potential to be pretty good.

At the moment I'm having trouble running your examples:
- For your GM6 example, when I run it it gives me, "Error Defining an external function".
- On the other hand the GM5 example works. But when I try to download something it locks up. It happens after I save the file (the save as dialog box).

The GM6 example is where the DLL is and GM5 example. So I'm not sure why it's happening. It's probably to do with my old computer specs, not too sure.

- Toon-Master

Edited by Toon-Master, 10 February 2007 - 02:02 PM.

  • 0
D: I'm sorry if I'm unavailable for answering questions through messaging on GMC.
-------------------------------------------------------------------
I love Leanny Basil, Heart on Artivale. You inspired me for so many years.

#6 Robot Freak

Robot Freak

    GMC Member

  • New Member
  • 271 posts

Posted 10 February 2007 - 02:00 PM

I like it!

You should make a cleanup function, so if the game is ended everything is closed.
Maybe you can make a function so when the game is ended, and the file isn't compete yet, it deletes it. Can be done in GML.
I also downloaded your CPU dll!
  • 0

#7 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 11 February 2007 - 06:57 PM

Is your site down? I can't download any dlls.

edit: Daniel-Dane it still does not work.

Edited by Sindarin, 11 February 2007 - 10:59 PM.

  • 0
GM 8.1 / GM:HTML5 User

#8 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 11 February 2007 - 07:40 PM

[quote name='Sindarin' date='Feb 11 2007, 07:46 PM']Is your site down?

<{POST_SNAPBACK}>

[/quote]:D+-->
QUOTE (Game Maker Creations - Forum Rules ::lmao::)
If the link does not work then use the user posted image button. You can PM the topic starter but do not post a reply saying that the link is down.[/quote]The link is working for me:
http://gm.hobbl.com/...loadmanager.rar

Oh, and a note to myself.
[quote]DO NOT post saying another user is breaking the rules. Use the Report System or else you're also spamming and breaking the rules[/quote]
  • 0

#9 digitalwar

digitalwar

    GMC Member

  • New Member
  • 321 posts

Posted 15 February 2007 - 05:43 PM

I get an "error defining external function" in the create evetn. I downloaded 3 times, still the same error . I unpacked all content in the same folder, the DLL is there, the name is correct but it give me this error . Why ?
  • 0
... ... ...

#10 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 16 February 2007 - 11:34 AM

same here... you made this in c++ and not a .NET language, right?
  • 0

Chris Matthews, Co-Leader of Digital X

#11 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 16 February 2007 - 11:41 AM

I just tried both the GM6 and GMD and they both work. I downloaded ark22 with it. Have you extracted it...?
  • 0

#12 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 16 February 2007 - 01:59 PM

yes, i have extracted it, and the DLL is in the directory, and the name is correct, but I still get an error "Unexpected error occurred while running game"
  • 0

Chris Matthews, Co-Leader of Digital X

#13 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 16 February 2007 - 02:10 PM

If you just have extracted it and started the example something must be wrong with your Game Maker installation. A reinstall could possibly fix it.

Oh wait, others have had problems too. Try the GMD.

Edited by Daniel-Dane, 16 February 2007 - 02:12 PM.

  • 0

#14 Lord Sturm

Lord Sturm

    Invader

  • New Member
  • 29 posts

Posted 16 February 2007 - 04:22 PM

It doesn't work for me. I'm getting the error defining an external function error with the gmd and the gm6.
  • 0

#15 Camman

Camman

    UnReal Software CEO

  • GMC Member
  • 639 posts
  • Version:GM:Studio

Posted 16 February 2007 - 07:31 PM

I am getting the same error as most people are. With the GMD and GM6
  • 0

#16 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 18 February 2007 - 02:33 PM

ok, all of h0bbels DLLs have the same error for me... both the GMD and GM6
  • 0

Chris Matthews, Co-Leader of Digital X

#17 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 02 March 2007 - 01:58 PM

It's really strange that people get all those errors.
Please try the gmd and open that gmd with Game Maker 5.3a.

This DLL is made with C++ and compiled with Bloodshed Dev-C++.
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#18 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 02 March 2007 - 05:13 PM

nope, still doesn't work, in gm5 and gm6
  • 0

Chris Matthews, Co-Leader of Digital X

#19 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 05 March 2007 - 08:58 PM

nope, still doesn't work, in gm5 and gm6

<{POST_SNAPBACK}>


Hm, what windows version are you using and what kind of processor do you have ?
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#20 Toon-Master

Toon-Master

    Half-Toon Hero!

  • New Member
  • 340 posts

Posted 06 March 2007 - 04:35 AM

As I said before I don't have problems defining an external function on GM5 but it locks up.

My processor is an Intel Pentium III 733mhz and I'm running Windows XP Pro SP2.

I hope my part of information can help you.

- Toon-Master

EDIT: Also I tried GM7 pro too, that errored as well.

Edited by Toon-Master, 09 March 2007 - 08:40 AM.

  • 0
D: I'm sorry if I'm unavailable for answering questions through messaging on GMC.
-------------------------------------------------------------------
I love Leanny Basil, Heart on Artivale. You inspired me for so many years.

#21 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 08 March 2007 - 06:42 PM

Windows XP Home SP2
Intel Celeron 2.8GhZ Processor (x86)

the DLLs still show errors in GM7 Pro as well...
  • 0

Chris Matthews, Co-Leader of Digital X

#22 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 11 March 2007 - 02:59 PM

Windows XP Home SP2
Intel Celeron 2.8GhZ Processor (x86)

the DLLs still show errors in GM7 Pro as well...

<{POST_SNAPBACK}>


Do you have c:\windows\system32\wininet.dll present ?
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#23 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 11 March 2007 - 05:45 PM

If that doesn't work try making a dummy room. That error is sometimes showed instead of the "real" error when it happens in the first room.

Edited by Daniel-Dane, 11 March 2007 - 05:46 PM.

  • 0

#24 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 11 March 2007 - 07:44 PM

ok, yes I have wininet.dll installed, I will try D-Dane's suggestion now and edit
  • 0

Chris Matthews, Co-Leader of Digital X

#25 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 11 March 2007 - 08:13 PM

I removed the __stdcall from the definition so it does not have double functions anymore, maybe this was causing the error.
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#26 Vertex Productions

Vertex Productions

    GMC Member

  • New Member
  • 126 posts

Posted 11 March 2007 - 08:15 PM

could re-upload it so i can download the fixed version plz :)
  • 0


Lewis Maitland

#27 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 11 March 2007 - 08:37 PM

could re-upload it so i can download the fixed version plz  :)

<{POST_SNAPBACK}>


I did ;)
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#28 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 12 March 2007 - 01:36 PM

ok i'll try removing the __stdcall when i get home... i take it i should replace it with cdecl?
  • 0

Chris Matthews, Co-Leader of Digital X

#29 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 12 March 2007 - 06:01 PM

ok i'll try removing the __stdcall when i get home... i take it i should replace it with cdecl?

<{POST_SNAPBACK}>


I meant in the source code, not in the GM file! :P
The gm file should still use stdcall.
Because stdcall is default used and I defined it too in the DLL functions so the functions in the DLL were doubled.

Normally I use this in my dlls:
extern "C" __declspec(dllexport) double

But I used this in this DLL:
extern "C" __declspec(dllexport) double __stdcall

The last one makes the doubles the number of functions doubled when you look into the functions with a resource viewer.

This is not causing problems on my PC, but maybe on others.

Edited by h0bbel, 12 March 2007 - 06:07 PM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#30 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 12 March 2007 - 06:38 PM

oh sorry, so can you fix it or what?
  • 0

Chris Matthews, Co-Leader of Digital X

#31 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 12 March 2007 - 07:02 PM

He said he already had.
  • 0

#32 Toon-Master

Toon-Master

    Half-Toon Hero!

  • New Member
  • 340 posts

Posted 13 March 2007 - 08:06 AM

Your fix did not work on GM6 or GM7 I still get the error.

But I guess the GM5 lock up issue fixed itself. It now does show the content type and downloads instead of freezing for a long time. Maybe I just didn't wait enough though.

- Toon-Master
  • 0
D: I'm sorry if I'm unavailable for answering questions through messaging on GMC.
-------------------------------------------------------------------
I love Leanny Basil, Heart on Artivale. You inspired me for so many years.

#33 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 13 March 2007 - 07:22 PM

still doesn't work
  • 0

Chris Matthews, Co-Leader of Digital X

#34 t6q4

t6q4

    GMC Member

  • New Member
  • 104 posts

Posted 14 March 2007 - 06:23 PM

Maybe a way to fix the lock up issue is to use io_clear() at game end.
Btw, error with gmd:

ERROR in
action number 1
of Draw Event
for object Controller:

Error in code at line 22:
 
["+TaskName [c]+"] speed: "+string (floor(DM_GetSpeed (TaskHandle [c])/1024))+" KBps / Completed: "+string(DM_GetProgress (TaskHandle [c])/TaskSize [c]*100)+"% / Status: "+Status;

at position 141: Division by 0.


Edited by t6q4, 14 March 2007 - 06:30 PM.

  • 0

#35 GM_JM

GM_JM

    GMC Member

  • New Member
  • 1 posts

Posted 16 March 2007 - 03:37 PM

I get the same error, with both GMD as GM6:

ERROR in
action number 1
of Draw Event
for object Controller:

Error in code at line 22:
   ["+TaskName [c]+"] speed: "+string (floor(DM_GetSpeed (TaskHandle [c])/1024))+" KBps / Completed: "+string(DM_GetProgress (TaskHandle [c])/TaskSize [c]*100)+"% / Status: "+Status;

at position 141: Division by 0.

After i solved this problem (just add 1 to TaskSize [c]) it only downloads 17 kb of the file (total size 2.15 MB)!
I use GM7 - can this be the problem?

Edited by GM_JM, 16 March 2007 - 03:37 PM.

  • 0

#36 Dukembg

Dukembg

    GMC Member

  • GMC Member
  • 144 posts
  • Version:GM:Studio

Posted 17 March 2007 - 10:27 PM

Doesn't work.

Error as everyone else...

Windows XP Home Edition
AMD Anthlon processor 2.4GHz

Other dlls work cept this one. Wierd... :P
  • 0
gmuser.jpg
 

#37 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 18 March 2007 - 12:12 AM

hmm... lol it ran on my laptop, which isn't connected to the WWW :P so that's ironic
  • 0

Chris Matthews, Co-Leader of Digital X

#38 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 18 March 2007 - 09:59 AM

I think I will make visual C++ of the Dev-CPP source and then compile it with Visual Studio to see if that changes anything.
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#39 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 18 March 2007 - 10:12 AM

I think I will make visual C++ of the Dev-CPP source and then compile it with Visual Studio to see if that changes anything.

<{POST_SNAPBACK}>


Ok, I recompiled my DLL using Visual Studio.
EDIT: And uploaded the new :)

I hope this makes any changes. :(

Edited by h0bbel, 18 March 2007 - 10:12 AM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#40 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 18 March 2007 - 10:46 AM

Still works for me. :(
  • 0

#41 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 18 March 2007 - 01:06 PM

Still works for me. :(

<{POST_SNAPBACK}>


Do you mean it already worked for you and the new DLL works as well ?
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#42 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 18 March 2007 - 01:13 PM

Yup, it has always worked.
  • 0

#43 Toon-Master

Toon-Master

    Half-Toon Hero!

  • New Member
  • 340 posts

Posted 18 March 2007 - 02:00 PM

Ok the new DLL works now for me on GM6. No external define errors anymore. Good job.

- Toon-Master
  • 0
D: I'm sorry if I'm unavailable for answering questions through messaging on GMC.
-------------------------------------------------------------------
I love Leanny Basil, Heart on Artivale. You inspired me for so many years.

#44 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 18 March 2007 - 04:09 PM

Ok the new DLL works now for me on GM6. No external define errors anymore. Good job.

- Toon-Master

<{POST_SNAPBACK}>


Ok, I'm glad to hear that the bug wasn't in my programming. :(
The compiler was the problem.
More of my DLLs had errors and I can see the link now.
So now I can fix more DLLs by changing the compiler.

Edited by h0bbel, 18 March 2007 - 04:09 PM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#45 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 18 March 2007 - 06:33 PM

Wow! It worked for me as well! Thanks, now I can see that this is a really great DLL!
  • 0

Chris Matthews, Co-Leader of Digital X

#46 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 19 March 2007 - 07:23 AM

Wow! It worked for me as well! Thanks, now I can see that this is a really great DLL!

<{POST_SNAPBACK}>


Thanks.

I will keep creating my DLLs with Visual Studio from now on.
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#47 dvvgames

dvvgames

    GMC Member

  • New Member
  • 47 posts

Posted 21 March 2007 - 09:39 PM

Just what I needed. Thx
  • 0

#48 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 03 April 2007 - 10:07 PM

It works like a charm except for a HUGE problem:
When using your method of getting percentage, some times it gets incorrect with small files. Lets say we are downloading a 116b file, the StartDownload() rounds it to a 1kb file. So when it starts counting progress like 60b it gets like: 60/1*100, which is 6000% [incorrect], there are two available fixes; you fixing the problem are me truncating the 6000% into 100% [still incorrect].
Regards,
Victor
  • 0

#49 Todd101scout

Todd101scout

    GMC Member

  • New Member
  • 82 posts

Posted 04 April 2007 - 12:43 AM

I just wanted u to know H0bbel that this works awesome and I am adding it to my game, Trap 4 (with credit), which I will be releasing this summer...Thanks!
  • 0

#50 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 04 April 2007 - 11:59 AM

It works like a charm except for a HUGE problem:
When using your method of getting percentage, some times it gets incorrect with small files. Lets say we are downloading a 116b file, the StartDownload() rounds it to a 1kb file. So when it starts counting progress like 60b it gets like: 60/1*100, which is 6000% [incorrect], there are two available fixes; you fixing the problem are me truncating the 6000% into 100% [still incorrect].
Regards,
Victor

<{POST_SNAPBACK}>


Don't you mean to say that the example rounds to 1 KB ?
Because the StartDownload does not round anything, it just returns size in bytes.

Edited by h0bbel, 04 April 2007 - 11:59 AM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.