NSIS/Source/7zip/7zip/IMyUnknown.h
kichik 594c3ed0f6 - First LZMA enhanced NSIS version - experimental
- Added SetCompressorDictSize (only works for LZMA)
- Added SetCompressionLevel (only "works" for zlib and bzip2) - doesn't work for now
- Section is only supposed to get 4 parameters if /o is specified
- Updated version numbers


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3190 212acab6-be3b-0410-9dea-997c60f758d6
2003-11-24 00:08:58 +00:00

71 lines
1.5 KiB
C

// IMyUnknown.h
// #pragma once
#ifndef __MYUNKNOWN_H
#define __MYUNKNOWN_H
#ifdef WIN32
// #include <guiddef.h>
#include <basetyps.h>
#else
#define HRESULT LONG
#define STDMETHODCALLTYPE __stdcall
#define STDMETHOD_(t, f) virtual t STDMETHODCALLTYPE f
#define STDMETHOD(f) STDMETHOD_(HRESULT, f)
#define STDMETHODIMP_(type) type STDMETHODCALLTYPE
#define STDMETHODIMP STDMETHODIMP_(HRESULT)
#define PURE = 0;
typedef struct {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#ifdef __cplusplus
#define MY_EXTERN_C extern "C"
#else
#define MY_EXTERN_C extern
#endif
#ifdef INITGUID
#define MY_DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
MY_EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#else
#define MY_DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
MY_EXTERN_C const GUID name
#endif
#ifdef __cplusplus
#define REFGUID const GUID &
#else
#define REFGUID const GUID * __MIDL_CONST
#endif
#define MIDL_INTERFACE(x) struct
inline int operator==(REFGUID g1, REFGUID g2)
{
for (int i = 0; i < sizeof(g1); i++)
if (((unsigned char *)&g1)[i] != ((unsigned char *)&g2)[i])
return false;
return true;
}
inline int operator!=(REFGUID &g1, REFGUID &g2)
{ return !(g1 == g2); }
struct IUnknown
{
STDMETHOD(QueryInterface) (const GUID *iid, void **outObject) PURE;
STDMETHOD_(ULONG, AddRef)() PURE;
STDMETHOD_(ULONG, Release)() PURE;
};
#endif
#endif