网站首页  词典首页

请输入您要查询的函数:

 

术语 ddeconnect
释义 DdeConnect
语法:
HCONV DdeConnect( DWORD idInst,
HSZ hszService,
HSZ hszTopic,
PCONVCONTEXT pCC
);
DdeConnect功能
该DdeConnect功能建立与服务器应用程序,支持指定的服务名称和主题名称对交谈。如果有多个这样的服务器存在,系统只选择一个。
参数
idInst
[in]指定的应用程序实例标识符先前调用DdeInitialize函数获得。
hszService
[in]句柄字符串指定的服务器应用程序的谈话将设立服务名称。这种处理,必须是被以前的调用DdeCreateStringHandle函数创建。如果此参数0L,建立对话与任何可用的服务器。
hszTopic
[in]句柄字符串,指定专题对话上要成立时名称。这种处理应该是由前一次调用DdeCreateStringHandle创建。如果此参数0L,对选定的服务器所支持的任何主题的谈话成立。
政协
[in]指向CONVCONTEXT结构,它包含会话上下文信息。如果该参数为NULL,服务器收到在XTYP_CONNECT或XTYP_WILDCONNECT交易默认CONVCONTEXT结构。 Windows 95/98/Me的:如果使用Unicode,那么iCodePage成员可以指定CP_WINUNICODE微软层。
返回值
如果函数成功,返回值是处理既定的谈话。
如果函数失败,返回值是0L。
该DdeGetLastError函数可用于获得错误代码,它可以是下列值之一:
DMLERR_DLL_NOT_INITIALIZED
DMLERR_INVALIDPARAMETER
DMLERR_NO_CONV_ESTABLISHED
DMLERR_NO_ERROR
备注
客户端应用程序不能假设,就服务器选择。如果一个特定实例指定名称的hszService参数,只有对话与指定实例的建立。例如特定的服务名称是传递给应用程序的动态数据交换(DDE)在XTYP_REGISTER和XTYP_UNREGISTER交易的回调函数。
默认的CONVCONTEXT结构的所有成员都设置为零,除非文件,它指定的结构尺寸和iCodePage,指定CP_WINANSI(默认代码页),或CP_WINUNICODE,取决于是否ANSI或Unicode的DdeInitialize功能版本所谓的客户端应用程序。
在Windows 95/98/Me:DdeConnect是支持微软层对于Unicode。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 user32.dll
在Ddeml.h HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
参见
动态数据交换管理库概况,CONVCONTEXT,DdeConnectList,DdeCreateStringHandle,DdeDisconnect,DdeDisconnectList,DdeInitialize,XTYP_REGISTER,XTYP_UNREGISTER
==英文原文==DdeConnect Function
The DdeConnect function establishes a conversation with a server application that supports the specified service name and topic name pair. If more than one such server exists, the system selects only one.
Syntax
HCONV DdeConnect( DWORD idInst,
HSZ hszService,
HSZ hszTopic,
PCONVCONTEXT pCC
);
Parameters
idInst
[in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize function.
hszService
[in] Handle to the string that specifies the service name of the server application with which a conversation is to be established. This handle must have been created by a previous call to the DdeCreateStringHandle function. If this parameter is 0L, a conversation is established with any available server.
hszTopic
[in] Handle to the string that specifies the name of the topic on which a conversation is to be established. This handle must have been created by a previous call to DdeCreateStringHandle. If this parameter is 0L, a conversation on any topic supported by the selected server is established.
pCC
[in] Pointer to the CONVCONTEXT structure that contains conversation context information. If this parameter is NULL, the server receives the default CONVCONTEXT structure during the XTYP_CONNECT or XTYP_WILDCONNECT transaction. Windows 95/98/Me: If using the Microsoft Layer for Unicode , the iCodePage member can specify CP_WINUNICODE.
Return Value
If the function succeeds, the return value is the handle to the established conversation.
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_NO_CONV_ESTABLISHED
DMLERR_NO_ERROR
Remarks
The client application cannot make assumptions regarding the server selected. If an instance-specific name is specified in the hszService parameter, a conversation is established with only the specified instance. Instance-specific service names are passed to an application's Dynamic Data Exchange (DDE) callback function during the XTYP_REGISTER and XTYP_UNREGISTER transactions.
All members of the default CONVCONTEXT structure are set to zero except cb, which specifies the size of the structure, and iCodePage, which specifies CP_WINANSI (the default code page) or CP_WINUNICODE, depending on whether the ANSI or Unicode version of the DdeInitialize function was called by the client application.
Windows 95/98/Me: DdeConnect is supported by the Microsoft Layer for Unicode. 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
See Also
Dynamic Data Exchange Management Library Overview , CONVCONTEXT , DdeConnectList , DdeCreateStringHandle , DdeDisconnect , DdeDisconnectList , DdeInitialize , XTYP_REGISTER , XTYP_UNREGISTER
==原始网址==http://msdn.microsoft.com/en-us/library/ms648745(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