test.cpp
来自「这是一本学习 window编程的很好的参考教材」· C++ 代码 · 共 40 行
CPP
40 行
// Test.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include "Test.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
// This is an example of an exported variable
TEST_API int nTest=0;
// This is an example of an exported function.
TEST_API int fnTest(void)
{
return 42;
}
// This is the constructor of a class that has been exported.
// see Test.h for the class definition
CTest::CTest()
{
return;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?