dxdiagn vendor drop
Added: vendor/wine/dlls/dxdiagn/
Added: vendor/wine/dlls/dxdiagn/current/
Added: vendor/wine/dlls/dxdiagn/current/Makefile.in
Added: vendor/wine/dlls/dxdiagn/current/container.c
Added: vendor/wine/dlls/dxdiagn/current/dxdiag_main.c
Added: vendor/wine/dlls/dxdiagn/current/dxdiag_private.h
Added: vendor/wine/dlls/dxdiagn/current/dxdiagn.spec
Added: vendor/wine/dlls/dxdiagn/current/provider.c
Added: vendor/wine/dlls/dxdiagn/current/regsvr.c
Added: vendor/wine/dlls/dxdiagn/current/version.rc

Added: vendor/wine/dlls/dxdiagn/current/Makefile.in
--- vendor/wine/dlls/dxdiagn/current/Makefile.in	2005-12-14 22:41:16 UTC (rev 20178)
+++ vendor/wine/dlls/dxdiagn/current/Makefile.in	2005-12-14 22:45:50 UTC (rev 20179)
@@ -0,0 +1,19 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = dxdiagn.dll
+IMPORTS   = version ole32 oleaut32 user32 advapi32 kernel32
+EXTRALIBS = -lstrmiids -ldxguid -luuid $(LIBUNICODE)
+
+C_SRCS = \
+	container.c \
+	dxdiag_main.c \
+	provider.c \
+	regsvr.c
+
+RC_SRCS = version.rc
+
+@MAKE_DLL_RULES@
+
+### Dependencies:
Property changes on: vendor/wine/dlls/dxdiagn/current/Makefile.in
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: vendor/wine/dlls/dxdiagn/current/container.c
--- vendor/wine/dlls/dxdiagn/current/container.c	2005-12-14 22:41:16 UTC (rev 20178)
+++ vendor/wine/dlls/dxdiagn/current/container.c	2005-12-14 22:45:50 UTC (rev 20179)
@@ -0,0 +1,321 @@
+/* 
+ * IDxDiagContainer Implementation
+ * 
+ * Copyright 2004 Raphael Junqueira
+ *
+ * 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
+ *
+ */
+
+#include "config.h"
+#include "dxdiag_private.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
+
+/* IDxDiagContainer IUnknown parts follow: */
+HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFIID riid, LPVOID *ppobj)
+{
+    IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+
+    if (IsEqualGUID(riid, &IID_IUnknown)
+        || IsEqualGUID(riid, &IID_IDxDiagContainer)) {
+        IDxDiagContainerImpl_AddRef(iface);
+        *ppobj = This;
+        return S_OK;
+    }
+
+    WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+    return E_NOINTERFACE;
+}
+
+ULONG WINAPI IDxDiagContainerImpl_AddRef(PDXDIAGCONTAINER iface) {
+    IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+    ULONG refCount = InterlockedIncrement(&This->ref);
+
+    TRACE("(%p)->(ref before=%lu)\n", This, refCount - 1);
+
+    DXDIAGN_LockModule();
+
+    return refCount;
+}
+
+ULONG WINAPI IDxDiagContainerImpl_Release(PDXDIAGCONTAINER iface) {
+    IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+    ULONG refCount = InterlockedDecrement(&This->ref);
+
+    TRACE("(%p)->(ref before=%lu)\n", This, refCount + 1);
+
+    if (!refCount) {
+        HeapFree(GetProcessHeap(), 0, This);
+    }
+
+    DXDIAGN_UnlockModule();
+    
+    return refCount;
+}
+
+/* IDxDiagContainer Interface follow: */
+HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfChildContainers(PDXDIAGCONTAINER iface, DWORD* pdwCount) {
+  IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+  TRACE("(%p)\n", iface);
+  if (NULL == pdwCount) {
+    return E_INVALIDARG;
+  }
+  *pdwCount = This->nSubContainers;
+  return S_OK;
+}
+
+HRESULT WINAPI IDxDiagContainerImpl_EnumChildContainerNames(PDXDIAGCONTAINER iface, DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) {
+  IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+  IDxDiagContainerImpl_SubContainer* p = NULL;
+  DWORD i = 0;
+  
+  TRACE("(%p, %lu, %s, %lu)\n", iface, dwIndex, debugstr_w(pwszContainer), cchContainer);
+
+  if (NULL == pwszContainer) {
+    return E_INVALIDARG;
+  }
+  if (256 > cchContainer) {
+    return DXDIAG_E_INSUFFICIENT_BUFFER;
+  }
+  
+  p = This->subContainers;
+  while (NULL != p) {
+    if (dwIndex == i) {  
+      if (cchContainer <= strlenW(p->contName)) {
+	return DXDIAG_E_INSUFFICIENT_BUFFER;
+      }
+      lstrcpynW(pwszContainer, p->contName, cchContainer);
+      return S_OK;
+    }
+    p = p->next;
+    ++i;
+  }  
+  return E_INVALIDARG;
+}
+
+HRESULT WINAPI IDxDiagContainerImpl_GetChildContainerInternal(PDXDIAGCONTAINER iface, LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) {
+  IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+  IDxDiagContainerImpl_SubContainer* p = NULL;
+
+  p = This->subContainers;
+  while (NULL != p) {
+    if (0 == lstrcmpW(p->contName, pwszContainer)) {      
+      *ppInstance = (PDXDIAGCONTAINER)p->pCont;
+      return S_OK;
+    }
+    p = p->next;
+  }
+  return E_INVALIDARG;
+}
+
+HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) {
+  IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+  IDxDiagContainer* pContainer = NULL;
+  LPWSTR tmp, orig_tmp;
+  INT tmp_len;
+  WCHAR* cur;
+  HRESULT hr = E_INVALIDARG;
+
+  FIXME("(%p, %s, %p)\n", iface, debugstr_w(pwszContainer), ppInstance);
+
+  if (NULL == ppInstance || NULL == pwszContainer) {
+    return E_INVALIDARG;
+  }
+
+  pContainer = (PDXDIAGCONTAINER) This;
+
+  tmp_len = strlenW(pwszContainer) + 1;
+  orig_tmp = tmp = HeapAlloc(GetProcessHeap(), 0, tmp_len * sizeof(WCHAR));
+  if (NULL == tmp) return E_FAIL;
+  lstrcpynW(tmp, pwszContainer, tmp_len);
+
+  cur = strchrW(tmp, '.');
+  while (NULL != cur) {
+    *cur = '\0'; /* cut tmp string to '.' */
+    hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, &pContainer);
+    if (!SUCCEEDED(hr) || NULL == pContainer)
+      goto on_error;
+    *cur++; /* go after '.' (just replaced by \0) */
+    tmp = cur;
+    cur = strchrW(tmp, '.');
+  }
+
+  hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, ppInstance);
+  if (SUCCEEDED(hr)) {
+    IDxDiagContainerImpl_AddRef((PDXDIAGCONTAINER)*ppInstance);
+  }
+
+on_error:
+  HeapFree(GetProcessHeap(), 0, orig_tmp);
+  return hr;
+}
+
+HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfProps(PDXDIAGCONTAINER iface, DWORD* pdwCount) {
+  IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+  TRACE("(%p)\n", iface);
+  if (NULL == pdwCount) {
+    return E_INVALIDARG;
+  }
+  *pdwCount = This->nProperties;
+  return S_OK;
+}
+
+HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(PDXDIAGCONTAINER iface, DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) {
+  IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+  IDxDiagContainerImpl_Property* p = NULL;
+  DWORD i = 0;
+  
+  FIXME("(%p, %lu, %s, %lu)\n", iface, dwIndex, debugstr_w(pwszPropName), cchPropName);
+
+  if (NULL == pwszPropName) {
+    return E_INVALIDARG;
+  }
+  if (256 > cchPropName) {
+    return DXDIAG_E_INSUFFICIENT_BUFFER;
+  }
+  
+  p = This->properties;
+  while (NULL != p) {
+    if (dwIndex == i) {  
+      if (cchPropName <= lstrlenW(p->vName)) {
+	return DXDIAG_E_INSUFFICIENT_BUFFER;
+      }
+      lstrcpynW(pwszPropName, p->vName, cchPropName);
+      return S_OK;
+    }
+    p = p->next;
+    ++i;
+  }  
+  return E_INVALIDARG;
+}
+
+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);
+
+  if (NULL == pvarProp || NULL == pwszPropName) {
+    return E_INVALIDARG;
+  }
+
+  p = This->properties;
+  while (NULL != p) {
+    if (0 == lstrcmpW(p->vName, pwszPropName)) {      
+      VariantCopy(pvarProp, &p->v);
+      return S_OK;
+    }
+    p = p->next;
+  }
+  return S_OK;
+}
+
+HRESULT WINAPI IDxDiagContainerImpl_AddProp(PDXDIAGCONTAINER iface, LPCWSTR pwszPropName, VARIANT* pVarProp) {
+  IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+  IDxDiagContainerImpl_Property* p = NULL;
+  IDxDiagContainerImpl_Property* pNew = NULL;
+
+  FIXME("(%p, %s, %p)\n", iface, debugstr_w(pwszPropName), pVarProp);
+
+  if (NULL == pVarProp || NULL == pwszPropName) {
+    return E_INVALIDARG;
+  }
+
+  pNew =  HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagContainerImpl_Property));
+  if (NULL == pNew) {
+    return E_OUTOFMEMORY;
+  }
+  VariantInit(&pNew->v);
+  VariantCopy(&pNew->v, pVarProp);
+  pNew->vName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwszPropName) + 1) * sizeof(WCHAR));
+  lstrcpyW(pNew->vName, pwszPropName);
+  pNew->next = NULL;
+
+  p = This->properties;
+  if (NULL == p) {
+    This->properties = pNew;
+  } else {
+    while (NULL != p->next) {
+      p = p->next;
+    }
+    p->next = pNew;
+  }
+  ++This->nProperties;
+  return S_OK;
+}
+
+HRESULT WINAPI IDxDiagContainerImpl_AddChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pszContName, PDXDIAGCONTAINER pSubCont) {
+  IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface;
+  IDxDiagContainerImpl_SubContainer* p = NULL;
+  IDxDiagContainerImpl_SubContainer* pNew = NULL;
+
+  FIXME("(%p, %s, %p)\n", iface, debugstr_w(pszContName), pSubCont);
+
+  if (NULL == pSubCont || NULL == pszContName) {
+    return E_INVALIDARG;
+  }
+
+  pNew =  HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagContainerImpl_SubContainer));
+  if (NULL == pNew) {
+    return E_OUTOFMEMORY;
+  }
+  pNew->pCont = pSubCont;
+  pNew->contName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pszContName) + 1) * sizeof(WCHAR));
+  lstrcpyW(pNew->contName, pszContName);
+  pNew->next = NULL;
+
+  p = This->subContainers;
+  if (NULL == p) {
+    This->subContainers = pNew;
+  } else {
+    while (NULL != p->next) {
+      p = p->next;
+    }
+    p->next = pNew;
+  }
+  ++This->nSubContainers;
+  return S_OK;
+}
+
+static const IDxDiagContainerVtbl DxDiagContainer_Vtbl =
+{
+    IDxDiagContainerImpl_QueryInterface,
+    IDxDiagContainerImpl_AddRef,
+    IDxDiagContainerImpl_Release,
+    IDxDiagContainerImpl_GetNumberOfChildContainers,
+    IDxDiagContainerImpl_EnumChildContainerNames,
+    IDxDiagContainerImpl_GetChildContainer,
+    IDxDiagContainerImpl_GetNumberOfProps,
+    IDxDiagContainerImpl_EnumPropNames,
+    IDxDiagContainerImpl_GetProp
+};
+
+
+HRESULT DXDiag_CreateDXDiagContainer(REFIID riid, LPVOID *ppobj) {
+  IDxDiagContainerImpl* container;
+
+  TRACE("(%p, %p)\n", debugstr_guid(riid), ppobj);
+  
+  container = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagContainerImpl));
+  if (NULL == container) {
+    *ppobj = NULL;
+    return E_OUTOFMEMORY;
+  }
+  container->lpVtbl = &DxDiagContainer_Vtbl;
+  container->ref = 0; /* will be inited with QueryInterface */
+  return IDxDiagContainerImpl_QueryInterface((PDXDIAGCONTAINER)container, riid, ppobj);
+}
Property changes on: vendor/wine/dlls/dxdiagn/current/container.c
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: vendor/wine/dlls/dxdiagn/current/dxdiag_main.c
--- vendor/wine/dlls/dxdiagn/current/dxdiag_main.c	2005-12-14 22:41:16 UTC (rev 20178)
+++ vendor/wine/dlls/dxdiagn/current/dxdiag_main.c	2005-12-14 22:45:50 UTC (rev 20179)
@@ -0,0 +1,127 @@
+/* 
+ * DXDiag
+ * 
+ * Copyright 2004 Raphael Junqueira
+ *
+ * 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
+ *
+ */
+
+#include "config.h"
+#include "dxdiag_private.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
+
+LONG DXDIAGN_refCount = 0;
+
+/* At process attach */
+BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+  TRACE("%p,%lx,%p\n", hInstDLL, fdwReason, lpvReserved);
+  if (fdwReason == DLL_PROCESS_ATTACH) {
+    DisableThreadLibraryCalls(hInstDLL);    
+  }
+  return TRUE;
+}
+
+/*******************************************************************************
+ * DXDiag ClassFactory
+ */
+typedef struct {
+  const IClassFactoryVtbl *lpVtbl;
+  REFCLSID   rclsid;
+  HRESULT   (*pfnCreateInstanceFactory)(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj);
+} IClassFactoryImpl;
+
+static HRESULT WINAPI DXDiagCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
+  FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
+
+  if (ppobj == NULL) return E_POINTER;
+  
+  return E_NOINTERFACE;
+}
+
+static ULONG WINAPI DXDiagCF_AddRef(LPCLASSFACTORY iface) {
+  DXDIAGN_LockModule();
+
+  return 2; /* non-heap based object */
+}
+
+static ULONG WINAPI DXDiagCF_Release(LPCLASSFACTORY iface) {
+  DXDIAGN_UnlockModule();
+
+  return 1; /* non-heap based object */
+}
+
+static HRESULT WINAPI DXDiagCF_CreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj) {
+  IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
+  TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
+  
+  return This->pfnCreateInstanceFactory(iface, pOuter, riid, ppobj);
+}
+
+static HRESULT WINAPI DXDiagCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
+  TRACE("(%d)\n", dolock);
+
+  if (dolock)
+    DXDIAGN_LockModule();
+  else
+    DXDIAGN_UnlockModule();
+  
+  return S_OK;
+}
+
+static const IClassFactoryVtbl DXDiagCF_Vtbl = {
+  DXDiagCF_QueryInterface,
+  DXDiagCF_AddRef,
+  DXDiagCF_Release,
+  DXDiagCF_CreateInstance,
+  DXDiagCF_LockServer
+};
+
+static IClassFactoryImpl DXDiag_CFS[] = {
+  { &DXDiagCF_Vtbl, &CLSID_DxDiagProvider, DXDiag_CreateDXDiagProvider },
+  { NULL, NULL, NULL }
+};
+
+/***********************************************************************
+ *             DllCanUnloadNow (DXDIAGN.@)
+ */
+HRESULT WINAPI DllCanUnloadNow(void)
+{
+  return DXDIAGN_refCount != 0 ? S_FALSE : S_OK;
+}
+
+/***********************************************************************
+ *		DllGetClassObject (DXDIAGN.@)
+ */
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
+{
+    int i = 0;
+
+    TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
+    while (NULL != DXDiag_CFS[i].rclsid) {
+      if (IsEqualGUID(rclsid, DXDiag_CFS[i].rclsid)) {
+	      DXDiagCF_AddRef((IClassFactory*) &DXDiag_CFS[i]);
+	      *ppv = &DXDiag_CFS[i];
+	      return S_OK;
+      }
+      ++i;
+    }
+
+    FIXME("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
+    return CLASS_E_CLASSNOTAVAILABLE;
+}
Property changes on: vendor/wine/dlls/dxdiagn/current/dxdiag_main.c
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: vendor/wine/dlls/dxdiagn/current/dxdiag_private.h
--- vendor/wine/dlls/dxdiagn/current/dxdiag_private.h	2005-12-14 22:41:16 UTC (rev 20178)
+++ vendor/wine/dlls/dxdiagn/current/dxdiag_private.h	2005-12-14 22:45:50 UTC (rev 20179)
@@ -0,0 +1,120 @@
+/*
+ * DXDiag private include file
+ *
+ * Copyright 2004 Raphael Junqueira
+ *
+ * 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
+ */
+
+#ifndef __WINE_DXDIAG_PRIVATE_H
+#define __WINE_DXDIAG_PRIVATE_H
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "objbase.h"
+#include "oleauto.h"
+
+#include "dxdiag.h"
+
+/* DXDiag Interfaces: */
+typedef struct IDxDiagProviderImpl  IDxDiagProviderImpl;
+typedef struct IDxDiagContainerImpl IDxDiagContainerImpl;
+
+/* ---------------- */
+/* IDxDiagProvider  */
+/* ---------------- */
+
+/*****************************************************************************
+ * IDxDiagProvider implementation structure
+ */
+struct IDxDiagProviderImpl {
+  /* IUnknown fields */
+  const IDxDiagProviderVtbl *lpVtbl;
+  LONG        ref;
+  /* IDxDiagProvider fields */
+  BOOL        init;
+  DXDIAG_INIT_PARAMS params;
+  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  */
+/* ---------------- */
+
+typedef struct IDxDiagContainerImpl_SubContainer {
+  IDxDiagContainer* pCont;
+  WCHAR* contName;
+  struct IDxDiagContainerImpl_SubContainer* next;
+} IDxDiagContainerImpl_SubContainer;
+
+typedef struct IDxDiagContainerImpl_Property {
+  LPWSTR vName;
+  VARIANT v;
+  struct IDxDiagContainerImpl_Property* next;
+} IDxDiagContainerImpl_Property;
+
+
+/*****************************************************************************
+ * IDxDiagContainer implementation structure
+ */
+struct IDxDiagContainerImpl {
+  /* IUnknown fields */
+  const IDxDiagContainerVtbl *lpVtbl;
+  LONG        ref;
+  /* IDxDiagContainer fields */
+  IDxDiagContainerImpl_Property* properties;  
+  IDxDiagContainerImpl_SubContainer* subContainers;
+  DWORD nProperties;
+  DWORD nSubContainers;
+};
+
+/* 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);
+
+/**
+ * factories
+ */
+extern HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj);
+
+/** internal factory */
+extern HRESULT DXDiag_CreateDXDiagContainer(REFIID riid, LPVOID *ppobj);
+extern HRESULT DXDiag_InitRootDXDiagContainer(IDxDiagContainer* pRootCont);
+
+/**********************************************************************
+ * Dll lifetime tracking declaration for dxdiagn.dll
+ */
+extern LONG DXDIAGN_refCount;
+static inline void DXDIAGN_LockModule(void) { InterlockedIncrement( &DXDIAGN_refCount ); }
+static inline void DXDIAGN_UnlockModule(void) { InterlockedDecrement( &DXDIAGN_refCount ); }
+
+#endif
Property changes on: vendor/wine/dlls/dxdiagn/current/dxdiag_private.h
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: vendor/wine/dlls/dxdiagn/current/dxdiagn.spec
--- vendor/wine/dlls/dxdiagn/current/dxdiagn.spec	2005-12-14 22:41:16 UTC (rev 20178)
+++ vendor/wine/dlls/dxdiagn/current/dxdiagn.spec	2005-12-14 22:45:50 UTC (rev 20179)
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
Property changes on: vendor/wine/dlls/dxdiagn/current/dxdiagn.spec
___________________________________________________________________
Name: svn:eol-style
   + native

Added: vendor/wine/dlls/dxdiagn/current/provider.c
--- vendor/wine/dlls/dxdiagn/current/provider.c	2005-12-14 22:41:16 UTC (rev 20178)
+++ vendor/wine/dlls/dxdiagn/current/provider.c	2005-12-14 22:45:50 UTC (rev 20179)
@@ -0,0 +1,689 @@
+/* 
+ * IDxDiagProvider Implementation
+ * 
+ * Copyright 2004-2005 Raphael Junqueira
+ *
+ * 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
+ *
+ */
+
+#include "config.h"
+#include "wine/debug.h"
+
+#define COBJMACROS
+#include "dxdiag_private.h"
+#include "wine/unicode.h"
+#include "winver.h"
+#include "objidl.h"
+#include "dshow.h"
+#include "strmif.h"
+#include "vfw.h"
+#include "mmddk.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
+
+/* IDxDiagProvider IUnknown parts follow: */
+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);
+        *ppobj = This;
+        return S_OK;
+    }
+
+    WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+    return E_NOINTERFACE;
+}
+
+ULONG WINAPI IDxDiagProviderImpl_AddRef(PDXDIAGPROVIDER iface) {
+    IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
+    ULONG refCount = InterlockedIncrement(&This->ref);
+
+    TRACE("(%p)->(ref before=%lu)\n", This, refCount - 1);
+
+    DXDIAGN_LockModule();
+
+    return refCount;
+}
+
+ULONG WINAPI IDxDiagProviderImpl_Release(PDXDIAGPROVIDER iface) {
+    IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
+    ULONG refCount = InterlockedDecrement(&This->ref);
+
+    TRACE("(%p)->(ref before=%lu)\n", This, refCount + 1);
+
+    if (!refCount) {
+        HeapFree(GetProcessHeap(), 0, This);
+    }
+
+    DXDIAGN_UnlockModule();
+    
+    return refCount;
+}
+
+/* IDxDiagProvider Interface follow: */
+HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDIAG_INIT_PARAMS* pParams) {
+    IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
+    TRACE("(%p,%p)\n", iface, pParams);
+
+    if (NULL == pParams) {
+      return E_POINTER;
+    }
+    if (pParams->dwSize != sizeof(DXDIAG_INIT_PARAMS)) {
+      return E_INVALIDARG;
+    }
+
+    This->init = TRUE;
+    memcpy(&This->params, pParams, pParams->dwSize);
+    return S_OK;
+}
+
+HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface, IDxDiagContainer** ppInstance) {
+  HRESULT hr = S_OK;
+  IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface;
+  TRACE("(%p,%p)\n", iface, ppInstance);
+
+  if (NULL == ppInstance) {
+    return E_INVALIDARG;
+  }
+  if (FALSE == This->init) {
+    return E_INVALIDARG; /* should be E_CO_UNINITIALIZED */
+  }
+  if (NULL == This->pRootContainer) {
+    hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &This->pRootContainer);
+    if (FAILED(hr)) {
+      return hr;
+    }
+    hr = DXDiag_InitRootDXDiagContainer((PDXDIAGCONTAINER)This->pRootContainer);
+  }
+  return IDxDiagContainerImpl_QueryInterface((PDXDIAGCONTAINER)This->pRootContainer, &IID_IDxDiagContainer, (void**) ppInstance);
+}
+
+static const IDxDiagProviderVtbl DxDiagProvider_Vtbl =
+{
+    IDxDiagProviderImpl_QueryInterface,
+    IDxDiagProviderImpl_AddRef,
+    IDxDiagProviderImpl_Release,
+    IDxDiagProviderImpl_Initialize,
+    IDxDiagProviderImpl_GetRootContainer
+};
+
+HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) {
+  IDxDiagProviderImpl* provider;
+
+  TRACE("(%p, %s, %p)\n", punkOuter, debugstr_guid(riid), ppobj);
+  
+  provider = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagProviderImpl));
+  if (NULL == provider) {
+    *ppobj = NULL;
+    return E_OUTOFMEMORY;
+  }
+  provider->lpVtbl = &DxDiagProvider_Vtbl;
+  provider->ref = 0; /* will be inited with QueryInterface */
+  return IDxDiagProviderImpl_QueryInterface ((PDXDIAGPROVIDER)provider, riid, ppobj);
+} 
+
+/**
+ * @param szFilePath: usually GetSystemDirectoryW
+ * @param szFileName: name of the dll without path
+ */
+HRESULT DXDiag_AddFileDescContainer(IDxDiagContainer* pSubCont, const WCHAR* szFilePath, const WCHAR* szFileName) {
+  HRESULT hr = S_OK;
+  /**/
+  static const WCHAR szSlashSep[] = {'\\',0};
+  static const WCHAR szPath[] = {'s','z','P','a','t','h',0};
+  static const WCHAR szName[] = {'s','z','N','a','m','e',0};
+  static const WCHAR szVersion[] = {'s','z','V','e','r','s','i','o','n',0};
+  static const WCHAR szAttributes[] = {'s','z','A','t','t','r','i','b','u','t','e','s',0};
+  static const WCHAR szLanguageEnglish[] = {'s','z','L','a','n','g','u','a','g','e','E','n','g','l','i','s','h',0};
+  static const WCHAR dwFileTimeHigh[] = {'d','w','F','i','l','e','T','i','m','e','H','i','g','h',0};
+  static const WCHAR dwFileTimeLow[] = {'d','w','F','i','l','e','T','i','m','e','L','o','w',0};
+  static const WCHAR bBeta[] = {'b','B','e','t','a',0};
+  static const WCHAR bDebug[] = {'b','D','e','b','u','g',0};
+  static const WCHAR bExists[] = {'b','E','x','i','s','t','s',0};
+  /** values */
+  static const WCHAR szFinal_Retail_v[] = {'F','i','n','a','l',' ','R','e','t','a','i','l',0};
+  static const WCHAR szEnglish_v[] = {'E','n','g','l','i','s','h',0};
+  static const WCHAR szVersionFormat[] = {'%','u','.','%','0','2','u','.','%','0','4','u','.','%','0','4','u',0};
+  VARIANT v;
+
+  WCHAR szFile[512];
+  WCHAR szVersion_v[1024];
+  DWORD retval, hdl;
+  LPVOID pVersionInfo;
+  BOOL boolret;
+  UINT uiLength;
+  VS_FIXEDFILEINFO* pFileInfo;
+
+  FIXME("(%p,%s)\n", pSubCont, debugstr_w(szFileName));
+  
+  lstrcpyW(szFile, szFilePath);
+  lstrcatW(szFile, szSlashSep);
+  lstrcatW(szFile, szFileName);
+
+  retval = GetFileVersionInfoSizeW(szFile, &hdl);
+  pVersionInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, retval);
+  hr = GetFileVersionInfoW(szFile, 0, retval, pVersionInfo); 
+  boolret = VerQueryValueW(pVersionInfo, (LPWSTR) szSlashSep, (LPVOID) &pFileInfo, &uiLength);
+
+  V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(szFile);
+  hr = IDxDiagContainerImpl_AddProp(pSubCont, szPath, &v);
+  VariantClear(&v);
+  V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(szFileName);
+  hr = IDxDiagContainerImpl_AddProp(pSubCont, szName, &v);
+  VariantClear(&v);
+  V_VT(&v) = VT_BOOL; V_BOOL(&v) = boolret;
+  hr = IDxDiagContainerImpl_AddProp(pSubCont, bExists, &v);  
+  VariantClear(&v);
+
+  if (boolret) {
+    snprintfW(szVersion_v, sizeof(szVersion_v), 
+	      szVersionFormat,
+	      HIWORD(pFileInfo->dwFileVersionMS), 
+	      LOWORD(pFileInfo->dwFileVersionMS),
+	      HIWORD(pFileInfo->dwFileVersionLS),
+	      LOWORD(pFileInfo->dwFileVersionLS));
+
+    TRACE("Found version as (%s)\n", debugstr_w(szVersion_v));
+
+    V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(szVersion_v);
+    hr = IDxDiagContainerImpl_AddProp(pSubCont, szVersion, &v);
+    VariantClear(&v);
+    V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(szFinal_Retail_v);
+    hr = IDxDiagContainerImpl_AddProp(pSubCont, szAttributes, &v);
+    VariantClear(&v);
+    V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(szEnglish_v);
+    hr = IDxDiagContainerImpl_AddProp(pSubCont, szLanguageEnglish, &v);
+    VariantClear(&v);
+    V_VT(&v) = VT_UI4; V_UI4(&v) = pFileInfo->dwFileDateMS;
+    hr = IDxDiagContainerImpl_AddProp(pSubCont, dwFileTimeHigh, &v);
+    VariantClear(&v);
+    V_VT(&v) = VT_UI4; V_UI4(&v) = pFileInfo->dwFileDateLS;
+    hr = IDxDiagContainerImpl_AddProp(pSubCont, dwFileTimeLow, &v);
+    VariantClear(&v);
+    V_VT(&v) = VT_BOOL; V_BOOL(&v) = (0 != ((pFileInfo->dwFileFlags & pFileInfo->dwFileFlagsMask) & VS_FF_PRERELEASE));
+    hr = IDxDiagContainerImpl_AddProp(pSubCont, bBeta, &v);  
+    VariantClear(&v);
+    V_VT(&v) = VT_BOOL; V_BOOL(&v) = (0 != ((pFileInfo->dwFileFlags & pFileInfo->dwFileFlagsMask) & VS_FF_DEBUG));
+    hr = IDxDiagContainerImpl_AddProp(pSubCont, bDebug, &v);  
+    VariantClear(&v);
+  }
+
+  HeapFree(GetProcessHeap(), 0, pVersionInfo);
+
+  return hr;
+}
+
+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};
+  static const WCHAR szDirectXVersionLetter[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','e','t','t','e','r',0};
+  static const WCHAR szDirectXVersionLetter_v[] = {'c',0};
+  static const WCHAR bDebug[] = {'b','D','e','b','u','g',0};
+  static const WCHAR szDirectXVersionEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','E','n','g','l','i','s','h',0};
+  static const WCHAR szDirectXVersionEnglish_v[] = {'4','.','0','9','.','0','0','0','0','.','0','9','0','4',0};
+  static const WCHAR szDirectXVersionLongEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','o','n','g','E','n','g','l','i','s','h',0};
+  static const WCHAR szDirectXVersionLongEnglish_v[] = {'=',' ','"','D','i','r','e','c','t','X',' ','9','.','0','c',' ','(','4','.','0','9','.','0','0','0','0','.','0','9','0','4',')',0};
+  /*static const WCHAR szDxDiagVersion[] = {'s','z','D','x','D','i','a','g','V','e','r','s','i','o','n',0};*/
+  /*szWindowsDir*/
+  /*szWindowsDir*/
+  /*"dwOSMajorVersion"*/
+  /*"dwOSMinorVersion"*/
+  /*"dwOSBuildNumber"*/
+  /*"dwOSPlatformID"*/
+  VARIANT v;
+
+  V_VT(&v) = VT_UI4; V_UI4(&v) = 9;
+  hr = IDxDiagContainerImpl_AddProp(pSubCont, dwDirectXVersionMajor, &v);
+  VariantClear(&v);
+  V_VT(&v) = VT_UI4; V_UI4(&v) = 0;
+  hr = IDxDiagContainerImpl_AddProp(pSubCont, dwDirectXVersionMinor, &v);
+  VariantClear(&v);
+  V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(szDirectXVersionLetter_v);
+  hr = IDxDiagContainerImpl_AddProp(pSubCont, szDirectXVersionLetter, &v);
+  VariantClear(&v);
+  V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(szDirectXVersionEnglish_v);
+  hr = IDxDiagContainerImpl_AddProp(pSubCont, szDirectXVersionEnglish, &v);
+  VariantClear(&v);
+  V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(szDirectXVersionLongEnglish_v);
+  hr = IDxDiagContainerImpl_AddProp(pSubCont, szDirectXVersionLongEnglish, &v);
+  VariantClear(&v);
+  V_VT(&v) = VT_BOOL; V_BOOL(&v) = FALSE;
+  hr = IDxDiagContainerImpl_AddProp(pSubCont, bDebug, &v);
+  VariantClear(&v);
+
+  return hr;
+}
+
+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};
+  static const WCHAR szDeviceID[] = {'s','z','D','e','v','i','c','e','I','D',0};
+
+  static const WCHAR szDrivers[] = {'s','z','D','r','i','v','e','r','s',0};
+
+  VARIANT v;
+  IDxDiagContainer* pDeviceSubCont = NULL;
+  IDxDiagContainer* pDriversCont = NULL;
+
+  hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &pDeviceSubCont);
+  if (FAILED(hr)) { return hr; }
+  V_VT(pvarProp) = VT_BSTR; V_BSTR(pvarProp) = SysAllocString(property->psz);
+  hr = IDxDiagContainerImpl_AddProp(pDeviceSubCont, szDescription, &v);
+  VariantClear(&v);
+  V_VT(pvarProp) = VT_BSTR; V_BSTR(pvarProp) = SysAllocString(property->psz);
+  hr = IDxDiagContainerImpl_AddProp(pDeviceSubCont, szDeviceID, &v);
+  VariantClear(&v);
+
+  hr = IDxDiagContainerImpl_AddChildContainer(pSubCont, "", pDeviceSubCont);
+  */
+
+  /*
+   * Drivers Cont contains Files Desc Containers
+   */
+  /*
+  hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &pDriversCont);
+  if (FAILED(hr)) { return hr; }
+  hr = IDxDiagContainerImpl_AddChildContainer(pDeviceSubCont, szDrivers, pDriversCont);
+
+  */
+  return hr;
+}
+
+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};
+  static const WCHAR szFreeSpace[] = {'s','z','F','r','e','e','S','p','a','c','e',0};
+  static const WCHAR szMaxSpace[] = {'s','z','M','a','x','S','p','a','c','e',0};
+  static const WCHAR szFileSystem[] = {'s','z','F','i','l','e','S','y','s','t','e','m',0};
+  static const WCHAR szModel[] = {'s','z','M','o','d','e','l',0};
+  static const WCHAR szPNPDeviceID[] = {'s','z','P','N','P','D','e','v','i','c','e','I','D',0};
+  static const WCHAR dwHardDriveIndex[] = {'d','w','H','a','r','d','D','r','i','v','e','I','n','d','e','x',0};
+
+  static const WCHAR szDrivers[] = {'s','z','D','r','i','v','e','r','s',0};
+ 
+  VARIANT v;
+  IDxDiagContainer* pDiskSubCont = NULL;
+  IDxDiagContainer* pDriversCont = NULL;
+
+  hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &pDiskSubCont);
+  if (FAILED(hr)) { return hr; }
+  hr = IDxDiagContainerImpl_AddChildContainer(pSubCont, "" , pDiskSubCont);
+  */
+  
+  /*
+   * Drivers Cont contains Files Desc Containers
+   */
+  /*
+  hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &pDriversCont);
+  if (FAILED(hr)) { return hr; }
+  hr = IDxDiagContainerImpl_AddChildContainer(pDeviceSubCont, szDrivers, pDriversCont);
+  */
+  return hr;
+}
+HRESULT DXDiag_InitDXDiagDirectXFilesContainer(IDxDiagContainer* pSubCont) {
+  HRESULT hr = S_OK;
+  /**/
+  static const WCHAR ddraw_dll[] = {'d','d','r','a','w','.','d','l','l',0};
+  static const WCHAR dplayx_dll[] = {'d','p','l','a','y','x','.','d','l','l',0};
+  static const WCHAR dpnet_dll[] = {'d','p','n','e','t','.','d','l','l',0};
+  static const WCHAR dinput_dll[] = {'d','i','n','p','u','t','.','d','l','l',0};
+  static const WCHAR dinput8_dll[] = {'d','i','n','p','u','t','8','.','d','l','l',0};
+  static const WCHAR dsound_dll[] = {'d','s','o','u','n','d','.','d','l','l',0};
+  static const WCHAR dswave_dll[] = {'d','s','w','a','v','e','.','d','l','l',0};
[truncated at 1000 lines; 947 more skipped]