static char *win32_merger(DSO *dso, const char *filespec1,
const char *filespec2);
static int win32_pathbyaddr(void *addr,char *path,int sz);
-static DSO_FUNC_TYPE win32_globallookup(const char *name);
+static void *win32_globallookup(const char *name);
static const char *openssl_strnchr(const char *string, int c, size_t len);
}
else
{
- filespec1_split = win32_splitter(dso, filespec1, 1);
+ filespec1_split = win32_splitter(dso, filespec1, 0);
if (!filespec1_split)
{
DSOerr(DSO_F_WIN32_MERGER,
ERR_R_MALLOC_FAILURE);
return(NULL);
}
- filespec2_split = win32_splitter(dso, filespec2, 0);
+ filespec2_split = win32_splitter(dso, filespec2, 1);
if (!filespec2_split)
{
DSOerr(DSO_F_WIN32_MERGER,
dll = LoadLibrary(TEXT(DLLNAME));
if (dll == NULL)
{
- DSOerr(DSO_F_PATHBYADDR,DSO_R_UNSUPPORTED);
+ DSOerr(DSO_F_WIN32_PATHBYADDR,DSO_R_UNSUPPORTED);
return -1;
}
if (create_snap == NULL)
{
FreeLibrary(dll);
- DSOerr(DSO_F_PATHBYADDR,DSO_R_UNSUPPORTED);
+ DSOerr(DSO_F_WIN32_PATHBYADDR,DSO_R_UNSUPPORTED);
return -1;
}
/* We take the rest for granted... */
if( hModuleSnap == INVALID_HANDLE_VALUE )
{
FreeLibrary(dll);
- DSOerr(DSO_F_PATHBYADDR,DSO_R_UNSUPPORTED);
+ DSOerr(DSO_F_WIN32_PATHBYADDR,DSO_R_UNSUPPORTED);
return -1;
}
{
(*close_snap)(hModuleSnap);
FreeLibrary(dll);
- DSOerr(DSO_F_PATHBYADDR,DSO_R_FAILURE);
+ DSOerr(DSO_F_WIN32_PATHBYADDR,DSO_R_FAILURE);
return -1;
}
return 0;
}
-static DSO_FUNC_TYPE win32_globallookup(const char *name)
+static void *win32_globallookup(const char *name)
{
HMODULE dll;
HANDLE hModuleSnap = INVALID_HANDLE_VALUE;
dll = LoadLibrary(TEXT(DLLNAME));
if (dll == NULL)
{
- DSOerr(DSO_F_GLOBAL_LOOKUP_FUNC,DSO_R_UNSUPPORTED);
+ DSOerr(DSO_F_WIN32_GLOBALLOOKUP,DSO_R_UNSUPPORTED);
return NULL;
}
if (create_snap == NULL)
{
FreeLibrary(dll);
- DSOerr(DSO_F_GLOBAL_LOOKUP_FUNC,DSO_R_UNSUPPORTED);
+ DSOerr(DSO_F_WIN32_GLOBALLOOKUP,DSO_R_UNSUPPORTED);
return NULL;
}
/* We take the rest for granted... */
module_next = (MODULE32)GetProcAddress(dll,"Module32Next");
hModuleSnap = (*create_snap)(TH32CS_SNAPMODULE,0);
- if( hModuleSnap == INVALID_HANDLE_VALUE ) return NULL;
+ if( hModuleSnap == INVALID_HANDLE_VALUE )
+ {
+ FreeLibrary(dll);
+ DSOerr(DSO_F_WIN32_GLOBALLOOKUP,DSO_R_UNSUPPORTED);
+ return NULL;
+ }
me32.dwSize = sizeof(me32);
}
do {
- if (ret = GetProcAddress(me32.hModule,fname))
+ if ((ret = GetProcAddress(me32.hModule,name)))
{
(*close_snap)(hModuleSnap);
FreeLibrary(dll);