-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDllExports2.cpp
75 lines (60 loc) · 1.31 KB
/
DllExports2.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// DLLExports2.cpp
#include "MyWindows.h"
#if defined(_7ZIP_LARGE_PAGES)
#include "Alloc.h"
#endif
#include "ComTry.h"
#include "PropVariant.h"
#include "ICoder.h"
#include "IArchive.h"
HINSTANCE g_hInstance;
#define NT_CHECK_FAIL_ACTION return FALSE;
#ifdef _WIN32
extern "C"
BOOL WINAPI DllMain(
#ifdef UNDER_CE
HANDLE
#else
HINSTANCE
#endif
hInstance, DWORD dwReason, LPVOID /*lpReserved*/ )
{
if ( dwReason == DLL_PROCESS_ATTACH )
{
// OutputDebugStringA("7z.dll DLL_PROCESS_ATTACH");
g_hInstance = (HINSTANCE)hInstance;
}
/*
if (dwReason == DLL_PROCESS_DETACH)
{
OutputDebugStringA("7z.dll DLL_PROCESS_DETACH");
}
*/
return TRUE;
}
#endif
DEFINE_GUID(CLSID_CArchiveHandler,
k_7zip_GUID_Data1,
k_7zip_GUID_Data2,
k_7zip_GUID_Data3_Common,
0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00);
STDAPI CreateArchiver( const GUID* clsid, const GUID* iid, void** outObject );
STDAPI CreateObject( const GUID* clsid, const GUID* iid, void** outObject )
{
// COM_TRY_BEGIN
*outObject = 0;
return CreateArchiver( clsid, iid, outObject );
// COM_TRY_END
}
STDAPI SetLargePageMode()
{
return S_OK;
}
STDAPI SetCaseSensitive( Int32 caseSensitive )
{
return S_OK;
}
STDAPI SetCodecs( ICompressCodecsInfo* )
{
return S_OK;
}