DLL Files
The /dll and Dll( ) features allow you to make calls to DLLs designed to work with Vortec. Compiled DLL libraries are far faster and more powerful than scripting alone, and are much more effeicient.
Warning! You should never use compiled DLL files from sources you do not trust. Since you cannot look at the "source code" for compiled DLLs you can never know what they may be capable of doing. It is very possible that a user could create a DLL containing a virus or trojan which could compromise your system. Only accept or download DLLs from trustworthy sources, such as PirchWorld, Vortec IRC, or a close friend whom you trust.
Usage:
(From aliases or popups): /dll [-r|-u] <filename> <procname> [data]
(From a script): Dll(filename, procname, data)
When using the /DLL command from an alias, event, or popup, you only have the ability to send data TO the plugin. If you want to retrieve a value FROM the plugin you will need to use the DLL( ) function from within a script.
Use the -r switch to keep the dll file resident in memory. The dll will remain loaded until the -u switch is used or until the calling server window is closed.
The -u switch unloads a resident dll file from memory.
Technical notes:
This section contains technical information for programmers who want to create DLLs for use with Vortec. Vortec DLLs are compatable with mIRC, so it may be possible to use a mirc DLL inside Vortec, and vice-versa.
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)
mWnd is the handle to the main Vortec window.
aWnd is the handle of the window in which the command is being issued, this might not be the currently active window if the command is being called by a remote script.
data is the information that you wish to send to the DLL. On return, the DLL can fill this variable with the command it wants Vortec to perform if any.
parms is filled by the DLL on return with parameters that it wants Vortec to use when performing the command that it returns in the data variable.
An example in Delphi/Pascal:
library hello;
uses
Windows, SysUtils;
function HelloWorld(mWnd, aWnd: HWND; data, parms: PChar;
show, nopause :boolean):integer; stdcall;
begin
StrCopy(data,'/display Hello World!');
Result := 2;
end;
exports
HelloWorld name 'HelloWorld';
begin
end.
A note about mIRC plugins and compatability:
(From the mIRC help file)
The DLL can return an integer to indicate what it wants mIRC to do:
0 means that mIRC should /halt processing
1 means that mIRC should continue processing
2 means that it has filled the data variable with a command which it wants mIRC to perform, and has filled parms with the parameters to use, if any, when performing the command.
3 means that the DLL has filled the data variable with the result that $dll() as an identifier should return.
Vortec will only use parameter 0 or 2.
Copyright © 2009, John G. Kirkland
Created with the Freeware Edition of HelpNDoc: Easily create PDF Help documents