3 回答

TA貢獻(xiàn)1725條經(jīng)驗(yàn) 獲得超8個(gè)贊
總而言之,亞歷山大·葉祖托夫(Alexander Yezutov)構(gòu)成的簽名在x86和x64上均可工作。當(dāng)應(yīng)改用UIntPtr時(shí),Matt Howells簽名使用許多UInt32。我為CloseHandle使用了以下P / Invoke簽名,它似乎可以正常工作:
[DllImport("kernel32.dll", SetLastError = true)]
static extern bool CloseHandle(IntPtr hObject);
必須將以下內(nèi)容添加到由Mas發(fā)布的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啟動(dòng)時(shí),這將不起作用(至少在Win 7下)。父進(jìn)程必須從Windows資源管理器啟動(dòng)。
- 3 回答
- 0 關(guān)注
- 982 瀏覽
添加回答
舉報(bào)