网站首页  词典首页

请输入您要查询的函数:

 

术语 ddeinitialize
释义 DdeInitialize
语法:
UINT DdeInitialize( LPDWORD pidInst,
PFNCALLBACK pfnCallback,
DWORD afCmd,
DWORD ulRes
);
DdeInitialize功能
该DdeInitialize功能寄存器与动态数据交换管理库(DDEML的)应用程序。应用程序必须调用之前调用任何其他动态数据交换管理库(DDEML的)功能,此功能。
参数
pidInst
[中,out]指向的应用程序实例标识符。在初始化时,此参数应指向0。如果函数成功,以应用程序的实例标识符此参数点。此值应通过为所有其他DDEML的职能idInst参数,需要它。如果应用程序使用的DDEML动态链接库(DLL)的多个实例,应用程序应为每个实例提供一个不同的回调函数。
如果为一个非零值pidInst点的DDEML重新初始化是不言而喻的。在这种情况下,pidInst必须指向一个有效的应用实例标识符。
pfnCallback
[in]指向应用程序定义的动态数据交换(DDE)回调函数。这个函数过程的系统发送DDE的交易。有关详细信息,请参阅DdeCallback回调函数。
afCmd
[in]指定一组APPCMD_,CBF_和MF_标志。在APPCMD_旗提供特别指示DdeInitialize。在CBF_标志指定过滤器,防止回调函数达到特定类型的交易。在MF_标志指定DDE的活动类型,一个DDE监视应用程序监控。使用这些标志增强了消除不必要的调用回调函数的一个DDE应用程序的性能。
此参数可以是一个或多个下列值。
APPCLASS_MONITOR
可让应用程序监控系统中的DDE的活动。这个标志是由DDE的监控应用。应用程序指定的DDE活动的种类,监测相结合APPCLASS_MONITOR国旗的一个或多个监视器标志。有关详细信息,请参阅下面的备注部分。
APPCLASS_STANDARD
申请登记为标准(nonmonitoring)DDEML的应用程序。
APPCMD_CLIENTONLY
防止成为一个DDE对话服务器的应用程序。该应用程序只能是一个客户端。这个标志的DDEML的减少资源消耗。它包括了CBF_FAIL_ALLSVRXACTIONS国旗的功能。
APPCMD_FILTERINITS
Prevents the DDEML from sending XTYP_CONNECT and XTYP_WILDCONNECT transactions to the application until the application has created its string handles and registered its service names or has turned off filtering by a subsequent call to the DdeNameService or DdeInitialize function.这个标志实际上是永远当应用程序调用首次DdeInitialize,无论应用程序指定的标志。在后续调用DdeInitialize不指定这个标志,关闭应用程序的服务名称过滤器,但它在指定应用程序的服务名称过滤器打开。
CBF_FAIL_ALLSVRXACTIONS
阻止接收服务器交易的回调函数。该系统返回DDE_FNOTPROCESSED到每个客户端发送一个交易此应用程序。此标志相当于所有CBF_FAIL_相结合的标志。
CBF_FAIL_ADVISES
无法接受XTYP_ADVSTART和XTYP_ADVSTOP交易的回调函数。该系统返回DDE_FNOTPROCESSED到每个客户端发送一个XTYP_ADVSTART或XTYP_ADVSTOP交易服务器。
CBF_FAIL_CONNECTIONS
无法接受XTYP_CONNECT和XTYP_WILDCONNECT交易的回调函数。
CBF_FAIL_EXECUTES
防止接收XTYP_EXECUTE交易的回调函数。系统返回DDE_FNOTPROCESSED向客户端发送一个XTYP_EXECUTE交易服务器。
CBF_FAIL_POKES
防止接收XTYP_POKE交易的回调函数。系统返回DDE_FNOTPROCESSED向客户端发送一个XTYP_POKE交易服务器。
CBF_FAIL_REQUESTS
防止接收XTYP_REQUEST交易的回调函数。系统返回DDE_FNOTPROCESSED到客户端XTYP_REQUEST事务发送到服务器。
CBF_FAIL_SELFCONNECTIONS
无法接收来自应用程序自己的实例XTYP_CONNECT交易的回调函数。此标志阻止其建立自己的实例DDE对话的申请。应用程序应该使用这个标志,如果需要与自身的其他实例,但与本身。
CBF_SKIP_ALLNOTIFICATIONS
无法收到任何通知的回调函数。此标志相当于所有CBF_SKIP_相结合的标志。
CBF_SKIP_CONNECT_CONFIRMS
防止接收XTYP_CONNECT_CONFIRM通知的回调函数。
CBF_SKIP_DISCONNECTS
防止接收XTYP_DISCONNECT通知的回调函数。
CBF_SKIP_REGISTRATIONS
防止接收XTYP_REGISTER通知的回调函数。
CBF_SKIP_UNREGISTRATIONS
防止接收XTYP_UNREGISTER通知的回调函数。
MF_CALLBACKS
回调函数通知每当交易系统发送任何DDE回调函数。
MF_CONV
通知回调函数每当对话是建立或已终止。
MF_ERRORS
通知回调函数时,一个DDE错误。
MF_HSZ_INFO
通知回调函数时,一个DDE应用程序创建,释放,或增量字符串的处理或处理字符串时使用计数被释放,作为调用的结果对DdeUninitialize功能。
MF_LINKS
通知回调函数每当通知循环启动或结束。
MF_POSTMSGS
通知回调函数时,系统或应用程序的职位一个DDE消息。
MF_SENDMSGS
通知回调函数时,系统或应用程序发送一个DDE消息。
ulRes
版权所有;必须设置为零。
返回值
如果函数成功,返回值是DMLERR_NO_ERROR。
如果函数失败,返回值是下列值之一:
DMLERR_DLL_USAGE
DMLERR_INVALIDPARAMETER
DMLERR_SYS_ERROR
备注
应用程序使用的DDEML多个实例不得通过实例间DDEML的对象。
一个DDE监测中的应用不应该试图执行DDE的操作(建立会话,交易问题等,在同一应用程序的实例的上下文中)。
阿同步交易失败,如果有相同的任务,例如已经进行同步交易的DMLERR_REENTRANCY错误。
在CBF_FAIL_ALLSVRXACTIONS标志导致DDEML的过滤所有服务器的事务,可以通过后续调用DdeInitialize改变。在APPCMD_CLIENTONLY旗防止服务器创造了DDEML的重要资源,不能由后续调用DdeInitialize改变。
有一个ANSI版本和Unicode版本的DdeInitialize。该版本,称为决定了用于控制DDE的对话(ANSI或Unicode)的窗口程序类型,为CONVCONTEXT结构(CP_WINANSI或CP_WINUNICODE)iCodePage成员的默认值。
在Windows 95/98/Me:DdeInitializeW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 user32.dll
在Ddeml.h HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
动态数据交换管理库概述
==英文原文==DdeInitialize Function
The DdeInitialize function registers an application with the Dynamic Data Exchange Management Library (DDEML). An application must call this function before calling any other Dynamic Data Exchange Management Library (DDEML) function.
Syntax
UINT DdeInitialize( LPDWORD pidInst,
PFNCALLBACK pfnCallback,
DWORD afCmd,
DWORD ulRes
);
Parameters
pidInst
[in, out] Pointer to the application instance identifier. At initialization, this parameter should point to 0. If the function succeeds, this parameter points to the instance identifier for the application. This value should be passed as the idInst parameter in all other DDEML functions that require it. If an application uses multiple instances of the DDEML dynamic-link library (DLL), the application should provide a different callback function for each instance.
If pidInst points to a nonzero value, reinitialization of the DDEML is implied. In this case, pidInst must point to a valid application-instance identifier.
pfnCallback
[in] Pointer to the application-defined Dynamic Data Exchange (DDE) callback function. This function processes DDE transactions sent by the system. For more information, see the DdeCallback callback function.
afCmd
[in] Specifies a set of APPCMD_, CBF_, and MF_ flags. The APPCMD_ flags provide special instructions to DdeInitialize. The CBF_ flags specify filters that prevent specific types of transactions from reaching the callback function. The MF_ flags specify the types of DDE activity that a DDE monitoring application monitors. Using these flags enhances the performance of a DDE application by eliminating unnecessary calls to the callback function.
This parameter can be one or more of the following values.
APPCLASS_MONITOR
Makes it possible for the application to monitor DDE activity in the system. This flag is for use by DDE monitoring applications. The application specifies the types of DDE activity to monitor by combining one or more monitor flags with the APPCLASS_MONITOR flag. For details, see the following Remarks section.
APPCLASS_STANDARD
Registers the application as a standard (nonmonitoring) DDEML application.
APPCMD_CLIENTONLY
Prevents the application from becoming a server in a DDE conversation. The application can only be a client. This flag reduces consumption of resources by the DDEML. It includes the functionality of the CBF_FAIL_ALLSVRXACTIONS flag.
APPCMD_FILTERINITS
Prevents the DDEML from sending XTYP_CONNECT and XTYP_WILDCONNECT transactions to the application until the application has created its string handles and registered its service names or has turned off filtering by a subsequent call to the DdeNameService or DdeInitialize function. This flag is always in effect when an application calls DdeInitialize for the first time, regardless of whether the application specifies the flag. On subsequent calls to DdeInitialize, not specifying this flag turns off the application's service-name filters, but specifying it turns on the application's service name filters.
CBF_FAIL_ALLSVRXACTIONS
Prevents the callback function from receiving server transactions. The system returns DDE_FNOTPROCESSED to each client that sends a transaction to this application. This flag is equivalent to combining all CBF_FAIL_ flags.
CBF_FAIL_ADVISES
Prevents the callback function from receiving XTYP_ADVSTART and XTYP_ADVSTOP transactions. The system returns DDE_FNOTPROCESSED to each client that sends an XTYP_ADVSTART or XTYP_ADVSTOP transaction to the server.
CBF_FAIL_CONNECTIONS
Prevents the callback function from receiving XTYP_CONNECT and XTYP_WILDCONNECT transactions.
CBF_FAIL_EXECUTES
Prevents the callback function from receiving XTYP_EXECUTE transactions. The system returns DDE_FNOTPROCESSED to a client that sends an XTYP_EXECUTE transaction to the server.
CBF_FAIL_POKES
Prevents the callback function from receiving XTYP_POKE transactions. The system returns DDE_FNOTPROCESSED to a client that sends an XTYP_POKE transaction to the server.
CBF_FAIL_REQUESTS
Prevents the callback function from receiving XTYP_REQUEST transactions. The system returns DDE_FNOTPROCESSED to a client that sends an XTYP_REQUEST transaction to the server.
CBF_FAIL_SELFCONNECTIONS
Prevents the callback function from receiving XTYP_CONNECT transactions from the application's own instance. This flag prevents an application from establishing a DDE conversation with its own instance. An application should use this flag if it needs to communicate with other instances of itself but not with itself.
CBF_SKIP_ALLNOTIFICATIONS
Prevents the callback function from receiving any notifications. This flag is equivalent to combining all CBF_SKIP_ flags.
CBF_SKIP_CONNECT_CONFIRMS
Prevents the callback function from receiving XTYP_CONNECT_CONFIRM notifications.
CBF_SKIP_DISCONNECTS
Prevents the callback function from receiving XTYP_DISCONNECT notifications.
CBF_SKIP_REGISTRATIONS
Prevents the callback function from receiving XTYP_REGISTER notifications.
CBF_SKIP_UNREGISTRATIONS
Prevents the callback function from receiving XTYP_UNREGISTER notifications.
MF_CALLBACKS
Notifies the callback function whenever a transaction is sent to any DDE callback function in the system.
MF_CONV
Notifies the callback function whenever a conversation is established or terminated.
MF_ERRORS
Notifies the callback function whenever a DDE error occurs.
MF_HSZ_INFO
Notifies the callback function whenever a DDE application creates, frees, or increments the usage count of a string handle or whenever a string handle is freed as a result of a call to the DdeUninitialize function.
MF_LINKS
Notifies the callback function whenever an advise loop is started or ended.
MF_POSTMSGS
Notifies the callback function whenever the system or an application posts a DDE message.
MF_SENDMSGS
Notifies the callback function whenever the system or an application sends a DDE message.
ulRes
Reserved; must be set to zero.
Return Value
If the function succeeds, the return value is DMLERR_NO_ERROR.
If the function fails, the return value is one of the following values:
DMLERR_DLL_USAGE
DMLERR_INVALIDPARAMETER
DMLERR_SYS_ERROR
Remarks
An application that uses multiple instances of the DDEML must not pass DDEML objects between instances.
A DDE monitoring application should not attempt to perform DDE operations (establish conversations, issue transactions, and so on) within the context of the same application instance.
A synchronous transaction fails with a DMLERR_REENTRANCY error if any instance of the same task has a synchronous transaction already in progress.
The CBF_FAIL_ALLSVRXACTIONS flag causes the DDEML to filter all server transactions and can be changed by a subsequent call to DdeInitialize. The APPCMD_CLIENTONLY flag prevents the DDEML from creating key resources for the server and cannot be changed by a subsequent call to DdeInitialize.
There is an ANSI version and a Unicode version of DdeInitialize. The version called determines the type of the window procedures used to control DDE conversations (ANSI or Unicode), and the default value for the iCodePage member of the CONVCONTEXT structure (CP_WINANSI or CP_WINUNICODE).
Windows 95/98/Me: DdeInitializeW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Ddeml.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Dynamic Data Exchange Management Library Overview
==原始网址==http://msdn.microsoft.com/en-us/library/ms648757(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:22:51