#include <windows.h>
#include <psapi.h>
#include "epicsStdio.h"
#include "epicsFindSymbol.h"
Go to the source code of this file.
#define epicsEnumProcessModules EnumProcessModules |
LIBCOM_API void* epicsStdCall epicsFindSymbol |
( |
const char * |
name | ) |
|
Definition at line 76 of file osdFindSymbol.c.
78 HANDLE proc = GetCurrentProcess();
80 DWORD nalloc=0u, needed=0u;
92 if(!(dlls = malloc(nalloc = needed))) {
104 for(i=0, ndlls = nalloc/
sizeof(*dlls); !ret && i<ndlls; i++) {
105 ret = GetProcAddress(dlls[i], name);
106 if(!ret && GetLastError()!=ERROR_PROC_NOT_FOUND) {
STORE DWORD epicsLoadErrorCode
#define epicsEnumProcessModules
LIBCOM_API const char* epicsLoadError |
( |
void |
| ) |
|
Definition at line 45 of file osdFindSymbol.c.
47 STORE char buffer[100];
51 FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,
56 sizeof(buffer)-1,
NULL );
63 for(; n>=1 && (buffer[n-1]==
'\n' || buffer[n-1]==
'\r'); n--)
67 "Unable to format WIN32 error code %lu",
69 buffer[
sizeof(buffer)-1] =
'\0';
STORE DWORD epicsLoadErrorCode
LIBCOM_API int epicsStdCall epicsSnprintf(char *str, size_t size, const char *format,...) EPICS_PRINTF_STYLE(3
LIBCOM_API void* epicsLoadLibrary |
( |
const char * |
name | ) |
|
Definition at line 35 of file osdFindSymbol.c.
40 lib = LoadLibrary(name);
STORE DWORD epicsLoadErrorCode
STORE DWORD epicsLoadErrorCode = 0 |