NtQueryInformationProcess 在 Visual Studio 2010 中不起作用
我有一个奇怪的问题,我之前没有遇到过,我必须提到我的主要编程语言是delphi而不是c++,我可能会犯一个愚蠢的错误并且没有意识到这一点。
我有以下代码:
ULONG myret;
PROCESS_BASIC_INFORMATION PRC;
...
NtQueryInformationProcess(hProcess,ProcessBasicInformation,(PVOID)(&PRC),sizeof(PROCESS_BASIC_INFORMATION),(PULONG)(&myret));
...
我收到以下错误消息:
GetCommandArgs.obj:错误 LNK2019:无法解析的外部符号 _NtQueryInformationProcess@20 在函数 _wmain 中引用
有什么问题?非常感谢。
I have a strange problem that i didn't encounter before i must mention that my main programming language is delphi not c++ and i might do a stupid mistake and don't realise it.
I have the following code :
ULONG myret;
PROCESS_BASIC_INFORMATION PRC;
...
NtQueryInformationProcess(hProcess,ProcessBasicInformation,(PVOID)(&PRC),sizeof(PROCESS_BASIC_INFORMATION),(PULONG)(&myret));
...
I get the following error message :
GetCommandArgs.obj : error LNK2019: unresolved external symbol
_NtQueryInformationProcess@20 referenced in function _wmain
What is the problem ? Thanks very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是设计使然。在司法部和解协议的强制下,微软对于必须记录该功能并不太高兴。 MSDN 文章中对此说得很清楚:
最后一行告诉您必须做什么。第一行告诉你为什么不应该这样做。
This is by design. Microsoft wasn't very happy about having to document the function, forced to by the Department of Justice settlement. It is clearly spelled out in the MSDN article for it:
The last line tells you what you have to do. The first line tells you why you shouldn't.