I’m trying to create a c++ dll in vs2010.
I’ve created a win32 project and selected “Dynamic Library” as configuration type.
I’ve added MyDll.cpp and MyDll.def.
This is mydll.h
#include "stdafx.h"
extern "C" BOOL APIENTRY DllMain( HMODULE 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;
}
extern "C" UINT __stdcall stopGui(MSIHANDLE hModule)
{
MessageBox(NULL, TEXT("Stop Gui"), TEXT("Custom Action Monitor Machine"), MB_OK);
return ERROR_SUCCESS;
}
extern "C" UINT __stdcall stopService(MSIHANDLE hModule)
{
MessageBox(NULL, TEXT("Stop Service"), TEXT("Custom Action Monitor Machine"), MB_OK);
return ERROR_SUCCESS;
}
This is MyDll.def
LIBRARY "MyDll"
DESCRIPTION "My library test"
EXPORTS
; Explicit exports can go here
stopGui
stopService
When I build the project I get “Build succeeded”, but there isn’t a dll file in my “release” directory. I just get a lot of log files with no errors and a couple of obj files.
How can I solve this?
Thank you in advance.
Solved.
The output was in the “Debug” directory of the solution, while I was looking for it in the “Release” directory of the project.