-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type Issues #13
Comments
Simple Code that I was trying to compile...
Again works on Linux but not on Windows. |
Sorry for the issue, i'll take a look soon-ish and provide an update. |
Hi, I'm having the same issue. |
I know how to solve the issue, and did it in the code on my PC, but don't know how to edit the code here, otherwise I would. Anyway: In psutil_windows.nim, everwhere you get a LPWSTR error the var should be declared as wstring, for a LPSTR error, declare the var as cstring. These variables were declared as TCHAR or char arrays ##### var szProcessName: array[MAX_PATH, TCHAR]
var szProcessName: wstring
##### var filename: array[MAX_PATH, char]
var filename: cstring
##### var wcUser: array[512, TCHAR]
##### var wcDomain: array[512, TCHAR]
var wcUser: wstring
var wcDomain: wstring
It is in several places in the code that the declarations should be changed. It got broken because of a change in winim. BTW pid_names() doesn't work, it returns a seq with PIDs and a seq with empty strings. I don't need that, so did not check why. Mind that process_exists() is case sensitive ! If you want it case insensitive find the code and change to if name.toLowerAscii() == processName.toLowerAscii():
exists = true |
Type Issues in Windows side of psutil. I assume something changed in winim but I am uncertain.
Linux compiles and runs without issues.
Nim Version
winim version
psutil version
compilation output
The issues are not limited to this proc. I tried to run down my list of issues that I had as a result of trying to create a windows process list. Unfortunately the type issues go a bit deeper than I understand at this point.
The text was updated successfully, but these errors were encountered: