我試圖使用pInvoke,但在模擬器和設備上調用我是.NET新手(我是一名C++開發人員),我不明白JIT /框架如何找不到DLL /方法/等。我如何解決「System.MissingMethodException = {」在Windows 6.5上找不到PInvoke DLL'user32.dll'。「}?
有什麼我需要做的它的工作
在尋找類似的問題,看來我可能會或可能不會有添加DLL要麼溶液或CAB - ?但我在哪裏得到這個文件
肯定的操作系統。該設備有user3 2.DLL?而Windows 7版本不可能是正確的安裝在設備上的,可以嗎?
EDIT
的這些中的任何一個出現故障:
[DllImport("coredll.dll", EntryPoint = "FindWindowW", SetLastError = true)]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError=true)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);
[DllImport("user32.dll", SetLastError = true)]
internal static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
[DllImport("coredll.dll", EntryPoint = "SipShowIM")]
public static extern bool SipShowIMP(int code);
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
你能提供PInovke簽名? – JaredPar