Hey,
someone programming on windows and knows how to wrap the wchar arrays in nimrod strings?
Hi,
K i could print something out, but it was really cryptic. I've ported the tlhelp32 and tried iterating over the processnames in the snapshot. If somone wants to try it: https://github.com/FroznPanda/pandanimwin Tried something like:
echo(wstr)
if someone tried it and want to let me know it, im gladful.
Greets Froznpanda
Hello,
i think Araq is right about the character set of the console. newWideCString() works for me with DirectWrite, which uses Unicode (WCHAR array)
With best regards, enurlyx
Hi,
experimented the last day again with it printed the string out to a file. The output was a string of asian letters. Tried it in C. It's working(who would have thought). Then I printed out the values from the WCHAR array in nim. For some reason the array is getting filled with wrong values. That's what i found out so far, will look into it again.
FroznPanda
It works for me when I declare it as szExeFileName*: array[MAX_PATH, char] and then do this:
proc main =
var pe: PROCESSENTRY32
pe.dwSize = sizeof(PROCESSENTRY32).DWORD
let snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)
if Process32First(snapshot, pe.addr):
while Process32Next(snapshot, pe.addr):
echo pe.szExeFileName
main()
Hi,
thanks it's really working wouldn't have thought of trying it with normal char.
FroznPanda