mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2003
Posts: 61
A
Aeron Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Dec 2003
Posts: 61
I read the mIRC about this but it's writin in C++ i think i like to know what the delphi's code for this is:

i got this but it crashes mIRC:
Code:
procedure LoadDll(mHwnd: HWND; mVersion: DWORD; mKeep:boolean); stdcall;
begin
end;


Edit: whoops wrong forum sorry!

Last edited by Aeron; 18/12/03 03:31 PM.
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Almost right, but the info is actually provided in the form of a pointer to a structure of type TLoadInfo.

Code:
type
  TLoadInfo = packed record
    mVersion: Cardinal;
    mHwnd: hWnd;
    mKeep: Boolean;
  end;
  PLoadInfo = ^TLoadInfo;

Code:
procedure LoadDll(Info: PLoadInfo); stdcall;
begin
  //Info.mKeep := False; // Uncomment me to stop DLL staying loaded
end;

Code:
function UnloadDll(mTimeOut: Integer): Integer; stdcall;
begin
  Result := 1;
end;

Plus of course you need to list both commands in your exports clause.

Last edited by starbucks_mafia; 19/12/03 03:04 PM.

Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2003
Posts: 61
A
Aeron Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Dec 2003
Posts: 61
Thx!


Link Copied to Clipboard