网站首页  词典首页

请输入您要查询的函数:

 

术语 addatom
释义 AddAtom
语法:
ATOM AddAtom( LPCTSTR lpString
);
AddAtom功能
该AddAtom函数将字符串当地原子表,并返回一个唯一的值(原子的)确定字符串。
参数
lpString
[in] 待添加的以null 结束的字符串指针。该字符串可以有255个字节的最大大小。不同的只是字符串的情况下被认为是相同的。第一个字符串中添加的保留和GetAtomName函数返回。
或者,您可以使用一个整数原子已被转换使用MAKEINTATOM宏。更多信息见备注。
返回值
如果函数成功,返回值是新创建的原子。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
AddAtom函数在atom表中保存不超过一份复制。如果字符串已经在表中,该函数返回现有的原子,并在一个字符串的原子的情况下,增量字符串的引用计数。
如果lpString的形式为“#1234”,AddAtom返回一个整数原子,其值为16位,在本例中的字符串(0x04D2,指定的十进制数表示)。如果指定的十进制值是0x0000或大于或等于0xC000,返回值是零,表明一个错误。如果lpString是由该MAKEINTATOM宏,低位字必须在范围0x0001通过0xBFFF。如果低位字不在此范围内,该功能失败。
如果lpString有任何其他形式AddAtom返回一个字符串原子。
在Windows 95/98/Me:AddAtomW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 kernel32.dll
在Winbase.h HeaderDeclared,头文件:winuser.h
import libraryKernel32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
atoms OverView,DeleteAtom,FindAtom,GetAtomName,GlobalAddAtom,GlobalDeleteAtom,GlobalFindAtom,GlobalGetAtomName,MAKEINTATOM
==英文原文==AddAtom Function
The AddAtom function adds a character string to the local atom table and returns a unique value (an atom) identifying the string.
Syntax
ATOM AddAtom( LPCTSTR lpString
);
Parameters
lpString
[in] Pointer to the null-terminated string to be added. The string can have a maximum size of 255 bytes. Strings differing only in case are considered identical. The case of the first string added is preserved and returned by the GetAtomName function.
Alternatively, you can use an integer atom that has been converted using the MAKEINTATOM macro. See the Remarks for more information.
Return Value
If the function succeeds, the return value is the newly created atom.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The AddAtom function stores no more than one copy of a given string in the atom table. If the string is already in the table, the function returns the existing atom and, in the case of a string atom, increments the string's reference count.
If lpString has the form "#1234", AddAtom returns an integer atom whose value is the 16-bit representation of the decimal number specified in the string (0x04D2, in this example). If the decimal value specified is 0x0000 or is greater than or equal to 0xC000, the return value is zero, indicating an error. If lpString was created by the MAKEINTATOM macro, the low-order word must be in the range 0x0001 through 0xBFFF. If the low-order word is not in this range, the function fails.
If lpString has any other form, AddAtom returns a string atom.
Windows 95/98/Me: AddAtomW 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 Versionkernel32.dll
HeaderDeclared in Winbase.h, include Windows.h
Import libraryKernel32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as Unicode version.
See Also
Atoms Overview , DeleteAtom , FindAtom , GetAtomName , GlobalAddAtom , GlobalDeleteAtom , GlobalFindAtom , GlobalGetAtomName , MAKEINTATOM
==原始网址==http://msdn.microsoft.com/en-us/library/ms649056(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:55