diff options
| author | Konstantin <const@const.me> | 2023-01-16 14:52:43 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-01-16 14:52:43 +0100 |
| commit | 8c4603c73675958efc960fbd4bb599a2909d106a (patch) | |
| tree | 714dc6fc9a1672d5fd7f89676b97e10959662abc /ComLightLib/server/freeThreadedMarshaller.cpp | |
| parent | 990a8d0dbaefc996244097397259e92758b15cce (diff) | |
Source codes
Diffstat (limited to 'ComLightLib/server/freeThreadedMarshaller.cpp')
| -rw-r--r-- | ComLightLib/server/freeThreadedMarshaller.cpp | 17 |
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 |
