Skip to content
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 mismatch at GetModuleBaseName() #23

Open
angelside opened this issue Sep 10, 2022 · 1 comment
Open

Type mismatch at GetModuleBaseName() #23

angelside opened this issue Sep 10, 2022 · 1 comment

Comments

@angelside
Copy link

angelside commented Sep 10, 2022

Type mismatch at GetModuleBaseName()

OS: Windows 10
nim version: Nim Compiler Version 1.6.6 [Windows: amd64]

import psutil
.nimble\pkgs\psutil-0.6.0\psutil\psutil_windows.nim(151, 30) Error: type mismatch: got <HANDLE, HMODULE, array[0..259, TCHAR], DWORD>
but expected one of:
proc GetModuleBaseName(hProcess: HANDLE; hModule: HMODULE; lpBaseName: LPWSTR;
                       nSize: DWORD): DWORD
  first type mismatch at position: 3
  required type for lpBaseName: LPWSTR
  but expression 'szProcessName' is of type: array[0..259, TCHAR]

expression: GetModuleBaseName(hProcess, hMod, szProcessName, cast[DWORD](len(szProcessName)))

psutil_windows.nim(151, 30)

            GetModuleBaseName( hProcess, hMod, szProcessName, 
                               cast[DWORD](szProcessName.len) )
@fbpyr
Copy link

fbpyr commented Oct 14, 2022

I get the same error on win10 with nim 1.6.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants