Why not use DECLARE_INTERFACE_ here? And why bother checking UNICODE?
On Mon, Apr 8, 2013 at 12:10 PM, Dmitry Timoshkov <dmitry(a)baikal.ru> wrote:
> ---
> dlls/uuid/uuid.c | 1 +
> include/commdlg.h | 80
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 81 insertions(+)
>
> diff --git a/dlls/uuid/uuid.c b/dlls/uuid/uuid.c
> index fd96fe3..fb06f2d 100644
> --- a/dlls/uuid/uuid.c
> +++ b/dlls/uuid/uuid.c
> @@ -83,6 +83,7 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
> #include "sensevts.h"
> #include "ocmm.h"
> #include "commoncontrols.h"
> +#include "commdlg.h"
> #include "tlogstg.h"
> #include "msdasc.h"
>
> diff --git a/include/commdlg.h b/include/commdlg.h
> index 1a6e1d9..6eeb615 100644
> --- a/include/commdlg.h
> +++ b/include/commdlg.h
> @@ -762,6 +762,86 @@ typedef struct tagPDEXW
> DECL_WINELIB_TYPE_AW(PRINTDLGEX)
> DECL_WINELIB_TYPE_AW(LPPRINTDLGEX)
>
> +#ifdef STDMETHOD
> +DEFINE_GUID(IID_IPrintDialogCallback,
> 0x5852a2c3,0x6530,0x11d1,0xb6,0xa3,0x00,0x00,0xf8,0x75,0x7b,0xf9);
> +typedef interface IPrintDialogCallback IPrintDialogCallback;
> +
> +#if defined(__cplusplus) && !defined(CINTERFACE)
> +MIDL_INTERFACE("5852a2c3-6530-11d1-b6a3-0000f8757bf9")
> +IPrintDialogCallback : public IUnknown
> +{
> + virtual HRESULT STDMETHODCALLTYPE InitDone() = 0;
> + virtual HRESULT STDMETHODCALLTYPE SelectionChange() = 0;
> + virtual HRESULT STDMETHODCALLTYPE
> HandleMessage(HWND,UINT,WPARAM,LPARAM,LRESULT *) = 0;
> +};
> +#else
> +typedef struct IPrintDialogCallbackVtbl
> +{
> + BEGIN_INTERFACE
> +
> + /*** IUnknown methods ***/
> + HRESULT (STDMETHODCALLTYPE *QueryInterface)(IPrintDialogCallback
> *This,REFIID riid,void **ppvObject);
> + ULONG (STDMETHODCALLTYPE *AddRef)(IPrintDialogCallback *This);
> + ULONG (STDMETHODCALLTYPE *Release)(IPrintDialogCallback *This);
> + /*** IPrintDialogCallback methods ***/
> + HRESULT (STDMETHODCALLTYPE *InitDone)(IPrintDialogCallback *This);
> + HRESULT (STDMETHODCALLTYPE *SelectionChange)(IPrintDialogCallback
> *This);
> + HRESULT (STDMETHODCALLTYPE *HandleMessage)(IPrintDialogCallback
> *,HWND,UINT,WPARAM,LPARAM,LRESULT *);
> +
> + END_INTERFACE
> +} IPrintDialogCallbackVtbl;
> +interface IPrintDialogCallback
> +{
> + CONST_VTBL IPrintDialogCallbackVtbl *lpVtbl;
> +};
> +#endif /* CINTERFACE */
> +
> +DEFINE_GUID(IID_IPrintDialogServices,
> 0x509aaeda,0x5639,0x11d1,0xb6,0xa1,0x00,0x00,0xf8,0x75,0x7b,0xf9);
> +typedef interface IPrintDialogServices IPrintDialogServices;
> +
> +#if defined(__cplusplus) && !defined(CINTERFACE)
> +MIDL_INTERFACE("509aaeda-5639-11d1-b6a1-0000f8757bf9")
> +IPrintDialogServices : public IUnknown
> +{
> +#ifdef UNICODE
> + virtual HRESULT STDMETHODCALLTYPE GetCurrentDevMode(LPDEVMODEW,UINT
> *) = 0;
> + virtual HRESULT STDMETHODCALLTYPE GetCurrentPrinterName(LPWSTR,UINT
> *) = 0;
> + virtual HRESULT STDMETHODCALLTYPE GetCurrentPortName(LPWSTR,UINT *) =
> 0;
> +#else
> + virtual HRESULT STDMETHODCALLTYPE GetCurrentDevMode(LPDEVMODEA,UINT
> *) = 0;
> + virtual HRESULT STDMETHODCALLTYPE GetCurrentPrinterName(LPSTR,UINT *)
> = 0;
> + virtual HRESULT STDMETHODCALLTYPE GetCurrentPortName(LPSTR,UINT *) =
> 0;
> +#endif
> +};
> +#else
> +typedef struct IPrintDialogServicesVtbl
> +{
> + BEGIN_INTERFACE
> +
> + /*** IUnknown methods ***/
> + HRESULT (STDMETHODCALLTYPE *QueryInterface)(IPrintDialogServices
> *This,REFIID riid,void **ppvObject);
> + ULONG (STDMETHODCALLTYPE *AddRef)(IPrintDialogServices *This);
> + ULONG (STDMETHODCALLTYPE *Release)(IPrintDialogServices *This);
> + /*** IPrintDialogServices methods ***/
> +#ifdef UNICODE
> + HRESULT (STDMETHODCALLTYPE *GetCurrentDevMode)(IPrintDialogServices
> *,LPDEVMODEW *,UINT *);
> + HRESULT (STDMETHODCALLTYPE
> *GetCurrentPrinterName)(IPrintDialogServices *,LPWSTR,UINT *);
> + HRESULT (STDMETHODCALLTYPE *GetCurrentPortName)(IPrintDialogServices
> *,LPWSTR,UINT *);
> +#else
> + HRESULT (STDMETHODCALLTYPE *GetCurrentDevMode)(IPrintDialogServices
> *,LPDEVMODEA *,UINT *);
> + HRESULT (STDMETHODCALLTYPE
> *GetCurrentPrinterName)(IPrintDialogServices *,LPSTR,UINT *);
> + HRESULT (STDMETHODCALLTYPE *GetCurrentPortName)(IPrintDialogServices
> *,LPSTR,UINT *);
> +#endif
> +
> + END_INTERFACE
> +} IPrintDialogServicesVtbl;
> +interface IPrintDialogServices
> +{
> + CONST_VTBL IPrintDialogServicesVtbl *lpVtbl;
> +};
> +#endif /* CINTERFACE */
> +#endif /* STDMETHOD */
> +
> BOOL WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
> BOOL WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
> #define ChooseColor WINELIB_NAME_AW(ChooseColor)
> --
> 1.8.2
>
>
>
>