init.c
资源名称:shell.rar [点击查看]
上传用户:xhy777
上传日期:2007-02-14
资源大小:24088k
文件大小:1k
源码类别:
系统编程
开发平台:
Visual C++
- /*
- * init.c - DLL startup routines module.
- */
- /* Headers
- **********/
- #include "project.h"
- #pragma hdrstop
- #include "init.h"
- /****************************** Public Functions *****************************/
- #pragma warning(disable:4100) /* "unreferenced formal parameter" warning */
- /*
- ** LibMain()
- **
- **
- **
- ** Arguments:
- **
- ** Returns:
- **
- ** Side Effects: none
- */
- PUBLIC_CODE BOOL APIENTRY LibMain(HANDLE hModule, DWORD dwReason, PVOID pvReserved)
- {
- BOOL bResult;
- DebugEntry(LibMain);
- switch (dwReason)
- {
- case DLL_PROCESS_ATTACH:
- bResult = AttachProcess(hModule);
- break;
- case DLL_PROCESS_DETACH:
- bResult = DetachProcess(hModule);
- break;
- case DLL_THREAD_ATTACH:
- bResult = AttachThread(hModule);
- break;
- case DLL_THREAD_DETACH:
- bResult = DetachThread(hModule);
- break;
- default:
- ERROR_OUT((TEXT("LibMain() called with unrecognized dwReason %lu."),
- dwReason));
- bResult = FALSE;
- break;
- }
- DebugExitBOOL(LibMain, bResult);
- return(bResult);
- }
- #pragma warning(default:4100) /* "unreferenced formal parameter" warning */
English
