Visit our Sponsor   Visit our Sponsor
delphi3000.com - the free delphi knowledge platform
delphi3000.com - the free delphi knowledge platform
Have a look at your member-status

connecting people's knowledge


  - Recent ArticlesRSS feed for Recent Articles on delphi3000.com
  - List of All Articles
  - Top Viewed Articles
  - Articles (+Attachem.)
  - Articles Of Interest
  - Categories
  - Top Uploader
  - Search
  - Index

  - My Home
  - Submit an Article
  - My Articles
  - My Personal Data
  - My Bookmarks
  - Activities
  - Login/Logout

  - Sign Up
  - Why Sign Up
  - Newsletter

  - Press
  - Advertise

  - Contact
  - Feedback





Community
Borland
ClubeDelphi
Dr. Bob
UK-BUG
Delphi Meetings
Planeta Delphi







Startblatt.de






Share this article with friendsShare this article with friends
Rate this articleRate this article - to keep the quality of delphi3000.com !
Comment this article or read through previous comments (1)


mirc dll basicsFormat this article printer-friendly!Bookmark function is only available for registered users!
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:
4276
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.





Please rate this article!
Skill level:
BeginnerExpert

Useful:
No!Very!

Overall rating:
PoorExcellent



Comments to this article
Write a new comment
Thanks!
    James Caldwell (Sep 22 2004 2:34AM)

Thanks for sharing this, I have been trying to do something like this for a while.
Respond














 
Sign up to consume product discounts for Bronze memberships !

read more


  Visit our Sponsor

 

  Community Ad of
S. Kucherov
 
   














 







     
  Copyright © 2000 - 2007 delphi3000.com - All rights reserved. Terms of use. || Privacy
delphi3000.com is a service by bluestep.com IT-Services GmbH (Vienna)