1
0

Fix SiaDrive.Api build

This commit is contained in:
Scott E. Graves
2017-02-14 21:50:58 -06:00
parent 640731e25e
commit 42cdbe2cd0
6 changed files with 38 additions and 49 deletions

View File

@@ -4,8 +4,6 @@
#include "stdafx.h"
#include <afxwin.h>
#include <afxdllx.h>
#include <curl\curl.h>
#ifdef _DEBUG
#define new DEBUG_NEW
@@ -22,7 +20,7 @@ DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
if (dwReason == DLL_PROCESS_ATTACH)
{
TRACE0("SiaDrive.Api.DLL Initializing!\n");
// Extension DLL one-time initialization
if (!AfxInitExtensionModule(SiaDriveApiDLL, hInstance))
return 0;
@@ -53,18 +51,14 @@ DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
return FALSE;
}
curl_global_init(CURL_GLOBAL_WIN32);
}
else if (dwReason == DLL_PROCESS_DETACH)
{
TRACE0("SiaDrive.Api.DLL Terminating!\n");
curl_global_cleanup();
// Terminate the library before destructors are called
AfxTermExtensionModule(SiaDriveApiDLL);
}
return 1; // ok
}