网站首页  词典首页

请输入您要查询的函数:

 

术语 ddecreatedatahandle
释义 DdeCreateDataHandle
语法:
HDDEDATA DdeCreateDataHandle( DWORD idInst,
LPBYTE pSrc,
DWORD cb,
DWORD cbOff,
HSZ hszItem,
UINT wFmt,
UINT afCmd
);
DdeCreateDataHandle功能
该DdeCreateDataHandle函数创建一个动态数据交换(DDE)对象,并填充由指定的缓冲区中的数据对象。一个DDE应用程序使用过程中涉及的交易数据传递给合作伙伴的应用程序这个功能。
参数
idInst
[in]指定的应用程序实例标识符先前调用DdeInitialize函数获得。
警察体育游乐会
[in]指向的缓冲区中包含的数据复制到DDE的对象。如果该参数为NULL,没有数据复制到对象。
立法会CB
[in]指定的内存量,以字节为单位,以从缓冲区拷贝所指向警察体育游乐会。 (包括终止NULL,如果数据是一个字符串)。如果此参数为0,警察体育游乐会参数被忽略。
cbOff
[in]指定的偏移量,以字节为单位,从缓冲区的开始指向警察体育游乐会参数。在这个数据偏移量从缓冲区到DDE的对象复制的开始。
hszItem
[in]句柄字符串,指定相应的数据项的DDE对象。这种处理,必须是被以前的调用DdeCreateStringHandle函数创建。如果数据处理是,在一个XTYP_EXECUTE交易的,该参数必须0L。
wFmt
[in]指定数据的标准剪贴板格式。
afCmd
[in]指定建立的标志。此参数可以HDATA_APPOWNED,其中规定,服务器应用程序调用DdeCreateDataHandle功能拥有数据处理这个函数创建。这个标志使应用程序共享数据处理与其他动态数据交换管理库(DDEML的),而不是创建一个单独的处理程序传递给每个应用程序。如果这个标志被指定,应用程序必须最终免费共享内存对象的句柄使用DdeFreeDataHandle功能相关。如果此标志没有被指定,变得无效处理的应用程序中创建的处理后的数据处理是应用程序的DDE回调函数返回或在另一个DDEML的函数的参数。
返回值
如果函数成功,返回值是一个数据处理。
如果函数失败,返回值是0L。
该DdeGetLastError函数可用于获得错误代码,它可以是下列值之一:
DMLERR_DLL_NOT_INITIALIZED
DMLERR_INVALIDPARAMETER
DMLERR_MEMORY_ERROR
DMLERR_NO_ERROR
备注
DDE的对象在任何地点,剩余是不确定的。
处理后的数据已被用来作为另一个DDEML的功能参数,或已由DDE回调函数返回的句柄只能进行读访问DDE的对象确定手柄使用。
功能信息
最低DLL版本 user32.dll
在Ddeml.h HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
参见
动态数据交换管理库概况,DdeAccessData,DdeCreateStringHandle,DdeFreeDataHandle,DdeGetData,DdeInitialize
==英文原文==DdeCreateDataHandle Function
The DdeCreateDataHandle function creates a Dynamic Data Exchange (DDE) object and fills the object with data from the specified buffer. A DDE application uses this function during transactions that involve passing data to the partner application.
Syntax
HDDEDATA DdeCreateDataHandle( DWORD idInst,
LPBYTE pSrc,
DWORD cb,
DWORD cbOff,
HSZ hszItem,
UINT wFmt,
UINT afCmd
);
Parameters
idInst
[in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize function.
pSrc
[in] Pointer to a buffer that contains data to be copied to the DDE object. If this parameter is NULL, no data is copied to the object.
cb
[in] Specifies the amount of memory, in bytes, to copy from the buffer pointed to by pSrc. (include the terminating NULL, if the data is a string). If this parameter is zero, the pSrc parameter is ignored.
cbOff
[in] Specifies an offset, in bytes, from the beginning of the buffer pointed to by the pSrc parameter. The data beginning at this offset is copied from the buffer to the DDE object.
hszItem
[in] Handle to the string that specifies the data item corresponding to the DDE object. This handle must have been created by a previous call to the DdeCreateStringHandle function. If the data handle is to be used in an XTYP_EXECUTE transaction, this parameter must be 0L.
wFmt
[in] Specifies the standard clipboard format of the data.
afCmd
[in] Specifies the creation flags. This parameter can be HDATA_APPOWNED, which specifies that the server application calling the DdeCreateDataHandle function owns the data handle this function creates. This flag enables the application to share the data handle with other Dynamic Data Exchange Management Library (DDEML) applications rather than creating a separate handle to pass to each application. If this flag is specified, the application must eventually free the shared memory object associated with the handle by using the DdeFreeDataHandle function. If this flag is not specified, the handle becomes invalid in the application that created the handle after the data handle is returned by the application's DDE callback function or is used as a parameter in another DDEML function.
Return Value
If the function succeeds, the return value is a data handle.
If the function fails, the return value is 0L.
The DdeGetLastError function can be used to get the error code, which can be one of the following values:
DMLERR_DLL_NOT_INITIALIZED
DMLERR_INVALIDPARAMETER
DMLERR_MEMORY_ERROR
DMLERR_NO_ERROR
Remarks
Any unfilled locations in the DDE object are undefined.
After a data handle has been used as a parameter in another DDEML function or has been returned by a DDE callback function, the handle can be used only for read access to the DDE object identified by the handle.
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Ddeml.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
See Also
Dynamic Data Exchange Management Library Overview , DdeAccessData , DdeCreateStringHandle , DdeFreeDataHandle , DdeGetData , DdeInitialize
==原始网址==http://msdn.microsoft.com/en-us/library/ms648747(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:29:44