diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_core.inc | 11 | ||||
-rw-r--r-- | include/m_core.h | 17 |
2 files changed, 28 insertions, 0 deletions
diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc index 0bfd0aec8f..a8ecb0227d 100644 --- a/include/delphi/m_core.inc +++ b/include/delphi/m_core.inc @@ -426,6 +426,17 @@ 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;
+ external CoreDLL name 'mir_createLog';
+
+function mir_writeLogA(hLog:THandle; format:PAnsiChar):int;cdecl;
+ external CoreDLL name 'mir_writeLogA';
+function mir_writeLogW(hLog:THandle; format:PWideChar):int;cdecl;
+ external CoreDLL name 'mir_writeLogW';
+
+///////////////////////////////////////////////////////////////////////////////
// md5 functions
// Define the state of the MD5 Algorithm.
diff --git a/include/m_core.h b/include/m_core.h index 9c4461b407..a800afe873 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -521,6 +521,17 @@ MIR_CORE_DLL(void) List_Copy(SortedList* s, SortedList* d, size_t itemSiz MIR_CORE_DLL(void) List_ObjCopy(SortedList* s, SortedList* d, size_t itemSize);
///////////////////////////////////////////////////////////////////////////////
+// logging functions
+
+MIR_CORE_DLL(HANDLE) mir_createLog(const TCHAR *ptszFile, unsigned options);
+
+MIR_C_CORE_DLL(int) mir_writeLogA(HANDLE logger, const char *format, ...);
+MIR_C_CORE_DLL(int) mir_writeLogW(HANDLE logger, const WCHAR *format, ...);
+
+MIR_CORE_DLL(int) mir_writeLogVA(HANDLE logger, const char *format, va_list args);
+MIR_CORE_DLL(int) mir_writeLogVW(HANDLE logger, const WCHAR *format, va_list args);
+
+///////////////////////////////////////////////////////////////////////////////
// md5 functions
/* Define the state of the MD5 Algorithm. */
@@ -719,6 +730,9 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); }; #define mir_sntprintf mir_snwprintf
#define mir_vsntprintf mir_vsnwprintf
+
+ #define mir_writeLogT mir_writeLogW
+ #define mir_writeLogVT mir_writeLogVW
#else
#define mir_t2a(s) mir_strdup(s)
#define mir_a2t(s) mir_strdup(s)
@@ -743,6 +757,9 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); }; #define mir_sntprintf mir_snprintf
#define mir_vsntprintf mir_vsnprintf
+
+ #define mir_writeLogT mir_writeLogA
+ #define mir_writeLogVT mir_writeLogVA
#endif
MIR_CORE_DLL(WCHAR*) mir_a2u_cp(const char* src, int codepage);
|