Wince在进程控制程序里的解决办法 error LNK2019错误解决办法

今天写了个关于WINCE底层进程控制的小程序,很气愤的是一个叫优X的公司,很XX,所以我自己做了个,而且开源
叫CEProcessSitter。进程保姆。大家有需要的自己下。这里讲下遇到的一个小问题。

然后主要的问题是遇到了ERROR LINK 2019

I include in header "#include <tlhelp32.h>" but giving this error

Error 9 error LNK2019: unresolved external symbol Process32Next referenced in function "unsigned long __cdecl FindProcess(wchar_t *)" (?FindProcess@@YAKPA_W@Z) FileDB.obj
Error 10 error LNK2019: unresolved external symbol Process32First referenced in function "unsigned long __cdecl FindProcess(wchar_t *)" (?FindProcess@@YAKPA_W@Z) FileDB.obj
Error 11 error LNK2019: unresolved external symbol CreateToolhelp32Snapshot referenced in function "unsigned long __cdecl FindProcess(wchar_t *)" (?FindProcess@@YAKPA_W@Z) FileDB.obj
Error 12 fatal error LNK1120: 3 unresolved externals Windows Mobile 5.0 Smartphone SDK

WM和WINCE5.0都好像有这个问题。

解决办法是

This function retrieves information about the next process recorded in a system snapshot.

BOOL WINAPI Process32Next(
HANDLE hSnapshot,
LPPROCESSENTRY32 lppe
);
...
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Tlhelp32.h.
Link Library: Toolhelp.lib.



So this means you need to add the toolhelp.lib to your project.

You can use the compiler directive #pragma comment (lib,"toolhelp.lib") right after you include #include "tlhelp32.h"

Or you can add it to your project settings.

找到
toolhelp.lib然后拷贝到你程序的目录下应用就好了。

就这么简单。程序我传到google的CODE里面了。第一版。
下午出差。。。汗。。本来准备做一个把调用DLL的也显示的。等待第二版做了。。。

http://code.google.com/p/ceprocesssitter/downloads/detail?name=ProcessSitter%20For%20WinCE.rar&can=1&q=&sort=-filename#makechanges
Google的在这里下载了。

CSDN上我也会传上

http://download.csdn.net/source/574828

要的大家自己下拉。

你可能感兴趣的:(Wince在进程控制程序里的解决办法 error LNK2019错误解决办法)