From cf986d85a8bbeae210d1e99b2bdbd378a2eee3ea Mon Sep 17 00:00:00 2001 From: sletz Date: Mon, 28 Apr 2008 10:05:45 +0000 Subject: [PATCH] Compilation on WIndows git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2190 0c269be4-1314-0410-8aa9-9f06e86f4224 --- common/JackInternalClient.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/common/JackInternalClient.h b/common/JackInternalClient.h index 95d45ed6..23694f93 100644 --- a/common/JackInternalClient.h +++ b/common/JackInternalClient.h @@ -61,16 +61,15 @@ class JackInternalClient : public JackClient #ifdef WIN32 -#include +#include #define HANDLE HINSTANCE #define LoadJackModule(name) LoadLibrary((name)); #define UnloadJackModule(handle) FreeLibrary((handle)); #define GetJackProc(handle, name) GetProcAddress((handle), (name)); -void PrintLoadError(const char* so_name) +static void PrintLoadError(const char* so_name) { // Retrieve the system error message for the last-error code - LPVOID lpMsgBuf; LPVOID lpDisplayBuf; DWORD dw = GetLastError(); @@ -86,11 +85,9 @@ void PrintLoadError(const char* so_name) 0, NULL ); // Display the error message and exit the process - lpDisplayBuf = (LPVOID)LocalAlloc(LMEM_ZEROINIT, - (lstrlen((LPCTSTR)lpMsgBuf)+lstrlen((LPCTSTR)lpszFunction)+40)*sizeof(TCHAR)); - StringCchPrintf((LPTSTR)lpDisplayBuf, - LocalSize(lpDisplayBuf) / sizeof(TCHAR), + (lstrlen((LPCTSTR)lpMsgBuf) + lstrlen((LPCTSTR)so_name) + 40) * sizeof(TCHAR)); + _snprintf((LPTSTR)lpDisplayBuf, LocalSize(lpDisplayBuf) / sizeof(TCHAR), TEXT("error loading %s err = %s"), so_name, lpMsgBuf); jack_error((LPCTSTR)lpDisplayBuf);