nativedll.cpp
来自「清华大学出版社出版的 移动应用开发宝典 张大威(2008)的附书源代码」· C++ 代码 · 共 39 行
CPP
39 行
// NativeDll.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include "NativeDll.h"
#include <windows.h>
#include <commctrl.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 function.
NATIVEDLL_API int MangledCppMethod(int arg)
{
return arg;
}
// This is an example of an exported function without name mangling.
extern "C"{
NATIVEDLL_API int OrdinaryCMethod(int arg)
{
return arg;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?