P/Invoking CreateToolhelp32Snapshot failing in Compact Framework
问题 Hey, im doing a little app for my smart phone, using Windows Mobile 6. I'm trying to get all currently running processec, but method CreateToolhelp32Snapshot always returns -1. So now im stuck. I tried to get error with invoking GetLastError() method, but that method returns 0 value. Here is a snippet of my code. private const int TH32CS_SNAPPROCESS = 0x00000002; [DllImport("toolhelp.dll")] public static extern IntPtr CreateToolhelp32Snapshot(uint flags, uint processid); public static Process