summaryrefslogtreecommitdiff
path: root/src/debug/ildbsymlib/symbinder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug/ildbsymlib/symbinder.h')
-rw-r--r--src/debug/ildbsymlib/symbinder.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/debug/ildbsymlib/symbinder.h b/src/debug/ildbsymlib/symbinder.h
new file mode 100644
index 0000000000..a0dcf7d4c7
--- /dev/null
+++ b/src/debug/ildbsymlib/symbinder.h
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+// ===========================================================================
+// File: SymBinder.h
+//
+
+// ===========================================================================
+
+#ifndef SYMBINDER_H_
+#define SYMBINDER_H_
+
+/* ------------------------------------------------------------------------- *
+ * SymBinder class
+ * ------------------------------------------------------------------------- */
+
+class SymBinder : ISymUnmanagedBinder2
+{
+// ctor/dtor
+public:
+ SymBinder()
+ {
+ m_refCount = 0;
+ }
+
+ virtual ~SymBinder() {}
+
+ static HRESULT NewSymBinder( REFCLSID clsid, void** ppObj );
+
+// IUnknown methods
+public:
+
+ //-----------------------------------------------------------
+ // IUnknown support
+ //-----------------------------------------------------------
+ ULONG STDMETHODCALLTYPE AddRef()
+ {
+ return (InterlockedIncrement((LONG *) &m_refCount));
+ }
+
+ ULONG STDMETHODCALLTYPE Release()
+ {
+ LONG refCount = InterlockedDecrement((LONG *) &m_refCount);
+ if (refCount == 0)
+ DELETE(this);
+
+ return (refCount);
+ }
+ STDMETHOD(QueryInterface)(REFIID riid, void** ppvObject);
+
+ // ISymUnmanagedBinder
+public:
+
+ STDMETHOD(GetReaderForFile)( IUnknown *importer,
+ const WCHAR *fileName,
+ const WCHAR *searchPath,
+ ISymUnmanagedReader **pRetVal);
+ STDMETHOD(GetReaderFromStream)(IUnknown *importer,
+ IStream *pstream,
+ ISymUnmanagedReader **pRetVal);
+
+ // ISymUnmanagedBinder2
+ STDMETHOD(GetReaderForFile2)( IUnknown *importer,
+ const WCHAR *fileName,
+ const WCHAR *searchPath,
+ ULONG32 searchPolicy,
+ ISymUnmanagedReader **pRetVal);
+
+private:
+ SIZE_T m_refCount;
+
+};
+#endif