将一个dll 插入一个 第三方 程序然后 拦截到网络流量数据再把该数据 发送给我的监控 程序应该用 sendmessage吗?
具体说说 这个函数 该怎么理解呢 怎么用?最好贴点代码
这个算进程 通讯吗
进程间发送数据 用什么办法比较好如果有多余的时间 给我讲讲怎么将一个dll 插入一个 第三方 程序

解决方案 »

  1.   

    WINUSERAPI LRESULT WINAPI SendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)句柄 HWND hWnd,
    消息值  UINT Msg,
    详细的参数信息 WPARAM wParam, LPARAM lParam
    SendMessage是同步的。消息发送后,在消息响应以后在执行下一步。
    PostMessage是异步的。消息发送以后就不管了。继续下一步。
      

  2.   

    跨进程或跨线程,不要用SendMessage,可以用PostMessage,使用SendMessage可能会有问题.
    windows核心编程上讲有四种方法
    1)使用SendMessage,但是在处理Message的WinProc里加RelayMessage
    2)SendMessageTimeOut
    3)SendMessageNotify
    4)SendNotifyMessage。
      

  3.   

    PostMessage 到底是发给窗口 还是进程啊 我糊涂了
      

  4.   

    http://topic.csdn.net/u/20100728/10/d4b3fc72-f480-4272-a987-d65f1ffb5f71.html
    这里面的句柄问题
      

  5.   

    发给窗口能贴点代码吗
    http://topic.csdn.net/u/20100729/18/87c0d225-4c78-4133-913b-e88d13342c6c.html?seed=1740084843&r=67338157#r_67338157
    另外帮我看看
      

  6.   

    LRESULT SendMessage(
      HWND hWnd,      // handle to destination window
      UINT Msg,       // message
      WPARAM wParam,  // first message parameter
      LPARAM lParam   // second message parameter
    );
    Parameters
    hWnd 
    [in] Handle to the window whose window procedure will receive the message. If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows. 
    Msg 
    [in] Specifies the message to be sent. 
    wParam 
    [in] Specifies additional message-specific information. 
    lParam 
    [in] Specifies additional message-specific information. 明细的需要看MSDN的解释。另外你要拦截到第三方软件的网络流量数据光是sendmessage恐怕不行吧。要把dll注入到第三方程序要用到hook钩子才行,具体的函数是SetWindowsHookEx,再具体的你就得去查MSDN了。一言两语说不清楚得
      

  7.   

    sendmessage 发送流量应该是INT 吧 第2、3、4参数怎么用
      

  8.   

    我想让一个 程序 发送int 数据给另外一个程序,在界面显示数字用sendmessage 怎么实现