summaryrefslogtreecommitdiffstats
path: root/ComLightLib/server/freeThreadedMarshaller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ComLightLib/server/freeThreadedMarshaller.cpp')
-rw-r--r--ComLightLib/server/freeThreadedMarshaller.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/ComLightLib/server/freeThreadedMarshaller.cpp b/ComLightLib/server/freeThreadedMarshaller.cpp
new file mode 100644
index 0000000..fc1ea80
--- /dev/null
+++ b/ComLightLib/server/freeThreadedMarshaller.cpp
@@ -0,0 +1,17 @@
+#include "freeThreadedMarshaller.h"
+#ifdef _MSC_VER
+#include <combaseapi.h>
+
+HRESULT ComLight::details::createFreeThreadedMarshaller( IUnknown* pUnkOuter, IUnknown** ppUnkMarshal )
+{
+ return ::CoCreateFreeThreadedMarshaler( (LPUNKNOWN)pUnkOuter, (LPUNKNOWN *)ppUnkMarshal );
+}
+
+bool ComLight::details::queryMarshallerInterface( REFIID riid, void **ppvObject, IUnknown* marshaller )
+{
+ if( riid != IID_IMarshal || nullptr == marshaller )
+ return false;
+ const HRESULT hr = marshaller->QueryInterface( IID_IMarshal, ppvObject );
+ return SUCCEEDED( hr ) ? true : false;
+}
+#endif \ No newline at end of file