⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 display.cpp

📁 direct show
💻 CPP
字号:
// Display.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#include "apierr.h"
#include "display.h"
extern int Dllcnt;
BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
					 )
{

    switch (ul_reason_for_call)

    {

        case DLL_PROCESS_ATTACH:

            // The DLL is being loaded for the first time by a given process.
            // Perform per-process initialization here.  If the initialization
            // is successful, return TRUE; if unsuccessful, return FALSE.
            // In this DLL, we want to initialize a critical section used
            // by one of its exported functions, DLLFunction2().
            // InitializeCriticalSection(&gCriticalSection);
			Dllcnt++;
            init_apierr();
			OutputDebugString("Display dll load\n");

			break;

        case DLL_PROCESS_DETACH:
			 Dllcnt--;
             exit_apierr();
            // The DLL is being unloaded by a given process.  Do any
            // per-process clean up here, such as undoing what was done in
            // DLL_PROCESS_ATTACH.  The return value is ignored.
			//LoadDllCnt--;
            OutputDebugString("Display dll exit\n");
		    break;

        case DLL_THREAD_ATTACH:

            // A thread is being created in a process that has already loaded
            // this DLL.  Perform any per-thread initialization here.  The
            // return value is ignored.
            break;
        case DLL_THREAD_DETACH:
            // A thread is exiting cleanly in a process that has already
            // loaded this DLL.  Perform any per-thread clean up here.  The
            // return value is ignored.
            break;
    }


    return TRUE;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -