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:
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))
;____________________________________________________________________________________________________________________
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/
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 ;/
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.
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?
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.
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?
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 :)