|
| mirc dll basics | 
|
|---|
| Basic design use and layout of a delphi dll for mirc | Product: Delphi all versions | Category: Internet / Web | Skill Level:
 | Scoring:  | Last Update: 03/05/2003 | Search Keys: delphi delphi3000 article borland vcl code-snippet mirc irc dll | Times Scored: 3 | Visits: 3742 | Uploader: Gareth Ablett Company: ErrSoft | Reference: N/A | | | Question/Problem/Abstract:
how can you use delphi to create a dll that can be used with mirc and how do you setup mirc to use these? | Answer:
For an example I'm just going to show you how to create the dll and make it report the dll version to mirc.
First off you create a dll as per normal then you can start by adding a function.
The function is setup as below because of the method required for mirc.
function versionreply( mWnd: hWnd; aWnd: hWnd; Data: PChar; Parms: PChar;
Show: Boolean; NoPause: Boolean ): Integer; export; stdcall;
var blah,blah2:pansichar;
begin
blah2 := pchar(GetProgramVersion('zirc.dll'));
// above line well get the version of zirc.dll which is What I decided to
// call the current dll.
blah := pchar('7[14 Zirc.DLL version ' + blah2 + ' 7][14 by Zoomer 7]');
// above line is basic layouf and design of teh output.
strcopy(data, blah );
Result := 3; // when result = 3 it will send back the content of data.
end;
Then in teh exports you put the function you have created and then compile.
eg.
exports
versionreply;
You should now have a dll that you can place in the mirc directory, once you have done this open up mirc and click the green icon with /a writen on it or goto the action screen.
in this section you are going to need to make an action to access the dll it will looke like this;
mydllversion {
say $dll(zirc.dll,versionreply,_)
}
Then on one of the irc channels when connected if you type
/mydllversion
Now you should have on the screen what you want. (ie. the version reply message)
you can also send vars to to the dll using the $dll (in mirc) but changing the _ for what you want to send, in the function you then use Parms as the value of the sent var.
|
|
|
| |
Sign up to consume product discounts for Bronze memberships !
|
|
| |
Community Ad of S. Kucherov |
|
| |
|
|
|