{$IFDEF M_API_UNIT} function ProtoServiceExists(const proto,service: PAnsiChar): int; function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar; function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar; function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int; function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int; function mir_forkthread(aFunc:pThreadFunc; arg:pointer):THANDLE; {inline} function mir_forkthreadex(aFunc:pThreadFuncEx; arg:pointer; stackSize:int; pThreadID:puint_ptr):THANDLE; {inline} function mir_forkthreadowner(aFunc:pThreadFuncOwner; owner:pointer; arg:pointer; pThreadID:puint_ptr):THANDLE; {inline} function Netlib_CloseHandle(Handle: THandle): int; function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int; function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int; function Netlib_Send(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr; function Netlib_Recv(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int_ptr; procedure Netlib_Log(hNetLib: THandle; const sz: PAnsiChar); function WindowList_Add(hList: THandle; hWnd: HWND; hContact: THandle): int_ptr; function WindowList_Remove(hList: THandle; hWnd: THandle): int_ptr; function WindowList_Find(hList: THandle; hContact: THandle): int_ptr; function WindowList_Broadcast(hList: THandle; message: int; wParam: WPARAM; lParam: LPARAM): int_ptr; function Utils_SaveWindowPosition(hWnd: THandle; hContact: THandle; const szModule, szNamePrefix: PAnsiChar): int_ptr; function Utils_RestoreWindowPosition(hWnd: THandle; hContact: THandle; Flags: int; const szModule, szNamePrefix: PAnsiChar): int_ptr; function mir_hashstr(const key:pAnsiChar):uint; {inline;} function mir_hashstrW(const key:pWideChar):uint; {inline;} function lrtrim(str:pAnsiChar):pAnsiChar; {inline} function lrtrimp(str:pAnsiChar):pAnsiChar; {inline} function mir_utf8decodeA(const src:pAnsiChar):pAnsiChar; {inline} function Translate(sz: PAnsiChar): PAnsiChar; function Translatew(sz: PWideChar): PWideChar; function TranslateString(const sz: AnsiString): AnsiString; function TranslateWideString(const sz:WideString):WideString; function TranslateUnicodeString(sz: String): String;{$ifdef FPC}inline;{$endif} procedure TranslateDialogDefault(hwndDlg: THandle); procedure TranslateMenu(hMenu: HMENU); function Langpack_Register:int_ptr; function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int_ptr; function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int_ptr; function LoadSkinnedIcon(id: int): THandle; function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle; function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr; function SkinPlaySound (const name: PAnsiChar): int_ptr; function Menu_AddContextFrameMenuItem(mi:PCLISTMENUITEM):HGENMENU; function Menu_AddMainMenuItem(mi:PCLISTMENUITEM):HGENMENU; function Menu_AddContactMenuItem(mi:PCLISTMENUITEM):HGENMENU; function Menu_AddStatusMenuItem(mi:PCLISTMENUITEM):HGENMENU; function Menu_AddProtoMenuItem(mi:PCLISTMENUITEM):HGENMENU; function Menu_AddSubGroupMenuItem(mi:PCLISTMENUITEM):HGENMENU; function Menu_AddGroupMenuItem(mi:PCLISTMENUITEM):HGENMENU; function Menu_AddTrayMenuItem(mi:PCLISTMENUITEM):HGENMENU; function UserInfo_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr; function Options_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr; function Hotkey_Register(hk:PHOTKEYDESC):int_ptr; function Skin_AddIcon(si:PSKINICONDESC):THANDLE; procedure FontRegister(pFontID:pFontID); procedure FontRegisterW(pFontID:pFontIDW); procedure ColourRegister(pColorID:pColourID); procedure ColourRegisterW(pColorID:pColourIDW); procedure EffectRegister(pEffectID:pEffectID); procedure EffectRegisterW(pEffectID:pEffectIDW); {$ELSE} function ProtoServiceExists(const proto,service: PAnsiChar): int; var buf:array [0..127] of AnsiChar; begin if (proto=nil) or (service=nil) then begin result:=0; exit; end; lStrCpyA(@buf,proto); lStrCatA(@buf,service); result:=ServiceExists(@buf); end; function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar; var vers:array [0..3] of integer; begin vers[0]:=(version shr 24) and $FF; vers[1]:=(version shr 16) and $FF; vers[2]:=(version shr 8) and $FF; vers[3]:=version and $FF; wvsprintfa(buf,'%d.%d.%d.%d',@vers); result:=buf; end; function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar; begin result:=CreateVersionString(pluginInfo^.version,buf); end; function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int; begin Result := (a shl 24) or (b shl 16) or (c shl 8) or d; end; function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int; begin Result := 0; { could be used to compare for severity of age for positive values, if a