mIRC Home    About    Download    Register    News    Help

Print Thread
#76777 26/03/04 11:39 AM
Joined: Aug 2003
Posts: 27
F
fez Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Aug 2003
Posts: 27
Hi, I'm having a slight problem:
I'm trying to make an mirc dll that will simply execute and do nothing, but i can't even get that far.

Here's what I have

(filename: c:\temp\blah.cpp)
Code:
#include <windows.h>

int __stdcall test(HWND mWnd, HWND aWnd, char *data, char *params, BOOL show, BOOL nopause)
{
  MessageBox(NULL, "test", "test", MB_OK);
  return 3;
}


I am compiling via command line with MSVS .net 2002, with the commands:

cl /c blah.cpp
link /dll blah.obj user32.lib

everything compiles fine, and I end up with c:\temp\blah.dll. But in mIRC when i type in:
//echo -a $dll(c:\temp\blah.dll,test,_)
it says
* $dll: no such routine 'test'

A little help please??

-- fez

#76778 26/03/04 11:56 AM
Joined: Mar 2004
Posts: 5
E
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
E
Joined: Mar 2004
Posts: 5
You must add a .def file with the definition of the commands to export.

Look in this tutorial for infos:

DLL turorial by Necroman

#76779 26/03/04 12:01 PM
Joined: Aug 2003
Posts: 27
F
fez Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Aug 2003
Posts: 27
thanks i got it.
yeah i had to do

link /dll blah.obj /DEF:blah.def

thanks


Link Copied to Clipboard