diff --git a/bin/screenshot.x64.o b/bin/screenshot.x64.o new file mode 100644 index 0000000..2dffd17 Binary files /dev/null and b/bin/screenshot.x64.o differ diff --git a/bin/screenshot.x86.o b/bin/screenshot.x86.o new file mode 100644 index 0000000..98f1456 Binary files /dev/null and b/bin/screenshot.x86.o differ diff --git a/screenshot.c b/screenshot.c index f30013e..438012f 100644 --- a/screenshot.c +++ b/screenshot.c @@ -1,3 +1,6 @@ +#define CINTERFACE +#define COBJMACROS + #include #include #include @@ -6,15 +9,22 @@ #include #include "beacon.h" -#define CINTERFACE -#define COBJMACROS #define CALLBACK_SCREENSHOT 0x03 #define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0) + +#ifdef _WIN64 CONST GUID GUID_ContainerFormatJpeg= { 0x19e4a5aa, 0x5662, 0x4fc5, 0xa0, 0xc0, 0x17, 0x58, 0x02, 0x8e, 0x10, 0x57}; CONST GUID GUID_WICPixelFormat24bppBGR= { 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0c}; CONST GUID CLSID_WICImagingFactory2= { 0x317d06e8, 0x5f24, 0x433d, 0xbd, 0xf7, 0x79, 0xce, 0x68, 0xd8, 0xab, 0xc2}; CONST GUID IID_IWICImagingFactory = {0xec5ec8a9,0xc395,0x4314,0x9c,0x77,0x54,0xd7,0xa9,0x35,0xff,0x70}; +#else +CONST GUID GUID_ContainerFormatJpeg= { 0x19e4a5aa, 0x5662, 0x4fc5, 0xa0, 0xc0, 0x17, 0x58, 0x02, 0x8e, 0x10, 0x57}; +CONST GUID GUID_WICPixelFormat24bppBGR= { 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0c}; +CONST GUID CLSID_WICImagingFactory2= { 0x317d06e8, 0x5f24, 0x433d, 0xbd, 0xf7, 0x79, 0xce, 0x68, 0xd8, 0xab, 0xc2}; +CONST GUID IID_IWICImagingFactory = {0xec5ec8a9,0xc395,0x4314,0x9c,0x77,0x54,0xd7,0xa9,0x35,0xff,0x70}; +CONST GUID CLSID_WICImagingFactory = {0xcacaf262, 0x9370, 0x4615, 0xa1, 0x3b, 0x9f, 0x55, 0x39, 0xda, 0x4c, 0x0a}; +#endif DECLSPEC_IMPORT void *__cdecl MSVCRT$malloc(size_t size); WINBASEAPI void __cdecl MSVCRT$memset(void *dest, int c, size_t count);