网站首页  词典首页

请输入您要查询的函数:

 

术语 ddequerystring
释义 DdeQueryString
语法:
DWORD DdeQueryString( DWORD idInst,
HSZ hsz,
LPTSTR psz,
DWORD cchMax,
int iCodePage
);
DdeQueryString功能
该DdeQueryString函数复制文本字符串句柄到缓冲区关联。
参数
idInst
[in]指定的应用程序实例标识符先前调用DdeInitialize函数获得。
hsz
[in]句柄字符串的副本。这种处理,必须是被以前的调用DdeCreateStringHandle函数创建。

[中,out]指向的缓冲区接收字符串。要获取字符串的长度,此参数应设置为NULL。
cchMax
[in]指定的长度,在TCHARs,缓冲区的指向的氧化锆参数。对于函数的ANSI版本,这是字节数;为Unicode版本,这是字符数。如果字符串长度超过(cchMax - 1),它会被截断。如果锆参数设置为NULL,这个参数被忽略。
iCodePage
[in]指定的代码页用于渲染的字符串。此值应为CP_WINANSI或CP_WINUNICODE。
返回值
如果锆参数指定一个有效的指针,返回值是长度,TCHARs返回的文本(不包括终止空字符)。如果锆参数指定一个NULL指针,返回值是与hsz参数(不包括终止空字符关联的文本的长度)。如果发生错误,则返回值为0L。
备注
在缓冲区中返回的字符串总是空终止。如果字符串长度超过(cchMax - 1),仅在第(cchMax - 1)的字符串中的字符复制。
如果锆参数为NULL,DdeQueryString函数得到的长度,以字节为单位,与字符串处理相关的字符串。长度不包括终止空字符。
在Windows 95/98/Me:DdeQueryStringW是支持的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版本。
参见
动态数据交换管理库概况,DdeCmpStringHandles,DdeCreateStringHandle,DdeFreeStringHandle,DdeInitialize
==英文原文==DdeQueryString Function
The DdeQueryString function copies text associated with a string handle into a buffer.
Syntax
DWORD DdeQueryString( DWORD idInst,
HSZ hsz,
LPTSTR psz,
DWORD cchMax,
int iCodePage
);
Parameters
idInst
[in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize function.
hsz
[in] Handle to the string to copy. This handle must have been created by a previous call to the DdeCreateStringHandle function.
psz
[in, out] Pointer to a buffer that receives the string. To obtain the length of the string, this parameter should be set to NULL.
cchMax
[in] Specifies the length, in TCHARs, of the buffer pointed to by the psz parameter. For the ANSI version of the function, this is the number of bytes; for the Unicode version, this is the number of characters. If the string is longer than ( cchMax– 1), it will be truncated. If the psz parameter is set to NULL, this parameter is ignored.
iCodePage
[in] Specifies the code page used to render the string. This value should be either CP_WINANSI or CP_WINUNICODE.
Return Value
If the psz parameter specified a valid pointer, the return value is the length, in TCHARs, of the returned text (not including the terminating null character). If the psz parameter specified a NULL pointer, the return value is the length of the text associated with the hsz parameter (not including the terminating null character). If an error occurs, the return value is 0L.
Remarks
The string returned in the buffer is always null-terminated. If the string is longer than ( cchMax– 1), only the first ( cchMax– 1) characters of the string are copied.
If the psz parameter is NULL, the DdeQueryString function obtains the length, in bytes, of the string associated with the string handle. The length does not include the terminating null character.
Windows 95/98/Me: DdeQueryStringW 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 , DdeCmpStringHandles , DdeCreateStringHandle , DdeFreeStringHandle , DdeInitialize
==原始网址==http://msdn.microsoft.com/en-us/library/ms648763(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:24:07