术语 | freelibraryandexitthread |
释义 | FreeLibraryAndExitThread 语法: C++ VOID WINAPI FreeLibraryAndExitThread( __in HMODULE hModule, __in DWORD dwExitCode ); FreeLibraryAndExitThread功能 递减的加载动态链接库(DLL)一个引用计数,然后调用ExitThread终止调用线程。该函数不返回。 参数 hModule [in] 句柄的DLL模块的引用计数的函数递减。或GetModuleHandleEx的LoadLibrary函数返回此句柄。 不要打电话柄GetModuleHandle返回的功能,因为这个函数不维持一个模块的引用计数这个功能。 dwExitCode [in] 为调用线程退出代码。 返回值 这个函数没有返回值。无效的模块处理被忽略。 备注 该FreeLibraryAndExitThread函数允许线程一个DLL内安全地执行该DLL的自由,他们正在执行和终止自己。如果他们要调用FreeLibrary和ExitThread分开,竞争状态会存在。该库可以卸载之前ExitThread被调用。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinbase.h(头文件:winuser.h) LibraryKernel32.lib DLLKernel32.dll 参见 DisableThreadLibraryCalls 动态链接库函数 ExitThread FreeLibrary 运行时动态链接 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==FreeLibraryAndExitThread Function Decrements the reference count of a loaded dynamic-link library (DLL) by one, then calls ExitThread to terminate the calling thread. The function does not return. Syntax C++ VOID WINAPI FreeLibraryAndExitThread( __in HMODULE hModule, __in DWORD dwExitCode ); Parameters hModule [in] A handle to the DLL module whose reference count the function decrements. The LoadLibrary or GetModuleHandleEx function returns this handle. Do not call this function with a handle returned by the GetModuleHandle function, since this function does not maintain a reference count for the module. dwExitCode [in] The exit code for the calling thread. Return Value This function does not return a value. Invalid module handles are ignored. Remarks The FreeLibraryAndExitThread function allows threads that are executing within a DLL to safely free the DLL in which they are executing and terminate themselves. If they were to call FreeLibrary and ExitThread separately, a race condition would exist. The library could be unloaded before ExitThread is called. Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinbase.h (include Windows.h) LibraryKernel32.lib DLLKernel32.dll See Also DisableThreadLibraryCalls Dynamic-Link Library Functions ExitThread FreeLibrary Run-Time Dynamic Linking Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms683153(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。