2 #include "getLocation.h"
6 static void die(char *msg) {
7 fprintf(stderr, "%s", msg);
11 char *getExecutable(void) {
16 i = 2048; /* plenty, PATH_MAX is 512 under Win32 */
19 die("Malloc failed\n");
21 r = GetModuleFileNameA(NULL, p, i);
23 die("getModuleFileName failed\n");
28 char *getExecutablePath(void) {
35 die("No '\\' in executable location\n");