ultimatepp/uppsrc/upt/Win32dll.upt
cxl 859a59e9d7 uppsrc: MT flags removed from project templates
git-svn-id: svn://ultimatepp.org/upp/trunk@10751 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2017-01-23 23:24:46 +00:00

45 lines
835 B
Text

template "Win32 DLL project (no U++)" main;
@@<:PACKAGE:>.h
#ifndef _<:PACKAGE:>_<:PACKAGE:>_h
#define _<:PACKAGE:>_<:PACKAGE:>_h
#define DllImport extern "C" __declspec(dllimport)
#define DllExport extern "C" __declspec(dllexport)
#ifdef flagDLL
#define DLLIMPORT __declspec(dllexport)
#else
#define DLLIMPORT __declspec(dllimport)
#endif
#endif
@@<:PACKAGE:>.cpp
#include <windows.h>
#include "<:PACKAGE:>.h"
BOOL APIENTRY DllMain(HANDLE hModule, DWORD reason, LPVOID lpReserved)
{
switch (reason) {
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}
@@<:PACKAGE:>.upp
library(WIN32) "kernel32 user32 advapi32 shell32 winmm";
target "<:PACKAGE:>.dll";
file
<:PACKAGE:>.h,
<:PACKAGE:>.cpp;
mainconfig
"" = "DLL";