你好,你需要dllimport这个attribute来导入unmanaged 引用,就像我们调用系统API一样:
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);
因为 SendMessage是在user32.dll这个文件里,所以上面要写这个文件。
还有就是你这个C的dll必须先注册。
Mike Feng
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.