Fix SiaDrive.Api build
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user