六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 165|回复: 0

sendmessage

[复制链接]

升级  66.67%

42

主题

42

主题

42

主题

秀才

Rank: 2

积分
150
 楼主| 发表于 2013-2-5 02:09:43 | 显示全部楼层 |阅读模式
as we know, sendmessage in win32 api is able to send a message to some window based controls so that the callback proc will deal with it.
 
for thos controls don't reside in the same process, we may try to get their hwnds first. These hwnds should be placed in a shared area (usually, these hwnds are defined
within the block #pragma data_seg("shared") #pragma data_seg()
 
otherwise, the sendmessage doesn't work.
 
reference: check the book windows via c/c++ by Jeffry ricther
it is a great book for windows programming.
 
ps: in an early post, i said i needed to hook the process before using sendmessage, however i was wrong. sendmessage can work directly as long as the hwnd is not passed from other process.
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表