3 回答
TA贡献1725条经验 获得超7个赞
总而言之,亚历山大·叶祖托夫(Alexander Yezutov)构成的签名在x86和x64上均可工作。当应改用UIntPtr时,Matt Howells签名使用许多UInt32。我为CloseHandle使用了以下P / Invoke签名,它似乎可以正常工作:
[DllImport("kernel32.dll", SetLastError = true)]
static extern bool CloseHandle(IntPtr hObject);
必须将以下内容添加到由Mas发布的app.manifest中:
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of all Windows versions that this application is designed to work with. Windows will automatically select the most compatible environment.-->
<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
最后,从Visual Studio启动时,这将不起作用(至少在Win 7下)。父进程必须从Windows资源管理器启动。
- 3 回答
- 0 关注
- 933 浏览
添加回答
举报