in reply to Re^2: odd line in windows
in thread odd line in windows
I change = TEXT("<unknown>"); into = (TCHAR*) malloc( MAX_PATH * sizeof(TCHAR) ); it looks like working well now. but sequenced question is, how free this memory I allocate in C?
You should not be using malloc(). Did you miss my mention of Newx(), Newxc() Newxz() and the associated link?
how free this memory I allocate in C?
If you followed the link, you would have seen Safefree()
In my case, I just want to check process name.
I tend to use tasklist for that:
perl -E"my @tasks = map[ (split)[0,1] ], `tasklist /nh`; say qq[@$_] f +or @tasks"
|
|---|