An application sends the WM_COPYDATA message to pass data to another application
2009-07-28 22:55
387 查看
对于只是在有VB,VC开发两个应用程序中传递数组如此简单的数据,没必要用什么DLL,内存映射之类的大刀吧
WM_COPYDATA Message
--------------------------------------------------------------------------------
An application sends the WM_COPYDATA message to pass data to another application.
Syntax
To send this message, call the SendMessage function as follows.
lResult = SendMessage( // returns LRESULT in lResult (HWND) hWndControl, // handle to destination control (UINT) WM_COPYDATA, // message ID (WPARAM) wParam, // = (WPARAM) () wParam; (LPARAM) lParam // = (LPARAM) () lParam; );
Parameters
wParam
Handle to the window passing the data.
lParam
Pointer to a COPYDATASTRUCT structure that contains the data to be passed.
Return Value
If the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE.
The COPYDATASTRUCT structure contains data to be passed to another application by the WM_COPYDATA message.
Syntax
typedef struct tagCOPYDATASTRUCT {
ULONG_PTR dwData;
DWORD cbData;
PVOID lpData;
} COPYDATASTRUCT, *PCOPYDATASTRUCT;
Members
dwData
Specifies data to be passed to the receiving application.
cbData
Specifies the size, in bytes, of the data pointed to by the lpData member.
lpData
Pointer to data to be passed to the receiving application. This member can be NULL.
转来的,还没经过测试呢,如果有问题概不负责!!!
WM_COPYDATA Message
--------------------------------------------------------------------------------
An application sends the WM_COPYDATA message to pass data to another application.
Syntax
To send this message, call the SendMessage function as follows.
lResult = SendMessage( // returns LRESULT in lResult (HWND) hWndControl, // handle to destination control (UINT) WM_COPYDATA, // message ID (WPARAM) wParam, // = (WPARAM) () wParam; (LPARAM) lParam // = (LPARAM) () lParam; );
Parameters
wParam
Handle to the window passing the data.
lParam
Pointer to a COPYDATASTRUCT structure that contains the data to be passed.
Return Value
If the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE.
The COPYDATASTRUCT structure contains data to be passed to another application by the WM_COPYDATA message.
Syntax
typedef struct tagCOPYDATASTRUCT {
ULONG_PTR dwData;
DWORD cbData;
PVOID lpData;
} COPYDATASTRUCT, *PCOPYDATASTRUCT;
Members
dwData
Specifies data to be passed to the receiving application.
cbData
Specifies the size, in bytes, of the data pointed to by the lpData member.
lpData
Pointer to data to be passed to the receiving application. This member can be NULL.
转来的,还没经过测试呢,如果有问题概不负责!!!
相关文章推荐
- Using the Android Application class to persist data
- Apply a theme to an Activity or application
- 错误信息:This application has requested the Runtime to terminate it in an ...
- win8安装 Matlab,运行出现 this application has requested the runtime to terminate it in an unusual way .
- EF 6.0 The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value. c#中的时间
- The formatter threw an exception while trying to deserialize the message in WCF
- How To Programmatically Copy an IMG Element to the Clipboard
- An application has made an attempt to load the C runtime library incorrectly.
- Broadcast a message to multiple instance of an application
- [entity framework ] The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
- How to: How to disable Java Security Warning "The application requires an earlier version of Java."
- 创建虚拟机错误解决:Unable to find a 'userdata.img' file for ABI x86 to copy into the AVD folder.
- Preparing and Submitting an Application to the App Store with xCode4.2 and iOS5 SDK
- This application has requested the Runtime to terminate it in an unusual way
- 报错“Unable to find a 'userdata.img' file for ABIarmeabi to copy into the AVD folder.”
- mysql copy data from table to another
- How to Add Core Data to an existing Utility Application
- 关于C++程序运行程序是出现的this application has requested the runtime to terminate it in an unusual way. 异常分析
- 图像识别工程师 VS The application has requested the Runtime to terminate it in an unusual way.
- How to pass data to a Flex application using SWFObject 2.0