Browse Source

Compilation on WIndows

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2190 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 17 years ago
parent
commit
cf986d85a8
1 changed files with 4 additions and 7 deletions
  1. +4
    -7
      common/JackInternalClient.h

+ 4
- 7
common/JackInternalClient.h View File

@@ -61,16 +61,15 @@ class JackInternalClient : public JackClient

#ifdef WIN32

#include <windows.h>
#include <windows.h>
#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);


Loading…
Cancel
Save