proper windows get process function name, fix batch file, add echoes back
This commit is contained in:
parent
5f3d7e8940
commit
e9f9f6f369
3 changed files with 5 additions and 4 deletions
|
|
@ -25,9 +25,9 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
#ifdef WIN
|
#ifdef WIN
|
||||||
hndl = (void*) LoadLibrary((char const*)"./shared.dll");
|
hndl = (void*) LoadLibrary((char const*)"./shared.dll");
|
||||||
status = (pFunc)GetProcessAddress((HMODULE) hndl, (char const*)"status");
|
status = (pFunc)GetProcAddress((HMODULE) hndl, (char const*)"status");
|
||||||
count = (pFunc)GetProcessAddress((HMODULE) hndl, (char const*)"count");
|
count = (pFunc)GetProcAddress((HMODULE) hndl, (char const*)"count");
|
||||||
occupiedMem = (pFunc)GetProcessAddress((HMODULE) hndl, (char const*)"occupiedMem");
|
occupiedMem = (pFunc)GetProcAddress((HMODULE) hndl, (char const*)"occupiedMem");
|
||||||
#else /* OSX || NIX */
|
#else /* OSX || NIX */
|
||||||
hndl = (void*) dlopen((char const*)"./libshared.so", RTLD_LAZY);
|
hndl = (void*) dlopen((char const*)"./libshared.so", RTLD_LAZY);
|
||||||
status = (pFunc) dlsym(hndl, (char const*)"status");
|
status = (pFunc) dlsym(hndl, (char const*)"status");
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,4 @@ set INC=
|
||||||
|
|
||||||
nim c shared.nim
|
nim c shared.nim
|
||||||
nim c -o:nmain main.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%
|
||||||
|
|
|
||||||
|
|
@ -57,4 +57,5 @@ proc count() {.exportc: "count", dynlib.} =
|
||||||
|
|
||||||
proc occupiedMem() {.exportc: "occupiedMem", dynlib.} =
|
proc occupiedMem() {.exportc: "occupiedMem", dynlib.} =
|
||||||
#echo("Occupied Memmory: ", getOccupiedMem())
|
#echo("Occupied Memmory: ", getOccupiedMem())
|
||||||
|
discard
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue