Almost right, but the info is actually provided in the form of a pointer to a structure of type TLoadInfo.
type
TLoadInfo = packed record
mVersion: Cardinal;
mHwnd: hWnd;
mKeep: Boolean;
end;
PLoadInfo = ^TLoadInfo;
procedure LoadDll(Info: PLoadInfo); stdcall;
begin
//Info.mKeep := False; // Uncomment me to stop DLL staying loaded
end;
function UnloadDll(mTimeOut: Integer): Integer; stdcall;
begin
Result := 1;
end;
Plus of course you need to list both commands in your
exports clause.