[MSCOREE] Fix build.
[reactos.git] / dll / win32 / mscoree / cordebug.c
index be6091f..0a06a94 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-
-//#include "winuser.h"
-//#include "winnls.h"
-//#include "winreg.h"
-#include <ole2.h>
-//#include "shellapi.h"
-//#include "mscoree.h"
-#include <corhdr.h>
-#include <metahost.h>
-#include <cordebug.h>
-#include <wine/list.h>
 #include "mscoree_private.h"
-#include <wine/debug.h>
-
-
-WINE_DEFAULT_DEBUG_CHANNEL( mscoree );
 
 typedef struct DebugProcess
 {
@@ -92,7 +67,7 @@ static HRESULT WINAPI cordebugprocess_QueryInterface(ICorDebugProcess *iface,
         return E_NOINTERFACE;
     }
 
-    ICorDebug_AddRef(iface);
+    ICorDebugProcess_AddRef(iface);
 
     return S_OK;
 }
@@ -438,7 +413,7 @@ static HRESULT CorDebugProcess_Create(CorDebug *cordebug, IUnknown** ppUnk, LPPR
     if(This->cordebug)
         ICorDebug_AddRef(&This->cordebug->ICorDebug_iface);
 
-    *ppUnk = (IUnknown*)This;
+    *ppUnk = (IUnknown*)&This->ICorDebugProcess_iface;
 
     return S_OK;
 }
@@ -462,7 +437,7 @@ static HRESULT WINAPI process_enum_QueryInterface(ICorDebugProcessEnum *iface, R
         return E_NOINTERFACE;
     }
 
-    ICorDebug_AddRef(iface);
+    ICorDebugProcessEnum_AddRef(iface);
 
     return S_OK;
 }
@@ -784,7 +759,7 @@ HRESULT CorDebug_Create(ICLRRuntimeHost *runtimehost, IUnknown** ppUnk)
     if(This->runtimehost)
         ICLRRuntimeHost_AddRef(This->runtimehost);
 
-    *ppUnk = (IUnknown*)This;
+    *ppUnk = (IUnknown*)&This->ICorDebug_iface;
 
     return S_OK;
 }