Sha256: 597ab39bc32d5f2b39011a604bae666f9dc6fdef0f0f334c6ffd24e15e54a5f9
Contents?: true
Size: 1.06 KB
Versions: 41
Compression:
Stored size: 1.06 KB
Contents
#ifndef _NBEXECLOADER_H #define _NBEXECLOADER_H #include "utilsfuncs.h" #define HELP_MSG "" class NBExecLoader { typedef int (*StartPlatform)(int argc, char *argv[], const char *help, const char *name); public: NBExecLoader() : hLib(0) { } ~NBExecLoader() { if (hLib) { FreeLibrary(hLib); } } int start(const char *path, int argc, char *argv[], const char *name) { if (!hLib) { hLib = LoadLibrary(path); if (!hLib) { logErr(true, true, "Cannot load \"%s\".", path); return -1; } } StartPlatform startPlatform = (StartPlatform) GetProcAddress(hLib, "startPlatform"); if (!startPlatform) { logErr(true, true, "Cannot start platform, failed to find startPlatform() in %s", path); return -1; } logMsg("Starting platform... \n\tBinary name is: %s\n", name); return startPlatform(argc, argv, HELP_MSG, name); } private: HMODULE hLib; }; #endif /* _NBEXECLOADER_H */
Version data entries
41 entries across 41 versions & 1 rubygems