[DllImport("user32.dll", EntryPoint="CallWindowProc")]
public static extern int CallWindowProc (
int lpPrevWndFunc,
int hWnd,
int Msg,
int wParam,
int lParam
);

解决方案 »

  1.   

    谢谢您。
    CallWindowProc& 中的 “&”代表什么意思哦 ?
      

  2.   

    CallWindowProc& 表示其返回值为string类型
      

  3.   

    好像&是long类型(长整型),而$是字符串类型吧,记不清了,但是那符号一定表示的是类型,很久没用VB了,不记得了
      

  4.   

    大家都帮我顶一下:
    http://topic.csdn.net/u/20080218/11/88649ad6-c946-46f8-9546-926a9c583376.html
      

  5.   


    user32是Windows标准库,这样的api随便找,有现成的C#版,不用费劲翻译。直接搜索:“C# CallWindowProc”
    当然更恰当的搜索是:“C# CallWindowProc DllImport static extern”
    [DllImport("User32.dll")]
    private static extern IntPtr CallWindowProc(IntPtr prevWndFunc, IntPtr hWnd, int iMsg, IntPtr wParam, IntPtr lParam);
    &在VB中标识long类型按原来的意思翻译出来是这个
    [DllImport("user32")]
    private static extern long CallWindowProc(long lpPrevWndFunc, long hWnd, long Msg, long wParam, long lParam);
    不过long是64位,IntPtr才是32位。是否能正常调用,自己通过测试验证。
      

  6.   

    谢谢呀,再帮我翻译一句好么?
    Public Declare Function GdiplusStartup Lib "GdiPlus" (token As Long, inputbuf As GdiplusStartupInput, Optional ByVal outputbuf As Long = 0) As GpStatus