mIRC Home    About    Download    Register    News    Help

Print Thread
#5763 10/01/03 02:18 AM
Joined: Jan 2003
Posts: 1
T
Mostly harmless
OP Offline
Mostly harmless
T
Joined: Jan 2003
Posts: 1
are there any dlls out there that compile in VC++ that i can just check out to figure out how MIRC dlls work? sorry if this has been asked 1000 times. i tried a search but the hits seemed useless :-/

#5764 10/01/03 03:32 AM
Joined: Jan 2003
Posts: 6
P
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
P
Joined: Jan 2003
Posts: 6
Take a look at the links that GrimZ posted in the topic 'Memory-mapped file and SendMessage' in this forum.

/ pDude

#5765 10/01/03 03:45 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Necroman has a tutorial at http://necroman.wot.net/dllhelp.htm which may be usefull to you.

#5766 10/01/03 12:37 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
There are also alot of useful opensource DLLs here.

Joined: Jan 2003
Posts: 14
B
Pikka bird
Offline
Pikka bird
B
Joined: Jan 2003
Posts: 14
1.)
Open VC++ and go to File > New.
Choose Win32 Dynamic-Link Library in the dialog that opens and change the path to C:\My DLLs\.
Enter your project name as HelloWorld And click on OK.



2.)
In the new dialog that opens, choose An empty DLL project. and click on Finish.



3.)
Click OK on the next dialog that opens :tongue:


4.)
Go to File > New.
Choose C++ Source File and enter HelloWorld as a File name and click on OK.



5.)
In the new window that opens, write this;
Code:
[color:blue]#include[/color] <windows.h>

[color:blue]#define[/color] Do(x) [color:blue]extern[/color] "C" [color:blue]int[/color] WINAPI x(HWND mWnd, HWND aWnd, [color:blue]char[/color] *data, [color:blue]char[/color] *parms, BOOL show, BOOL nopause)
[color:blue]#define[/color] Say(x) wsprintf(data,x); [color:blue]return[/color] 3;
 
Do(HelloWorld) {
	Say("Hello World!");
}



6.)
Go to File > New.
Choose Text File and enter HelloWorld.def as File name and click on OK.



7.)
In the new window that opens, write this;
Code:
LIBRARY HelloWorld
 
EXPORTS
HelloWorld = _HelloWorld@24



8.)
Press F7 or go to Build > Build HelloWorld.dll to compile the DLL.
Go to C:\My DLLs\HelloWorld\Debug\ to find your dll and put it in your mIRC folder.
From mIRC do //echo -a $dll(HelloWorld.dll,HelloWorld,0)
(or if you don't copy the DLL; //echo -a $dll(C:\My DLLs\HelloWorld\Debug\HelloWorld.dll,HelloWorld,0))


Additional.)
There are also several ways to optimize the filesize of the DLL, one is to go to Build > Configurations...
and choose Win32 Release, then pressing Close to choose it.
You can also enter;

#pragma check_stack(off)
#pragma comment(linker,"/OPT:NOWIN98")

at the top of the file somewhere.
And if it compiles to slowly, try adding;

#define WIN32_LEAN_AND_MEAN

somewhere at the top too.
Hope this helps!


Sincerely,
babyorphan, #Lobby @ geekIRC
-------
bOS2 - IRC client
version; 1.07
#5768 10/01/03 06:15 PM
Joined: Dec 2002
Posts: 89
N
Babel fish
Offline
Babel fish
N
Joined: Dec 2002
Posts: 89
Most good DLLs on scripting sites are open-source, which is wonderful for learning and sharing ideas. I'm sure you can get a lot of useful tricks just by looking at the code.

Your specific questions are welcome - we like to solve puzzles here smile


Sincerely,
Necroman, #mIRC @ Undernet
#5769 10/01/03 06:29 PM
Joined: Jan 2003
Posts: 150
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
Where can I find tutorial about c++ socket connection or an opensource dll. I want to make dll for downloading files. Some info would be useful.


Go ahead, jump. 100,000 lemmings can't be wrong.
#5770 10/01/03 09:18 PM
Joined: Dec 2002
Posts: 89
N
Babel fish
Offline
Babel fish
N
Joined: Dec 2002
Posts: 89
look here


Sincerely,
Necroman, #mIRC @ Undernet

Link Copied to Clipboard