网站首页  词典首页

请输入您要查询的函数:

 

术语 ddenameservice
释义 DdeNameService
语法:
HDDEDATA DdeNameService( DWORD idInst,
UINT hsz1,
UINT hsz2,
UINT afCmd
);
DdeNameService功能
该DdeNameService函数注册或取消注册服务名称的动态数据交换(DDE)服务器的支持。这个函数会导致系统发送XTYP_REGISTER或XTYP_UNREGISTER交易到其他正在运行动态数据交换管理库(DDEML的)客户端应用程序。
参数
idInst
[in]指定的应用程序实例标识符先前调用DdeInitialize函数获得。
hsz1
[in]句柄的字符串,指定服务的名称服务器是登记或注销。一个应用程序,注销其服务的名称都应该将此参数设置为0L。
hsz2
版权所有;应设置为0L。
afCmd
[in]指定服务名称选择。此参数可以是下列值之一。
DNS_REGISTER
寄存器错误代码服务的名称。
DNS_UNREGISTER
注销错误代码服务的名称。如果hsz1参数0L,所有服务的服务器上注册的名字将被注销。
DNS_FILTERON
打开服务名称过滤启动。该过滤器阻止接受服务并没有注册的名称XTYP_CONNECT交易服务器。这是默认了此过滤器设置。
如果服务器应用程序没有注册任何服务名称,应用程序无法接收XTYP_WILDCONNECT交易。
DNS_FILTEROFF
关闭服务名称启动过滤。如果这个标志被指定,服务器收到一个XTYP_CONNECT事务时,另一DDE的应用程序调用DdeConnect功能,无论是服务的名称。
返回值
如果函数成功,它返回一个非零值。这种价值不是真正的HDDEDATA价值,只是一个成功的布尔指标。该函数类型HDDEDATA,以便将来可能扩展的功能和更复杂的返回值。
如果函数失败,返回值是0L。
该DdeGetLastError函数可用于获得错误代码,它可以是下列值之一:
DMLERR_DLL_NOT_INITIALIZED
DMLERR_DLL_USAGE
DMLERR_INVALIDPARAMETER
DMLERR_NO_ERROR
备注
服务名称hsz1参数的确定应该是一个基本名称(即,该名称应包含任何情况下特定的信息)。该系统生成一个实例的具体名称和发送的基本名称一同在XTYP_REGISTER和XTYP_UNREGISTER交易。 The receiving applications can then connect to the specific application instance.
功能信息
最低DLL版本 user32.dll
在Ddeml.h HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
参见
动态数据交换管理库概况,DdeConnect,DdeConnectList,DdeInitialize,XTYP_REGISTER,XTYP_UNREGISTER
==英文原文==DdeNameService Function
The DdeNameService function registers or unregisters the service names a Dynamic Data Exchange (DDE) server supports. This function causes the system to send XTYP_REGISTER or XTYP_UNREGISTER transactions to other running Dynamic Data Exchange Management Library (DDEML) client applications.
Syntax
HDDEDATA DdeNameService( DWORD idInst,
UINT hsz1,
UINT hsz2,
UINT afCmd
);
Parameters
idInst
[in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize function.
hsz1
[in] Handle to the string that specifies the service name the server is registering or unregistering. An application that is unregistering all of its service names should set this parameter to 0L.
hsz2
Reserved; should be set to 0L.
afCmd
[in] Specifies the service name options. This parameter can be one of the following values.
DNS_REGISTER
Registers the error code service name.
DNS_UNREGISTER
Unregisters the error code service name. If the hsz1 parameter is 0L, all service names registered by the server will be unregistered.
DNS_FILTERON
Turns on service name initiation filtering. The filter prevents a server from receiving XTYP_CONNECT transactions for service names it has not registered. This is the default setting for this filter.
If a server application does not register any service names, the application cannot receive XTYP_WILDCONNECT transactions.
DNS_FILTEROFF
Turns off service name initiation filtering. If this flag is specified, the server receives an XTYP_CONNECT transaction whenever another DDE application calls the DdeConnect function, regardless of the service name.
Return Value
If the function succeeds, it returns a nonzero value. That value is not a true HDDEDATA value, merely a Boolean indicator of success. The function is typed HDDEDATA to allow for possible future expansion of the function and a more sophisticated return value.
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_DLL_USAGE
DMLERR_INVALIDPARAMETER
DMLERR_NO_ERROR
Remarks
The service name identified by the hsz1 parameter should be a base name (that is, the name should contain no instance-specific information). The system generates an instance-specific name and sends it along with the base name during the XTYP_REGISTER and XTYP_UNREGISTER transactions. The receiving applications can then connect to the specific application instance.
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 , DdeConnect , DdeConnectList , DdeInitialize , XTYP_REGISTER , XTYP_UNREGISTER
==原始网址==http://msdn.microsoft.com/en-us/library/ms648759(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:31:35