diff options
Diffstat (limited to 'include/delphi/m_core.inc')
-rw-r--r-- | include/delphi/m_core.inc | 246 |
1 files changed, 124 insertions, 122 deletions
diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc index d6d543405b..84f55d74b5 100644 --- a/include/delphi/m_core.inc +++ b/include/delphi/m_core.inc @@ -53,32 +53,34 @@ const DBVTF_VARIABLELENGTH = $80; // ?
type
- MCONTACT = DWORD;
+ PMCONTACT = ^TMCONTACT;
+ TMCONTACT = dword;
+const
+ INVALID_CONTACT_ID = TMCONTACT(-1);
+
+type
HDBEVENT = THANDLE;
PDBVARIANT = ^TDBVARIANT;
TDBVARIANT = record
- _type: Byte;
+ _type: byte;
case LongInt of
- 0: (bVal: Byte);
+ 0: (bVal: byte);
1: (cVal: AnsiChar);
- 2: (wVal: Word);
+ 2: (wVal: word);
3: (sVal: ShortInt);
4: (dVal: dword);
5: (lVal: long);
6: (
szVal : TChar;
- cchVal: Word;
+ cchVal: word;
);
7: (
- cpbVal: Word;
+ cpbVal: word;
pbVal : PByte;
);
end;
const
- INVALID_CONTACT_ID = MCONTACT(-1);
-
-const
DBEF_FIRST = 1; // internally only, do not use
DBEF_SENT = 2; // if set, the event was sent by the user, otherwise it was received
DBEF_READ = 4; // event has been read by the user -- only needed for history
@@ -99,10 +101,10 @@ type TDBEVENTINFO = record
cbSize : int; // size of the structure
szModule : PAnsiChar; // module that 'owns' this event and controls the data format
- timestamp: DWORD; // timestamp in UNIX time
- flags : DWORD; // the DBEF_* flags above
- eventType: WORD; // event type, such as message, can be module defined
- cbBlob : DWORD; // size in bytes of pBlob^
+ timestamp: dword; // timestamp in UNIX time
+ flags : dword; // the DBEF_* flags above
+ eventType: word; // event type, such as message, can be module defined
+ cbBlob : dword; // size in bytes of pBlob^
pBlob : PByte; // pointer to buffer containing the module defined event data
end;
@@ -124,7 +126,7 @@ modules are free to define their own, beginning at 2000 DBEVENTINFO.timestamp is in GMT, as returned by time(). There are services
db/time/x below with useful stuff for dealing with it.
}
-function db_event_add(hContact:MCONTACT; dbei:PDBEVENTINFO):THANDLE; stdcall;
+function db_event_add(hContact:TMCONTACT; dbei:PDBEVENTINFO):THANDLE; stdcall;
external CoreDLL name 'db_event_add';
{
@@ -132,7 +134,7 @@ Gets the number of events in the chain belonging to a contact in the database. Returns the number of events in the chain owned by hContact or -1 if hContact
is invalid. They can be retrieved using the db_event_first/last() services.
}
-function db_event_count(hContact:MCONTACT):int; stdcall;
+function db_event_count(hContact:TMCONTACT):int; stdcall;
external CoreDLL name 'db_event_count';
{
@@ -141,7 +143,7 @@ hDbEvent should have been returned by db_event_add/first/last/next/prev() Returns 0 on success, or nonzero if hDbEvent was invalid
Triggers a db/event/deleted event just *before* the event is deleted
}
-function db_event_delete(hContact:MCONTACT; hDbEvent:THANDLE):int; stdcall;
+function db_event_delete(hContact:TMCONTACT; hDbEvent:THANDLE):int; stdcall;
external CoreDLL name 'db_event_delete';
{
@@ -149,7 +151,7 @@ Retrieves a handle to the first event in the chain for hContact Returns the handle, or NULL if hContact is invalid or has no events
Events in a chain are sorted chronologically automatically
}
-function db_event_first(hContact:MCONTACT):THANDLE; stdcall;
+function db_event_first(hContact:TMCONTACT):THANDLE; stdcall;
external CoreDLL name 'db_event_first';
{
@@ -163,7 +165,7 @@ should be checked individually with db_event_next() and db_event_get() This service is designed for startup, reloading all the events that remained
unread from last time
}
-function db_event_firstUnread(hContact:MCONTACT):THANDLE; stdcall;
+function db_event_firstUnread(hContact:TMCONTACT):THANDLE; stdcall;
external CoreDLL name 'db_event_firstUnread';
{
@@ -200,7 +202,7 @@ success This service is exceptionally slow. Use only when you have no other choice at
all.
}
-function db_event_getContact(hDbEvent:THANDLE):MCONTACT; stdcall;
+function db_event_getContact(hDbEvent:THANDLE):TMCONTACT; stdcall;
external CoreDLL name 'db_event_getContact';
{
@@ -208,18 +210,18 @@ Retrieves a handle to the last event in the chain for hContact Returns the handle, or NULL if hContact is invalid or has no events
Events in a chain are sorted chronologically automatically
}
-function db_event_last(hContact:MCONTACT):THANDLE; stdcall;
+function db_event_last(hContact:TMCONTACT):THANDLE; stdcall;
external CoreDLL name 'db_event_last';
{
Changes the flags for an event to mark it as read.
hDbEvent should have been returned by db_event_add/first/last/next/prev()
-Returns the entire flag DWORD for the event after the change, or -1 if hDbEvent
+Returns the entire flag dword for the event after the change, or -1 if hDbEvent
is invalid.
This is the one database write operation that does not trigger an event.
Modules should not save flags states for any length of time.
}
-function db_event_markRead(hContact:MCONTACT; hDbEvent:THANDLE):int; stdcall;
+function db_event_markRead(hContact:TMCONTACT; hDbEvent:THANDLE):int; stdcall;
external CoreDLL name 'db_event_markRead';
{
@@ -252,7 +254,7 @@ You can specify szProto to find only its contacts Returns a handle to the first contact in the db on success, or NULL if there
are no contacts in the db.
}
-function db_find_first(const szModule:pAnsiChar=nil):MCONTACT; stdcall;
+function db_find_first(const szModule:PAnsiChar=nil):TMCONTACT; stdcall;
external CoreDLL name 'db_find_first';
{
@@ -262,91 +264,91 @@ You can specify szProto to find only its contacts Returns a handle to the contact after hContact in the db on success or NULL if
hContact was the last contact in the db or hContact was invalid.
}
-function db_find_next(hContact:MCONTACT; const szModule:pAnsiChar=nil):MCONTACT; stdcall;
+function db_find_next(hContact:TMCONTACT; const szModule:PAnsiChar=nil):TMCONTACT; stdcall;
external CoreDLL name 'db_find_next';
(******************************************************************************
* DATABASE SETTINGS
*)
-function db_get(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
+function db_get(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_get';
-function db_get_b(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
+function db_get_b(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:int):int; stdcall;
external CoreDLL name 'db_get_b';
-function db_get_w(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
+function db_get_w(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:int):int; stdcall;
external CoreDLL name 'db_get_w';
-function db_get_dw(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:dword):dword; stdcall;
+function db_get_dw(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:dword):dword; stdcall;
external CoreDLL name 'db_get_dw';
-function db_get_s(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT; const nType:int=DBVT_ASCIIZ):int_ptr; stdcall;
+function db_get_s(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; dbv:PDBVARIANT; const nType:int=DBVT_ASCIIZ):int_ptr; stdcall;
external CoreDLL name 'db_get_s';
-function db_get_sa(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):pAnsiChar; stdcall;
+function db_get_sa(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'db_get_sa';
-function db_get_wsa(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):pWideChar; stdcall;
+function db_get_wsa(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):PWideChar; stdcall;
external CoreDLL name 'db_get_wsa';
-function db_get_static(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; szDest:pAnsiChar; destLen:int):int; stdcall;
+function db_get_static(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; szDest:PAnsiChar; destLen:int):int; stdcall;
external CoreDLL name 'db_get_static';
-function db_get_static_utf(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; szDest:pAnsiChar; destLen:int):int; stdcall;
+function db_get_static_utf(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; szDest:PAnsiChar; destLen:int):int; stdcall;
external CoreDLL name 'db_get_static_utf';
-function db_get_wstatic(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; szDest:pWideChar; destLen:int):int; stdcall;
+function db_get_wstatic(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; szDest:PWideChar; destLen:int):int; stdcall;
external CoreDLL name 'db_get_wstatic';
-function db_set(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
+function db_set(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_set';
-function db_set_b(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:byte):int_ptr; stdcall;
+function db_set_b(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:byte):int_ptr; stdcall;
external CoreDLL name 'db_set_b';
-function db_set_w(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:word):int_ptr; stdcall;
+function db_set_w(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:word):int_ptr; stdcall;
external CoreDLL name 'db_set_w';
-function db_set_dw(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:dword):int_ptr; stdcall;
+function db_set_dw(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:dword):int_ptr; stdcall;
external CoreDLL name 'db_set_dw';
-function db_set_s(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pAnsiChar):int_ptr; stdcall;
+function db_set_s(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_set_s';
-function db_set_ws(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pWideChar):int_ptr; stdcall;
+function db_set_ws(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PWideChar):int_ptr; stdcall;
external CoreDLL name 'db_set_ws';
-function db_set_utf(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pAnsiChar):int_ptr; stdcall;
+function db_set_utf(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_set_utf';
-function db_set_blob(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
+function db_set_blob(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
external CoreDLL name 'db_set_blob';
-function db_unset(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):int_ptr; stdcall;
+function db_unset(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_unset';
-function db_set_resident(const szModule:pAnsiChar; const szSetting:pAnsiChar; bEnable:int):int; stdcall;
+function db_set_resident(const szModule:PAnsiChar; const szSetting:PAnsiChar; bEnable:int):int; stdcall;
external CoreDLL name 'db_set_resident';
// deprecated Aliases
function DBFreeVariant(dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_free';
-function DBDeleteContactSetting(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):int_ptr; stdcall;
+function DBDeleteContactSetting(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_unset';
-function DBGetContactSettingByte(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
+function DBGetContactSettingByte(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:int):int; stdcall;
external CoreDLL name 'db_get_b';
-function DBGetContactSettingWord(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
+function DBGetContactSettingWord(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:int):int; stdcall;
external CoreDLL name 'db_get_w';
-function DBGetContactSettingDWord(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:dword):dword; stdcall;
+function DBGetContactSettingDWord(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; errorValue:dword):dword; stdcall;
external CoreDLL name 'db_get_dw';
-function DBGetContactSetting(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
+function DBGetContactSetting(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_get';
-function DBGetContactSettingStr(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; dbv:PDBVARIANT; const nType:int=DBVT_ASCIIZ):int_ptr; stdcall;
+function DBGetContactSettingStr(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; dbv:PDBVARIANT; const nType:int=DBVT_ASCIIZ):int_ptr; stdcall;
external CoreDLL name 'db_get_s';
-function DBGetContactSettingString(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):pAnsiChar; stdcall;
+function DBGetContactSettingString(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'db_get_sa';
-function DBGetContactSettingWString(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar):pWideChar; stdcall;
+function DBGetContactSettingWString(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar):PWideChar; stdcall;
external CoreDLL name 'db_get_wsa';
-function DBWriteContactSettingByte(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:byte):int_ptr; stdcall;
+function DBWriteContactSettingByte(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:byte):int_ptr; stdcall;
external CoreDLL name 'db_set_b';
-function DBWriteContactSettingWord(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:word):int_ptr; stdcall;
+function DBWriteContactSettingWord(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:word):int_ptr; stdcall;
external CoreDLL name 'db_set_w';
-function DBWriteContactSettingDWord(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:dword):int_ptr; stdcall;
+function DBWriteContactSettingDWord(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:dword):int_ptr; stdcall;
external CoreDLL name 'db_set_dw';
-function DBWriteContactSettingString(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pAnsiChar):int_ptr; stdcall;
+function DBWriteContactSettingString(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_set_s';
-function DBWriteContactSettingWString(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pWideChar):int_ptr; stdcall;
+function DBWriteContactSettingWString(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PWideChar):int_ptr; stdcall;
external CoreDLL name 'db_set_ws';
-function DBWriteContactSettingUTF8String(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; const val:pAnsiChar):int_ptr; stdcall;
+function DBWriteContactSettingUTF8String(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; const val:PAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_set_utf';
-function DBWriteContactSettingBlob(hContact:MCONTACT; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
+function DBWriteContactSettingBlob(hContact:TMCONTACT; const szModule:PAnsiChar; const szSetting:PAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
external CoreDLL name 'db_set_blob';
///////////////////////////////////////////////////////////////////////////////
@@ -363,7 +365,7 @@ type TMIRANDASERVICE = function(wParam: WPARAM; lParam: LPARAM): int_ptr; cdecl;
TMIRANDASERVICEPARAM = function(wParam:WPARAM;lParam,lParam1:LPARAM):int_ptr; cdecl;
- TMIRANDASERVICEOBJ = function(ptr:pointer;wParam,lParam:LPARAM):int_ptr; cdecl;
+ TMIRANDASERVICEOBJ = function(ptr:pointer;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
TMIRANDASERVICEOBJPARAM = function(ptr:pointer;wParam:WPARAM;lParam,lParam1:LPARAM):int_ptr; cdecl;
const
@@ -428,7 +430,7 @@ procedure KillModuleServices(hInst:HINST); stdcall; procedure KillObjectServices(var ptr); stdcall;
external CoreDLL name 'KillObjectServices';
-function CallContactService(hContact:MCONTACT;const name:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
+function CallContactService(hContact:TMCONTACT;const name:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
external CoreDLL name 'CallContactService';
function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
external CoreDLL name 'CallProtoService';
@@ -438,7 +440,7 @@ function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wPa // http
// returned result must be freed using mir_free()
-function mir_urlEncode(url:pAnsiChar): pAnsiChar; stdcall;
+function mir_urlEncode(url:PAnsiChar): PAnsiChar; stdcall;
external CoreDLL name 'mir_urlEncode';
///////////////////////////////////////////////////////////////////////////////
@@ -460,8 +462,8 @@ function SetExceptionFilter(pMirandaExceptFilter:pfnExceptionFilter):pfnExceptio type
pIconItem = ^tIconItem;
tIconItem = record
- szDescr:pAnsiChar;
- szName :pAnsiChar;
+ szDescr:PAnsiChar;
+ szName :PAnsiChar;
defIconID,
size :int;
hIcolib:THANDLE;
@@ -470,18 +472,18 @@ type pIconItemW = ^tIconItemW;
tIconItemW = record
- szDescr:pWideChar;
- szName :pAnsiChar;
+ szDescr:PWideChar;
+ szName :PAnsiChar;
defIconID,
size :int;
hIcolib:THANDLE;
end;
tagIconItemW = tIconItemW;
-procedure mir_Icon_Register(hInst:HINST; const szSection:pAnsiChar; pIcons:pIconItem;
+procedure mir_Icon_Register(hInst:HINST; const szSection:PAnsiChar; pIcons:pIconItem;
iCount:size_t; prefix:PAnsiChar; hLangpack:int=0); stdcall;
external CoreDLL name 'Icon_Register';
-procedure mir_Icon_RegisterW(hInst:HINST; const szSection:pWideChar; pIcons:pIconItemW;
+procedure mir_Icon_RegisterW(hInst:HINST; const szSection:PWideChar; pIcons:pIconItemW;
iCount:size_t; prefix:PAnsiChar; hLangpack:int=0); stdcall;
external CoreDLL name 'Icon_RegisterT';
@@ -497,19 +499,19 @@ function Langpack_GetDefaultCodePage():int; stdcall; external CoreDLL name 'Langpack_GetDefaultCodePage';
function Langpack_GetDefaultLocale():int; stdcall;
external CoreDLL name 'Langpack_GetDefaultLocale';
-function Langpack_PcharToTchar(const pszStr:pAnsiChar):pWideChar; stdcall;
+function Langpack_PcharToTchar(const pszStr:PAnsiChar):PWideChar; stdcall;
external CoreDLL name 'Langpack_PcharToTchar';
function LoadLangPackModule():int; stdcall;
external CoreDLL name 'LoadLangPackModule';
-function LoadLangPack(const szLangPack:pWideChar):int; stdcall;
+function LoadLangPack(const szLangPack:PWideChar):int; stdcall;
external CoreDLL name 'LoadLangPack';
-procedure ReloadLangpack(pszStr:pWideChar); stdcall;
+procedure ReloadLangpack(pszStr:PWideChar); stdcall;
external CoreDLL name 'ReloadLangpack';
-function TranslateA_LP(const str:pAnsiChar; hLang:int):pAnsiChar; stdcall;
+function TranslateA_LP(const str:PAnsiChar; hLang:int):PAnsiChar; stdcall;
external CoreDLL name 'TranslateA_LP';
-function TranslateW_LP(const str:pWideChar; hLang:int):pWideChar; stdcall;
+function TranslateW_LP(const str:PWideChar; hLang:int):PWideChar; stdcall;
external CoreDLL name 'TranslateW_LP';
procedure TranslateMenu_LP(hMenu:HMENU; hLang:int); stdcall;
external CoreDLL name 'TranslateMenu_LP';
@@ -575,12 +577,12 @@ procedure List_ObjCopy(src:PSortedList; dst:PSortedList; size:size_t); stdcall; ///////////////////////////////////////////////////////////////////////////////
// log functions
-function mir_createLog(pszName:PAnsiChar; ptszDescr, ptszFile:PWideChar; options:Cardinal):THandle;stdcall;
+function mir_createLog(pszName:PAnsiChar; ptszDescr, ptszFile:PWideChar; options:Cardinal):THANDLE; stdcall;
external CoreDLL name 'mir_createLog';
-function mir_writeLogA(hLog:THandle; format:PAnsiChar):int;cdecl;
+function mir_writeLogA(hLog:THANDLE; format:PAnsiChar):int; cdecl;
external CoreDLL name 'mir_writeLogA';
-function mir_writeLogW(hLog:THandle; format:PWideChar):int;cdecl;
+function mir_writeLogW(hLog:THANDLE; format:PWideChar):int; cdecl;
external CoreDLL name 'mir_writeLogW';
///////////////////////////////////////////////////////////////////////////////
@@ -643,42 +645,42 @@ function GetInstByAddress(codePtr:pointer):HINST; stdcall; ///////////////////////////////////////////////////////////////////////////////
// path utils
-procedure CreatePathToFile(wszFilePath:pAnsiChar); stdcall;
+procedure CreatePathToFile(wszFilePath:PAnsiChar); stdcall;
external CoreDLL name 'CreatePathToFile';
-function CreateDirectoryTree(const szDir:pAnsiChar):int; stdcall;
+function CreateDirectoryTree(const szDir:PAnsiChar):int; stdcall;
external CoreDLL name 'CreateDirectoryTree';
-function PathToAbsolute(const pSrc:pAnsiChar; pOut:pAnsiChar; base:pAnsiChar=nil):int; stdcall;
+function PathToAbsolute(const pSrc:PAnsiChar; pOut:PAnsiChar; base:PAnsiChar=nil):int; stdcall;
external CoreDLL name 'PathToAbsolute';
-function PathToRelative(const pSrc:pAnsiChar; pOut:pAnsiChar):int; stdcall;
+function PathToRelative(const pSrc:PAnsiChar; pOut:PAnsiChar):int; stdcall;
external CoreDLL name 'PathToRelative';
-procedure CreatePathToFileW(wszFilePath:pWideChar); stdcall;
+procedure CreatePathToFileW(wszFilePath:PWideChar); stdcall;
external CoreDLL name 'CreatePathToFileW';
-function CreateDirectoryTreeW(const szDir:pWideChar):int; stdcall;
+function CreateDirectoryTreeW(const szDir:PWideChar):int; stdcall;
external CoreDLL name 'CreateDirectoryTreeW';
-function PathToAbsoluteW(const pSrc:pWideChar; pOut:pWideChar; base:pWideChar=nil):int; stdcall;
+function PathToAbsoluteW(const pSrc:PWideChar; pOut:PWideChar; base:PWideChar=nil):int; stdcall;
external CoreDLL name 'PathToAbsoluteW';
-function PathToRelativeW(const pSrc:pWideChar; pOut:pWideChar):int; stdcall;
+function PathToRelativeW(const pSrc:PWideChar; pOut:PWideChar):int; stdcall;
external CoreDLL name 'PathToRelativeW';
///////////////////////////////////////////////////////////////////////////////
// print functions
-function mir_snprintf(buffer:pAnsiChar;count:size_t;fmt:pAnsiChar{, ...}):int; stdcall;
+function mir_snprintf(buffer:PAnsiChar;count:size_t;fmt:PAnsiChar{, ...}):int; stdcall;
external CoreDLL name 'mir_snprintf';
-function mir_snwprintf(buffer:pWideChar;count:size_t;fmt:pWideChar{, ...}):int; stdcall;
+function mir_snwprintf(buffer:PWideChar;count:size_t;fmt:PWideChar{, ...}):int; stdcall;
external CoreDLL name 'mir_snwprintf';
-function mir_vsnprintf(buffer:pAnsiChar;count:size_t;fmt:pAnsiChar;va:va_list):int; stdcall;
+function mir_vsnprintf(buffer:PAnsiChar;count:size_t;fmt:PAnsiChar;va:va_list):int; stdcall;
external CoreDLL name 'mir_vsnprintf';
-function mir_vsnwprintf(buffer:pWideChar;count:size_t;fmt:pWideChar;va:va_list):int; stdcall;
+function mir_vsnwprintf(buffer:PWideChar;count:size_t;fmt:PWideChar;va:va_list):int; stdcall;
external CoreDLL name 'mir_vsnwprintf';
///////////////////////////////////////////////////////////////////////////////
// protocol functions
-function ProtoBroadcastAck(const szModule:PAnsiChar; hContact:MCONTACT; type_:int; result_:int; hProcess:THANDLE; lParam:LPARAM): int_ptr; stdcall;
+function ProtoBroadcastAck(const szModule:PAnsiChar; hContact:TMCONTACT; type_:int; result_:int; hProcess:THANDLE; lParam:LPARAM): int_ptr; stdcall;
external CoreDLL name 'ProtoBroadcastAck';
function ProtoServiceExists(const szModule, szName:PAnsiChar):int; stdcall;
@@ -700,7 +702,7 @@ procedure ProtoDestructor(pThis:pointer{PPROTO_INTERFACE}); stdcall; {!!
typedef void (__cdecl PROTO_INTERFACE::*ProtoThreadFunc)(void*);
procedure ProtoForkThread(PROTO_INTERFACE *pThis, ProtoThreadFunc, void *param);
-function ProtoForkThreadEx(PROTO_INTERFACE *pThis, ProtoThreadFunc, void *param, UINT* threadID):THANDLE;
+function ProtoForkThreadEx(PROTO_INTERFACE *pThis, ProtoThreadFunc, void *param, uint* threadID):THANDLE;
typedef int (__cdecl PROTO_INTERFACE::*ProtoEventFunc)(WPARAM, LPARAM);
procedure ProtoHookEvent(PROTO_INTERFACE *pThis, const char* szName, ProtoEventFunc pFunc);
@@ -713,9 +715,9 @@ typedef INT_PTR (__cdecl PROTO_INTERFACE::*ProtoServiceFuncParam)(WPARAM, LPARAM procedure ProtoCreateServiceParam(PROTO_INTERFACE *pThis, const char* szService, ProtoServiceFuncParam, LPARAM);
}
-procedure ProtoLogA(pThis:pointer{PPROTO_INTERFACE}; szFormat :pAnsiChar; args:va_list); stdcall;
+procedure ProtoLogA(pThis:pointer{PPROTO_INTERFACE}; szFormat :PAnsiChar; args:va_list); stdcall;
external CoreDLL name 'ProtoLogA';
-procedure ProtoLogW(pThis:pointer{PPROTO_INTERFACE}; wszFormat:pWideChar; args:va_list); stdcall;
+procedure ProtoLogW(pThis:pointer{PPROTO_INTERFACE}; wszFormat:PWideChar; args:va_list); stdcall;
external CoreDLL name 'ProtoLogW';
// returns image extension by a PA_* constant or empty string for PA_FORMAT_UNKNOWN
@@ -770,62 +772,62 @@ procedure mir_hmac_sha1(hashout:SHA1Hash; const key:pbyte; keyLen:size_t; ///////////////////////////////////////////////////////////////////////////////
// strings
-function mir_base64_decode(str:pAnsiChar; var resultSize:int):pByte; stdcall;
+function mir_base64_decode(str:PAnsiChar; var resultSize:int):pByte; stdcall;
external CoreDLL name 'mir_base64_decode';
-function mir_base64_encode(str:pByte; dataSize:int):pAnsiChar; stdcall;
+function mir_base64_encode(str:pByte; dataSize:int):PAnsiChar; stdcall;
external CoreDLL name 'mir_base64_encode';
-function mir_base64_encodebuf(data:PByte; dataSize:int; output:pAnsiChar; outputLen:int):pAnsiChar; stdcall;
+function mir_base64_encodebuf(data:PByte; dataSize:int; output:PAnsiChar; outputLen:int):PAnsiChar; stdcall;
external CoreDLL name 'mir_base64_encodebuf';
-function rtrim(str:pAnsiChar):pAnsiChar; stdcall;
+function rtrim(str:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'rtrim';
-function rtrimw(str:pWideChar):pWideChar; stdcall;
+function rtrimw(str:PWideChar):PWideChar; stdcall;
external CoreDLL name 'rtrimw';
// returns pointer to the beginning of string
-function ltrim(str:pAnsiChar):pAnsiChar; stdcall;
+function ltrim(str:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'ltrim';
-function ltrimw(str:pWideChar):pWideChar; stdcall;
+function ltrimw(str:PWideChar):PWideChar; stdcall;
external CoreDLL name 'ltrimw';
// returns pointer to the trimmed portion of string
-function ltrimp(str:pAnsiChar):pAnsiChar; stdcall;
+function ltrimp(str:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'ltrimp';
-function ltrimpw(str:pWideChar):pWideChar; stdcall;
+function ltrimpw(str:PWideChar):PWideChar; stdcall;
external CoreDLL name 'ltrimpw';
-function wildcmp(name:pAnsiChar; mask:pAnsiChar):int; stdcall;
+function wildcmp(name:PAnsiChar; mask:PAnsiChar):int; stdcall;
external CoreDLL name 'wildcmp';
-function wildcmpw(name:pWideChar; mask:pWideChar):int; stdcall;
+function wildcmpw(name:PWideChar; mask:PWideChar):int; stdcall;
external CoreDLL name 'wildcmpw';
-function wildcmpi(name:pAnsiChar; mask:pAnsiChar):int; stdcall;
+function wildcmpi(name:PAnsiChar; mask:PAnsiChar):int; stdcall;
external CoreDLL name 'wildcmpi';
-function wildcmpiw(name:pWideChar; mask:pWideChar):int; stdcall;
+function wildcmpiw(name:PWideChar; mask:PWideChar):int; stdcall;
external CoreDLL name 'wildcmpiw';
// mir_free dest, mir_strdup src to dest
-function replaceStr(var dest:pAnsiChar; const src:pAnsiChar):pAnsiChar; stdcall;
+function replaceStr(var dest:PAnsiChar; const src:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'replaceStr';
-function replaceStrW(var dest:pWideChar; const src:pWideChar):pWideChar; stdcall;
+function replaceStrW(var dest:PWideChar; const src:PWideChar):PWideChar; stdcall;
external CoreDLL name 'replaceStrW';
-function bin2hex(data:pointer; dataLen:size_t; pDest:pAnsiChar):pAnsiChar; stdcall;
+function bin2hex(data:pointer; dataLen:size_t; pDest:PAnsiChar):PAnsiChar; stdcall;
external CoreDLL name 'bin2hex';
-function bin2hexW(data:pointer; dataLen:size_t; pDest:pWideChar):pWideChar; stdcall;
+function bin2hexW(data:pointer; dataLen:size_t; pDest:PWideChar):PWideChar; stdcall;
external CoreDLL name 'bin2hexW';
///////////////////////////////////////////////////////////////////////////////
// text conversion functions
-function mir_a2u_cp(src:PAnsiChar;codepage:int):pWideChar; stdcall;
+function mir_a2u_cp(src:PAnsiChar;codepage:int):PWideChar; stdcall;
external CoreDLL name 'mir_a2u_cp';
-function mir_a2u(src:PAnsiChar):pWideChar; stdcall;
+function mir_a2u(src:PAnsiChar):PWideChar; stdcall;
external CoreDLL name 'mir_a2u';
-function mir_u2a_cp(src:pWideChar;codepage:int):PAnsiChar; stdcall;
+function mir_u2a_cp(src:PWideChar;codepage:int):PAnsiChar; stdcall;
external CoreDLL name 'mir_u2a_cp';
-function mir_u2a(src:pWideChar):PAnsiChar; stdcall;
+function mir_u2a(src:PWideChar):PAnsiChar; stdcall;
external CoreDLL name 'mir_u2a';
@@ -848,7 +850,7 @@ function forkthread(func:pThreadFunc; stacksize:uint; arg:pointer):uint_ptr; std function forkthreadex(sec:pointer; stacksize:uint; func:pThreadFuncEx; owner:pointer; arg:pointer; thraddr:puint_ptr):uint_ptr; stdcall;
external CoreDLL name 'forkthreadex';
-procedure Thread_SetName(const szThreadName:pAnsiChar); stdcall;
+procedure Thread_SetName(const szThreadName:PAnsiChar); stdcall;
external CoreDLL name 'Thread_SetName';
procedure KillObjectThreads(pObject:pointer); stdcall;
@@ -858,12 +860,12 @@ procedure KillObjectThreads(pObject:pointer); stdcall; ///////////////////////////////////////////////////////////////////////////////
// utf8 interface
{ commented to avoid newer Delphi version conflicts
-function Utf8Decode(str:PAnsiChar; var ucs2:pWideChar):PAnsiChar;stdcall;
+function Utf8Decode(str:PAnsiChar; var ucs2:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8Decode';
-function Utf8DecodeCP(str:PAnsiChar; codepage:int; var ucs2:pWideChar):PAnsiChar;stdcall;
+function Utf8DecodeCP(str:PAnsiChar; codepage:int; var ucs2:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8DecodeCP';
-function Utf8DecodeW(const str:PAnsiChar):pWideChar;stdcall;
+function Utf8DecodeW(const str:PAnsiChar):PWideChar;stdcall;
external CoreDLL name 'Utf8DecodeW';
function Utf8Encode(const src:PAnsiChar):PAnsiChar;stdcall;
@@ -874,18 +876,18 @@ function Utf8EncodeCP(const src:PAnsiChar;codepage:int):PAnsiChar;stdcall; function Utf8EncodeW(const src:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8EncodeW';
-function Ucs2toUtf8Len(const src:pWideChar):int; stdcall;
+function Ucs2toUtf8Len(const src:PWideChar):int; stdcall;
external CoreDLL name 'Ucs2toUtf8Len';
function Utf8CheckString(const astr:PAnsiChar):bool;stdcall;
external CoreDLL name 'Utf8CheckString';
}
// aliases
-function mir_utf8decode(str:PAnsiChar; var ucs2:pWideChar):PAnsiChar;stdcall;
+function mir_utf8decode(str:PAnsiChar; var ucs2:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8Decode';
-function mir_utf8decodecp(str:PAnsiChar; codepage:int; var ucs2:pWideChar):PAnsiChar;stdcall;
+function mir_utf8decodecp(str:PAnsiChar; codepage:int; var ucs2:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8DecodeCP';
-function mir_utf8decodew(const str:PAnsiChar):pWideChar;stdcall;
+function mir_utf8decodew(const str:PAnsiChar):PWideChar;stdcall;
external CoreDLL name 'Utf8DecodeW';
function mir_utf8encode(const src:PAnsiChar):PAnsiChar;stdcall;
@@ -896,7 +898,7 @@ function mir_utf8encodecp(const src:PAnsiChar;codepage:int):PAnsiChar;stdcall; function mir_utf8encodew(const src:PWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8EncodeW';
-function mir_utf8lenW(const src:pWideChar):int; stdcall;
+function mir_utf8lenW(const src:PWideChar):int; stdcall;
external CoreDLL name 'Ucs2toUtf8Len';
function mir_utf8checkstring(const astr:PAnsiChar):bool;stdcall;
|