proper windows get process function name, fix batch file, add echoes back

This commit is contained in:
Joseph Poirier
2015-01-08 13:40:06 -06:00
parent 5f3d7e8940
commit e9f9f6f369
3 changed files with 5 additions and 4 deletions

View File

@@ -25,9 +25,9 @@ int main(int argc, char* argv[])
#ifdef WIN
hndl = (void*) LoadLibrary((char const*)"./shared.dll");
status = (pFunc)GetProcessAddress((HMODULE) hndl, (char const*)"status");
count = (pFunc)GetProcessAddress((HMODULE) hndl, (char const*)"count");
occupiedMem = (pFunc)GetProcessAddress((HMODULE) hndl, (char const*)"occupiedMem");
status = (pFunc)GetProcAddress((HMODULE) hndl, (char const*)"status");
count = (pFunc)GetProcAddress((HMODULE) hndl, (char const*)"count");
occupiedMem = (pFunc)GetProcAddress((HMODULE) hndl, (char const*)"occupiedMem");
#else /* OSX || NIX */
hndl = (void*) dlopen((char const*)"./libshared.so", RTLD_LAZY);
status = (pFunc) dlsym(hndl, (char const*)"status");

View File

@@ -7,4 +7,4 @@ set INC=
nim c shared.nim
nim c -o:nmain main.nim
%CXX% %INC) %DEFS% %CFLAGS% -o cmain main.c %LNFLAGS% %LIBS%
%CXX% %INC% %DEFS% %CFLAGS% -o cmain main.c %LNFLAGS% %LIBS%

View File

@@ -57,4 +57,5 @@ proc count() {.exportc: "count", dynlib.} =
proc occupiedMem() {.exportc: "occupiedMem", dynlib.} =
#echo("Occupied Memmory: ", getOccupiedMem())
discard