GetWebFile.dll

Published  Aug 08, 2010
Updated  Aug 09, 2010

Description

Image
This is a dll for mIRC that is capable of downloading pictures, music, video, web pages and much more.
This is much faster and more efficient than using mIRC sockets.

Use:

  • Extract the zip file to your mircdir ( //echo -a $mircdir )
  • Type /load -rs GetWebFile.mrc
  • Try one of the examples
  • /getmycarddeck (Will download card images)
  • /getmyjokes (Will echo a Joke)

Example Scripts:

Example 1 Demonstrates how you can quickly download all the pictures needed for a script by downloading the images for a deck of cards.

Example 2 Demonstrates how you can use this dll instead of sockets to copy a web page to a file and parse the information.

I will include this section of code here in the description because it will be very helpful no matter what you use this dll for.
Instructions for the code are in the comments.

;Syntax $GetWebFile(http://full/path/to/filefilename.ext,X:\destination\directory\including\filename.ext)
;**Note** that this dll will not create the destination directory for you.
;If the directory doesn't exist the transfer will fail!
alias GetWebFile {
  if ($dll($GWFLocation,GetWebFile,$1 $2)) return 1
  else return 0
}
;Syntax $GetWebHeader(http://full/path/to/filefilename.ext,X:\destination\directory\including\filename.ext)
alias GetWebHeader {
  if ($dll($GWFLocation,GetWebHeader,$1 $2)) return 1
  else return 0
}
;*
;Edit this alias to reflect the location of GetWebFile.dll
alias GWFLocation return $qt($+($mircdir,GetWebFile.dll))
;____________________________________________________________________________________________________________________

Download

Filename
Size
Date
Downloads
43.78 KB
Aug 09, 2010
26

Comments

Sign in to comment.
  -  May 22, 2013

love the dll and it is much faster than using mirc to download.
I have run into a bug though. It seems the dll does NOT like mobile sites.
Example: http://m.imdb.com/title/tt0109068/
The dll works fine with the regular site though: http://www..imdb.com/title/tt0109068/

 Respond  
FordLawnmower   -  Aug 16, 2010

I had no luck getting 2005 running with 2008 installed. I'm sure there is a way to get mirc to see inside the class and find the function with 2008, I just don't know what it is.
I'll mess with it a little more when I get some time and see if I can figure it out. If VB6 didn't make it so easy I would probably already have the answer. No idea why MS would dump a project like that ;/

 Respond  
Jonesy44   -  Aug 16, 2010

Oh okay brilliant! thanks for the help. I'll give it a go, get 2005 running somehow i hope! :)

 Respond  
FordLawnmower   -  Aug 10, 2010

Well, I can look into it but I tried a few times and couldn't get 2008 to make a dll that would work with mIRC because it forces you to put the function inside the class. This caused mIRC to give me a function not found error ;/As far as I know, it should look like this:

Public Function RTRN(ByVal mWnd As Long, ByVal hWnd As Long, ByVal data As String, ByVal params As String, ByVal show As Boolean, ByVal nopause As Boolean)
        data = "return value here"
        Return 3
    End Function

The function should return the value of "data" to mIRC and returning "3" tells mIRC to return that value to the script inside $com()
So if you did //echo -a $com(mydll.dll,RTRN,ThisTextWillBeSentToTheFunctionIn"data")
It should echo -->> return value here.

 Respond  
Jonesy44   -  Aug 10, 2010

Unfortunately, i think you're right. Shame. I use .NET 2008 for my school projects. But they're all local (no internet) although i have made a few simple online programs but very basic. And the only DLL's i've made have been VB routines/funct's. So like Search() etc.. how would i turn that into a mirc dll routine??

For example,

Function RTRN (ByVal ValueToReturn As String)
   Return ValueToReturn
End Function

or am i not looking at this right?

 Respond  
FordLawnmower   -  Aug 10, 2010

I'll add the source to the package after I'm sure I'm done changing it and I've cleaned up the code a little. I also need to properly comment it.
VB6 is no longer supported by ms :(
It's sad because it can do so many things easily with VB6 and it doesn't need .net.
I've managed to make a $com dll with vb 2005 but I've had no luck getting it to register when compiled with 2008. I'm not real happy with the vb.net changes. I wish they would just make a vb-.net or just make VB6 open source.
That will never happen though. MS is way to greedy.

 Respond  
Jonesy44   -  Aug 10, 2010

Alrighty. I've compiled a .dll file in vb.net for use of .exe files.. But i didn't really know where to start on mirc .dll's. is vb6 still supported? or is it just old software, that happens to still be of use?

I'm suprised MS suddenly bring out .net which appears brilliant but lacks significant functions like winsock etc. thanks for the dll anyway man. is the source for the dll in the package?

 Respond  
FordLawnmower   -  Aug 10, 2010

I agree jonesy44 but this will sort a lot of files that I've been unable to download with sockets. I've also had problems dealing with chunked data when downloading with mIRC sockets. So far I've had no problems dealing with chunked data when using this dll.
If there is a good solution for dealing with chunked data in mIRC sockets, I haven't found it yet. Someone please enlighten me, haha :)
I put this together with a older VB compiler but I've found that the easiest thing to use is VB6. (If you can get a copy of it) Microsoft wants everyone to be dependent on dot net.
If you are making a $com dll it's really easy to do with VB6.
For a regular $dll like this one, you should be able to make one with any language that has a compiler capable of making a dll.

The key to getting it to work with mirc is defining the function to accept the arguments that mIRC sends automatically when you make a call to $dll()

From the mIRC help file:

The routine in the DLL being called must be of the form:

int __stdcall procname(HWND mWnd, HWND aWnd, char data, char parms, BOOL show, BOOL nopause)


That line works for C but it has to be adjusted somewhat for other languages.

Thanks for the comments jonesy44 :)

 Respond  
Jonesy44   -  Aug 10, 2010

I fucking love this man. My only gripe is.. The brilliance of a script downloader is that you don't need any files at all. For this reason i still use scripts however, a script to download this dll first wouldnt be a bad idea :)

Major props for this. What did you write the dll with??

 Respond  
FordLawnmower   -  Aug 09, 2010

I added a needed function to this dll to get the headers for a page or file. It writes the headers to the supplied filename.
This will be useful if you need to check for a pages existence or get some information like filetype, filesize etc.
I'll post an example for this a little later.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.