From 1843cd356027a857de5d3bdd90e26a0bd5c30d21 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 3 Sep 2003 20:20:49 +0000 Subject: [PATCH] Converted servprov.h to IDL. --- include/Makefile.in | 2 +- include/servprov.h | 135 +++++++++++++++++++++++++++++-------------- include/servprov.idl | 46 +++++++++++++++ 3 files changed, 138 insertions(+), 45 deletions(-) create mode 100644 include/servprov.idl diff --git a/include/Makefile.in b/include/Makefile.in index 2ea2f2316a3..cbccbb54023 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -9,6 +9,7 @@ IDL_SRCS = \ oaidl.idl \ objidl.idl \ oleidl.idl \ + servprov.idl \ strmif.idl \ unknwn.idl \ wtypes.idl @@ -145,7 +146,6 @@ WINDOWS_INCLUDES = \ rpcndr.h \ rpcnterr.h \ rpcproxy.h \ - servprov.h \ setupapi.h \ shellapi.h \ shlguid.h \ diff --git a/include/servprov.h b/include/servprov.h index 2ccfe35e01e..ecb39d55719 100644 --- a/include/servprov.h +++ b/include/servprov.h @@ -1,60 +1,107 @@ -/* - * Copyright (C) 1999 Francois Gouget - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - +/*** Autogenerated by WIDL 0.1 from servprov.idl - Do not edit ***/ #include #include -#ifndef COM_NO_WINDOWS_H -#include -#include + +#ifndef __WIDL_SERVPROV_H +#define __WIDL_SERVPROV_H +#ifdef __cplusplus +extern "C" { +#endif +#include +#ifndef __IServiceProvider_FWD_DEFINED__ +#define __IServiceProvider_FWD_DEFINED__ +typedef struct IServiceProvider IServiceProvider; #endif -#ifndef __WINE_SERVPROV_H -#define __WINE_SERVPROV_H - - -#include - - -/***************************************************************************** - * Predeclare the interfaces - */ -DEFINE_GUID (IID_IServiceProvider, 0x6d5140c1L, 0x7436, 0x11ce, 0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa); -typedef struct IServiceProvider IServiceProvider,*LPSERVICEPROVIDER; - +typedef IServiceProvider *LPSERVICEPROVIDER; /***************************************************************************** * IServiceProvider interface */ -#define INTERFACE IServiceProvider -#define IServiceProvider_METHODS \ - IUnknown_METHODS \ - STDMETHOD(QueryService)(THIS_ REFGUID guidService, REFIID riid, void **ppvObject) PURE; -ICOM_DEFINE(IServiceProvider,IUnknown) -#undef INTERFACE +#ifndef __IServiceProvider_INTERFACE_DEFINED__ +#define __IServiceProvider_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IServiceProvider, 0x6d5140c1, 0x7436, 0x11ce, 0x80,0x34, 0x00,0xaa,0x00,0x60,0x09,0xfa); +#if defined(__cplusplus) && !defined(CINTERFACE) +struct IServiceProvider : public IUnknown +{ + virtual HRESULT STDMETHODCALLTYPE QueryService( + REFGUID guidService, + REFIID riid, + void** ppvObject) = 0; + +}; +#else +typedef struct IServiceProviderVtbl IServiceProviderVtbl; +struct IServiceProvider { + const IServiceProviderVtbl* lpVtbl; +}; +struct IServiceProviderVtbl { + ICOM_MSVTABLE_COMPAT_FIELDS + + /*** IUnknown methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryInterface)( + IServiceProvider* This, + REFIID riid, + void** ppvObject); + + ULONG (STDMETHODCALLTYPE *AddRef)( + IServiceProvider* This); + + ULONG (STDMETHODCALLTYPE *Release)( + IServiceProvider* This); + + /*** IServiceProvider methods ***/ + HRESULT (STDMETHODCALLTYPE *QueryService)( + IServiceProvider* This, + REFGUID guidService, + REFIID riid, + void** ppvObject); + +}; -#ifdef COBJMACROS /*** IUnknown methods ***/ #define IServiceProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IServiceProvider_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IServiceProvider_Release(p) (p)->lpVtbl->Release(p) +#define IServiceProvider_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IServiceProvider_Release(p) (p)->lpVtbl->Release(p) /*** IServiceProvider methods ***/ #define IServiceProvider_QueryService(p,a,b,c) (p)->lpVtbl->QueryService(p,a,b,c) + #endif +#define IServiceProvider_METHODS \ + ICOM_MSVTABLE_COMPAT_FIELDS \ + /*** IUnknown methods ***/ \ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \ + STDMETHOD_(ULONG,AddRef)(THIS) PURE; \ + STDMETHOD_(ULONG,Release)(THIS) PURE; \ + /*** IServiceProvider methods ***/ \ + STDMETHOD_(HRESULT,QueryService)(THIS_ REFGUID guidService, REFIID riid, void** ppvObject) PURE; -#endif /* __WINE_SERVPROV_H */ +HRESULT CALLBACK IServiceProvider_RemoteQueryService_Proxy( + IServiceProvider* This, + REFGUID guidService, + REFIID riid, + IUnknown** ppvObject); +void __RPC_STUB IServiceProvider_RemoteQueryService_Stub( + struct IRpcStubBuffer* This, + struct IRpcChannelBuffer* pRpcChannelBuffer, + PRPC_MESSAGE pRpcMessage, + DWORD* pdwStubPhase); +HRESULT CALLBACK IServiceProvider_QueryService_Proxy( + IServiceProvider* This, + REFGUID guidService, + REFIID riid, + void** ppvObject); +HRESULT __RPC_STUB IServiceProvider_QueryService_Stub( + IServiceProvider* This, + REFGUID guidService, + REFIID riid, + IUnknown** ppvObject); + +#endif /* __IServiceProvider_INTERFACE_DEFINED__ */ + +#ifdef __cplusplus +} +#endif +#endif /* __WIDL_SERVPROV_H */ diff --git a/include/servprov.idl b/include/servprov.idl new file mode 100644 index 00000000000..32b23245bb1 --- /dev/null +++ b/include/servprov.idl @@ -0,0 +1,46 @@ +/* + * Copyright (C) 1999 Francois Gouget + * Copyright (C) 2003 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +import "objidl.idl"; + + +/***************************************************************************** + * IServiceProvider interface + */ +[ + object, + uuid(6d5140c1-7436-11ce-8034-00aa006009fa), + pointer_default(unique) +] +interface IServiceProvider : IUnknown +{ + typedef [unique] IServiceProvider *LPSERVICEPROVIDER; + + [local] + HRESULT QueryService( + [in] REFGUID guidService, + [in] REFIID riid, + [out] void ** ppvObject); + + [call_as(QueryService)] + HRESULT RemoteQueryService( + [in] REFGUID guidService, + [in] REFIID riid, + [out, iid_is(riid)] IUnknown ** ppvObject); +}