网站首页  词典首页

请输入您要查询的函数:

 

术语 lstrcat
释义 lstrcat
语法:
LPTSTR lstrcat( LPTSTR lpString1,
LPTSTR lpString2
);
lstrcat函数
这个函数一个字符串附加到另一个。
参数
lpString1
[中,out]指向一个空结束的字符串。该缓冲区必须足够大,包含两个字符串。
lpString2
[in]指向空终止字符串附加到在lpString1参数指定的字符串。
返回值
如果函数成功,返回值是对缓冲区的指针。
如果函数失败,返回值为NULL和lpString1不得空终止。
备注
安全警告:
使用此功能不当,可能会损害您的应用程序的安全。此函数使用结构化异常处理(SEH)捕获的访问冲突和其他错误。当这个函数捕捉SEH的错误,则返回空不空结束的字符串,而没有通知错误的来电。调用方没有把握地说,没有足够的空间是错误的条件。
lpString1必须足够大,加上lpString2和闭幕'\\ 0',否则可能会出现缓冲区溢出。缓冲区溢出可能导致对应用服务拒绝攻击,如果发生访问冲突。在最坏的情况下,缓冲区溢出可能允许攻击者注入到可执行代码的过程中,特别是如果lpString1是一个基于堆栈的缓冲区。
考虑使用StringCchCat代替。
审查安全方面的考虑:Windows用户界面,然后继续。
在Windows 95/98/Me:lstrcatW是支持的Unicode(MSLU)微软层。虽然W版已经在微软Windows 98/Me的存在,它包括给予更多的一致行为在所有的Windows操作系统。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
例如
有关示例,请参见读取邮件槽。
功能信息
最低DLL版本 kernel32.dll
在Winbase.h HeaderDeclared,头文件:winuser.h
import libraryKernel32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
Strings 概述 ,StringCbCat,StringCbCatEx,StringCbCatN,StringCbCatNEx,StringCchCat,StringCchCatEx,StringCchCatN,StringCchCatNEx,lstrcmp,lstrcmpi,lstrcpy,lstrlen
==英文原文==lstrcat Function
This function appends one string to another.
Syntax
LPTSTR lstrcat( LPTSTR lpString1,
LPTSTR lpString2
);
Parameters
lpString1
[in, out] Pointer to a null-terminated string. The buffer must be large enough to contain both strings.
lpString2
[in] Pointer to the null-terminated string to be appended to the string specified in the lpString1 parameter.
Return Value
If the function succeeds, the return value is a pointer to the buffer.
If the function fails, the return value is NULL and lpString1 may not be null-terminated.
Remarks
Security Alert
Using this function incorrectly can compromise the security of your application. This function uses structured exception handling (SEH) to catch access violations and other errors. When this function catches SEH errors, it returns NULL without null-terminating the string and without notifying the caller of the error. The caller is not safe to assume that insufficient space is the error condition.
lpString1 must be large enough to add lpString2 and the closing '\\0', otherwise a buffer overrun may occur. Buffer overruns may lead to a denial of service attack against the application if an access violation occurs. In the worst case, a buffer overrun may allow an attacker to inject executable code into your process, especially if lpString1 is a stack-based buffer.
Consider using StringCchCat instead.
Review Security Considerations: Windows User Interface before continuing.
Windows 95/98/Me: lstrcatW is supported by the Microsoft Layer for Unicode (MSLU). Although the W version already exists on Microsoft Windows 98/Me, it is included to give more consistent behavior across all Windows operating systems. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Example
For an example, see Reading from a Mailslot .
Function Information
Minimum DLL Versionkernel32.dll
HeaderDeclared in Winbase.h, include Windows.h
Import libraryKernel32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Strings Overview , StringCbCat , StringCbCatEx , StringCbCatN , StringCbCatNEx , StringCchCat , StringCchCatEx , StringCchCatN , StringCchCatNEx , lstrcmp , lstrcmpi , lstrcpy , lstrlen
==原始网址==http://msdn.microsoft.com/en-us/library/ms647487(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 9:18:20