|
|
@@ -67,40 +67,6 @@ class JackInternalClient : public JackClient |
|
|
|
#define UnloadJackModule(handle) FreeLibrary((handle)); |
|
|
|
#define GetJackProc(handle, name) GetProcAddress((handle), (name)); |
|
|
|
|
|
|
|
static void BuildClientPath(char* path_to_so, int path_len, const char* so_name) |
|
|
|
{ |
|
|
|
snprintf(path_to_so, path_len, ADDON_DIR "/%s.dll", 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(); |
|
|
|
|
|
|
|
FormatMessage( |
|
|
|
FORMAT_MESSAGE_ALLOCATE_BUFFER | |
|
|
|
FORMAT_MESSAGE_FROM_SYSTEM | |
|
|
|
FORMAT_MESSAGE_IGNORE_INSERTS, |
|
|
|
NULL, |
|
|
|
dw, |
|
|
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), |
|
|
|
(LPTSTR) &lpMsgBuf, |
|
|
|
0, NULL ); |
|
|
|
|
|
|
|
// Display the error message and exit the process |
|
|
|
lpDisplayBuf = (LPVOID)LocalAlloc(LMEM_ZEROINIT, |
|
|
|
(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); |
|
|
|
|
|
|
|
LocalFree(lpMsgBuf); |
|
|
|
LocalFree(lpDisplayBuf); |
|
|
|
} |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
#include <dlfcn.h> |
|
|
@@ -110,11 +76,6 @@ static void PrintLoadError(const char* so_name) |
|
|
|
#define GetJackProc(handle, name) dlsym((handle), (name)); |
|
|
|
#define PrintLoadError(so_name) jack_log("error loading %s err = %s", so_name, dlerror()); |
|
|
|
|
|
|
|
static void BuildClientPath(char* path_to_so, int path_len, const char* so_name) |
|
|
|
{ |
|
|
|
snprintf(path_to_so, path_len, ADDON_DIR "/%s.so", so_name); |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
typedef int (*InitializeCallback)(jack_client_t*, const char*); |
|
|
|