3 回答

TA貢獻1725條經驗 獲得超8個贊
總而言之,亞歷山大·葉祖托夫(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 關注
- 984 瀏覽
添加回答
舉報