Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
[This function is available through Windows XP with Service Pack 2 (SP2) and Windows Server 2003. It might be altered or unavailable in subsequent versions of Windows.]
Copies a string from one buffer to another.
Syntax
int WINAPI Str_GetPtr(
_In_ LPCTSTR pszSource,
_Inout_ LPCSTR pszDest,
_In_ int cchDest
);
Parameters
-
pszSource [in]
-
Type: LPCTSTR
A pointer to a source string.
-
pszDest [in, out]
-
Type: LPCSTR
A pointer to the destination buffer. This value can be NULL.
-
cchDest [in]
-
Type: int
The size of pszDest, in characters.
Return value
Type: int
If pszDest is NULL or cchDest is zero, returns the size of the buffer, in characters, needed to contain a null-terminated copy of the string pointed to by pszSource.
If pszDest is non-NULL, returns the number of characters successfully copied, including the terminating null character.
If pszDest cannot hold the entire string pointed to by pszSource, then (cchDest-1) characters are copied, the string null-terminated, and cchDest returned.
Remarks
Str_GetPtr is available as ANSI (Str_GetPtrA) and Unicode (Str_GetPtrW) versions. These functions are not exported by name or declared in a public header file. To use them, you must use GetProcAddress and request ordinal 233 (Str_GetPtrA) or 235 (Str_GetPtrW) from ComCtl32.dll to obtain a function pointer.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client |
Windows Vista [desktop apps only] |
| Minimum supported server |
Windows Server 2003 [desktop apps only] |
| DLL |
|
| Unicode and ANSI names |
Str_GetPtrW (Unicode) and Str_GetPtrA (ANSI) |