dxdiagn: Make the virtual table functions static where possible.

This commit is contained in:
Alexandre Julliard 2006-06-10 11:58:14 +02:00
parent 9d1d5c2aa2
commit fa26809f0a
3 changed files with 31 additions and 38 deletions

View File

@ -20,6 +20,8 @@
*/
#include "config.h"
#define COBJMACROS
#include "dxdiag_private.h"
#include "wine/debug.h"
#include "wine/unicode.h"
@ -33,7 +35,7 @@ HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFII
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IDxDiagContainer)) {
IDxDiagContainerImpl_AddRef(iface);
IUnknown_AddRef(iface);
*ppobj = This;
return S_OK;
}
@ -42,7 +44,7 @@ HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFII
return E_NOINTERFACE;
}
ULONG WINAPI IDxDiagContainerImpl_AddRef(PDXDIAGCONTAINER iface) {
static ULONG WINAPI IDxDiagContainerImpl_AddRef(PDXDIAGCONTAINER iface) {
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
ULONG refCount = InterlockedIncrement(&This->ref);
@ -53,7 +55,7 @@ ULONG WINAPI IDxDiagContainerImpl_AddRef(PDXDIAGCONTAINER iface) {
return refCount;
}
ULONG WINAPI IDxDiagContainerImpl_Release(PDXDIAGCONTAINER iface) {
static ULONG WINAPI IDxDiagContainerImpl_Release(PDXDIAGCONTAINER iface) {
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
ULONG refCount = InterlockedDecrement(&This->ref);
@ -69,7 +71,7 @@ ULONG WINAPI IDxDiagContainerImpl_Release(PDXDIAGCONTAINER iface) {
}
/* IDxDiagContainer Interface follow: */
HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfChildContainers(PDXDIAGCONTAINER iface, DWORD* pdwCount) {
static HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfChildContainers(PDXDIAGCONTAINER iface, DWORD* pdwCount) {
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
TRACE("(%p)\n", iface);
if (NULL == pdwCount) {
@ -79,7 +81,7 @@ HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfChildContainers(PDXDIAGCONTAINER
return S_OK;
}
HRESULT WINAPI IDxDiagContainerImpl_EnumChildContainerNames(PDXDIAGCONTAINER iface, DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) {
static HRESULT WINAPI IDxDiagContainerImpl_EnumChildContainerNames(PDXDIAGCONTAINER iface, DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) {
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
IDxDiagContainerImpl_SubContainer* p = NULL;
DWORD i = 0;
@ -108,7 +110,7 @@ HRESULT WINAPI IDxDiagContainerImpl_EnumChildContainerNames(PDXDIAGCONTAINER ifa
return E_INVALIDARG;
}
HRESULT WINAPI IDxDiagContainerImpl_GetChildContainerInternal(PDXDIAGCONTAINER iface, LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) {
static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainerInternal(PDXDIAGCONTAINER iface, LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) {
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
IDxDiagContainerImpl_SubContainer* p = NULL;
@ -123,7 +125,7 @@ HRESULT WINAPI IDxDiagContainerImpl_GetChildContainerInternal(PDXDIAGCONTAINER i
return E_INVALIDARG;
}
HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) {
static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) {
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
IDxDiagContainer* pContainer = NULL;
LPWSTR tmp, orig_tmp;
@ -165,7 +167,7 @@ on_error:
return hr;
}
HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfProps(PDXDIAGCONTAINER iface, DWORD* pdwCount) {
static HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfProps(PDXDIAGCONTAINER iface, DWORD* pdwCount) {
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
TRACE("(%p)\n", iface);
if (NULL == pdwCount) {
@ -175,7 +177,7 @@ HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfProps(PDXDIAGCONTAINER iface, DWO
return S_OK;
}
HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(PDXDIAGCONTAINER iface, DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) {
static HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(PDXDIAGCONTAINER iface, DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) {
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
IDxDiagContainerImpl_Property* p = NULL;
DWORD i = 0;
@ -204,7 +206,7 @@ HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(PDXDIAGCONTAINER iface, DWORD
return E_INVALIDARG;
}
HRESULT WINAPI IDxDiagContainerImpl_GetProp(PDXDIAGCONTAINER iface, LPCWSTR pwszPropName, VARIANT* pvarProp) {
static HRESULT WINAPI IDxDiagContainerImpl_GetProp(PDXDIAGCONTAINER iface, LPCWSTR pwszPropName, VARIANT* pvarProp) {
IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
IDxDiagContainerImpl_Property* p = NULL;
FIXME("(%p, %s, %p)\n", iface, debugstr_w(pwszPropName), pvarProp);

View File

@ -53,15 +53,6 @@ struct IDxDiagProviderImpl {
IDxDiagContainer* pRootContainer;
};
/* IUnknown: */
extern HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDxDiagProviderImpl_AddRef(PDXDIAGPROVIDER iface);
extern ULONG WINAPI IDxDiagProviderImpl_Release(PDXDIAGPROVIDER iface);
/* IDxDiagProvider: */
extern HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDIAG_INIT_PARAMS* pParams);
extern HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface, IDxDiagContainer** ppInstance);
/* ---------------- */
/* IDxDiagContainer */
/* ---------------- */
@ -95,8 +86,6 @@ struct IDxDiagContainerImpl {
/* IUnknown: */
extern HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFIID riid, LPVOID *ppobj);
extern ULONG WINAPI IDxDiagContainerImpl_AddRef(PDXDIAGCONTAINER iface);
/** Internal */
extern HRESULT WINAPI IDxDiagContainerImpl_AddProp(PDXDIAGCONTAINER iface, LPCWSTR pwszPropName, VARIANT* pVarProp);
extern HRESULT WINAPI IDxDiagContainerImpl_AddChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pszContName, PDXDIAGCONTAINER pSubCont);

View File

@ -35,13 +35,13 @@
WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
/* IDxDiagProvider IUnknown parts follow: */
HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, REFIID riid, LPVOID *ppobj)
static HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, REFIID riid, LPVOID *ppobj)
{
IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IDxDiagProvider)) {
IDxDiagProviderImpl_AddRef(iface);
IUnknown_AddRef(iface);
*ppobj = This;
return S_OK;
}
@ -50,7 +50,7 @@ HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, REFIID
return E_NOINTERFACE;
}
ULONG WINAPI IDxDiagProviderImpl_AddRef(PDXDIAGPROVIDER iface) {
static ULONG WINAPI IDxDiagProviderImpl_AddRef(PDXDIAGPROVIDER iface) {
IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
ULONG refCount = InterlockedIncrement(&This->ref);
@ -61,7 +61,7 @@ ULONG WINAPI IDxDiagProviderImpl_AddRef(PDXDIAGPROVIDER iface) {
return refCount;
}
ULONG WINAPI IDxDiagProviderImpl_Release(PDXDIAGPROVIDER iface) {
static ULONG WINAPI IDxDiagProviderImpl_Release(PDXDIAGPROVIDER iface) {
IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
ULONG refCount = InterlockedDecrement(&This->ref);
@ -77,7 +77,7 @@ ULONG WINAPI IDxDiagProviderImpl_Release(PDXDIAGPROVIDER iface) {
}
/* IDxDiagProvider Interface follow: */
HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDIAG_INIT_PARAMS* pParams) {
static HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDIAG_INIT_PARAMS* pParams) {
IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
TRACE("(%p,%p)\n", iface, pParams);
@ -93,7 +93,7 @@ HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDIAG_INIT
return S_OK;
}
HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface, IDxDiagContainer** ppInstance) {
static HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface, IDxDiagContainer** ppInstance) {
HRESULT hr = S_OK;
IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
TRACE("(%p,%p)\n", iface, ppInstance);
@ -142,7 +142,7 @@ HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, R
* @param szFilePath: usually GetSystemDirectoryW
* @param szFileName: name of the dll without path
*/
HRESULT DXDiag_AddFileDescContainer(IDxDiagContainer* pSubCont, const WCHAR* szFilePath, const WCHAR* szFileName) {
static HRESULT DXDiag_AddFileDescContainer(IDxDiagContainer* pSubCont, const WCHAR* szFilePath, const WCHAR* szFileName) {
HRESULT hr = S_OK;
/**/
static const WCHAR szSlashSep[] = {'\\',0};
@ -229,7 +229,7 @@ HRESULT DXDiag_AddFileDescContainer(IDxDiagContainer* pSubCont, const WCHAR* szF
return hr;
}
HRESULT DXDiag_InitDXDiagSystemInfoContainer(IDxDiagContainer* pSubCont) {
static HRESULT DXDiag_InitDXDiagSystemInfoContainer(IDxDiagContainer* pSubCont) {
HRESULT hr = S_OK;
static const WCHAR dwDirectXVersionMajor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','a','j','o','r',0};
static const WCHAR dwDirectXVersionMinor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','i','n','o','r',0};
@ -271,7 +271,7 @@ HRESULT DXDiag_InitDXDiagSystemInfoContainer(IDxDiagContainer* pSubCont) {
return hr;
}
HRESULT DXDiag_InitDXDiagSystemDevicesContainer(IDxDiagContainer* pSubCont) {
static HRESULT DXDiag_InitDXDiagSystemDevicesContainer(IDxDiagContainer* pSubCont) {
HRESULT hr = S_OK;
/*
static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0};
@ -307,7 +307,7 @@ HRESULT DXDiag_InitDXDiagSystemDevicesContainer(IDxDiagContainer* pSubCont) {
return hr;
}
HRESULT DXDiag_InitDXDiagLogicalDisksContainer(IDxDiagContainer* pSubCont) {
static HRESULT DXDiag_InitDXDiagLogicalDisksContainer(IDxDiagContainer* pSubCont) {
HRESULT hr = S_OK;
/*
static const WCHAR szDriveLetter[] = {'s','z','D','r','i','v','e','L','e','t','t','e','r',0};
@ -339,7 +339,7 @@ HRESULT DXDiag_InitDXDiagLogicalDisksContainer(IDxDiagContainer* pSubCont) {
*/
return hr;
}
HRESULT DXDiag_InitDXDiagDirectXFilesContainer(IDxDiagContainer* pSubCont) {
static HRESULT DXDiag_InitDXDiagDirectXFilesContainer(IDxDiagContainer* pSubCont) {
HRESULT hr = S_OK;
/**/
static const WCHAR ddraw_dll[] = {'d','d','r','a','w','.','d','l','l',0};
@ -389,7 +389,7 @@ HRESULT DXDiag_InitDXDiagDirectXFilesContainer(IDxDiagContainer* pSubCont) {
return hr;
}
HRESULT DXDiag_InitDXDiagDisplayContainer(IDxDiagContainer* pSubCont) {
static HRESULT DXDiag_InitDXDiagDisplayContainer(IDxDiagContainer* pSubCont) {
HRESULT hr = S_OK;
/*
static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0};
@ -406,7 +406,7 @@ HRESULT DXDiag_InitDXDiagDisplayContainer(IDxDiagContainer* pSubCont) {
return hr;
}
HRESULT DXDiag_InitDXDiagDirectSoundContainer(IDxDiagContainer* pSubCont) {
static HRESULT DXDiag_InitDXDiagDirectSoundContainer(IDxDiagContainer* pSubCont) {
HRESULT hr = S_OK;
static const WCHAR DxDiag_SoundDevices[] = {'D','x','D','i','a','g','_','S','o','u','n','d','D','e','v','i','c','e','s',0};
static const WCHAR DxDiag_SoundCaptureDevices[] = {'D','x','D','i','a','g','_','S','o','u','n','d','C','a','p','t','u','r','e','D','e','v','i','c','e','s',0};
@ -423,15 +423,17 @@ HRESULT DXDiag_InitDXDiagDirectSoundContainer(IDxDiagContainer* pSubCont) {
return hr;
}
HRESULT DXDiag_InitDXDiagDirectMusicContainer(IDxDiagContainer* pSubCont) {
static HRESULT DXDiag_InitDXDiagDirectMusicContainer(IDxDiagContainer* pSubCont) {
HRESULT hr = S_OK;
return hr;
}
HRESULT DXDiag_InitDXDiagDirectInputContainer(IDxDiagContainer* pSubCont) {
static HRESULT DXDiag_InitDXDiagDirectInputContainer(IDxDiagContainer* pSubCont) {
HRESULT hr = S_OK;
return hr;
}
HRESULT DXDiag_InitDXDiagDirectPlayContainer(IDxDiagContainer* pSubCont) {
static HRESULT DXDiag_InitDXDiagDirectPlayContainer(IDxDiagContainer* pSubCont) {
HRESULT hr = S_OK;
return hr;
}
@ -458,7 +460,7 @@ struct REG_TYPE {
DWORD dwOffsetMinor;
};
HRESULT DXDiag_InitDXDiagDirectShowFiltersContainer(IDxDiagContainer* pSubCont) {
static HRESULT DXDiag_InitDXDiagDirectShowFiltersContainer(IDxDiagContainer* pSubCont) {
HRESULT hr = S_OK;
static const WCHAR szName[] = {'s','z','N','a','m','e',0};
static const WCHAR szCatName[] = {'s','z','C','a','t','N','a','m','e',0};