网站首页  词典首页

请输入您要查询的函数:

 

术语 tlsfree
释义 TlsFree
语法:
C++
BOOL WINAPI TlsFree(
__in DWORD dwTlsIndex
);
TlsFree功能
释放一个线程本地存储(TLS)指数,使其可重用。
参数
dwTlsIndex [in]
TLS的指数是由TlsAlloc函数分配。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
如果该进程的线程分配的内存和存储的指针,在一个TLS插槽内存,就应该在调用TlsFree自由内存。该TlsFree函数不会释放内存的地址已与TLS索引相关的TLS插槽存储块。预计所有的DLL调用)只在DLL_PROCESS_DETACH的这个函数(如果有的话。
有关更多信息,请参见线程本地存储。
实例
有关示例,请参阅使用线程本地存储或使用的动态线程本地存储链接库。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
进程和线程概述
线程本地存储
对TlsAlloc
TlsGetValue
TlsSetValue
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==TlsFree Function
Releases a thread local storage (TLS) index, making it available for reuse.
Syntax
C++
BOOL WINAPI TlsFree(
__in DWORD dwTlsIndex
);
Parameters
dwTlsIndex [in]
The TLS index that was allocated by the TlsAlloc function.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
If the threads of the process have allocated memory and stored a pointer to the memory in a TLS slot, they should free the memory before calling TlsFree. The TlsFree function does not free memory blocks whose addresses have been stored in the TLS slots associated with the TLS index. It is expected that DLLs call this function (if at all) only during DLL_PROCESS_DETACH.
For more information, see Thread Local Storage .
Examples
For an example, see Using Thread Local Storage or Using Thread Local Storage in a Dynamic-Link Library .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Processes and Threads Overview
Thread Local Storage
TlsAlloc
TlsGetValue
TlsSetValue
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms686804(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 13:23:08