IErrorInfo object is getting cleared in the client process before the client thread retrieves it.

IErrorInfo is an OLE DB interface. It is defined in automation and returns the error message, component name and GUID of the interface where the error occurred. The link http://msdn.microsoft.com/en-us/library/windows/desktop/ms723041(v=vs.85).aspx describes its use, when to call and the methods on this interface. You might sometimes face an issue where an IErrorInfo object gets cleared on a…

0

COM: Cannot register a COM DLL using ATL::CComModule::RegisterServer()

Issue: Cannot register a COM DLL using ATL::CComModule::RegisterServer() If you are using a COM DLL or building one that uses ATL’s CComModule::RegisterServer() and building the code in Visual Studio 2013, you are mostly failing to register it. Say if you are using RegSvr32.exe to register your DLL, the call stack might show you the following…

0

Hang while Marshaling between COM components

I got to debug a COM threading issue where we see that when we are communicating between an application (say an MFC application) and a class library (developed using C# and implementing a COM component) the messages between the C++ thread and the C# thread are not being marshaled. The thread that actually makes the…


CommunicationState Enumeration

Communication state defines the states in which a communication-oriented object can exist. These states are defined as enumerations in the System.ServiceModel.dll.   http://msdn.microsoft.com/en-us/library/system.servicemodel.communicationstate(v=vs.110).aspx defines the various names in the enumeration however we do not get to see the enumeration values. As the above link explains there are four main states that a communication-oriented object can…


_bstr_t objects

A _bstr_t object encapsulates the BSTR data type. The class manages resource allocation and de-allocation through function calls to SysAllocString and SysFreeString. It isn’t necessary to de-allocate or free a string by calling SysFreeString that has been allocated by _bstr_t. Doing this might lead to double free of the allocated string when the  _bstr_t class…


How to get JavaScript working using Callback with COM

Imagine you have a scenario wherein you want your COM Server to be called within JavaScript which invokes an Async method. Upon completion of the Async method you would like to notify the JS using callback function that the task has been completed. Doing the Async work is simple but the callback to notify the…

0

WCF: Callback operations are invoked sequentially ?

Scenario: Client application invokes a Duplex WCF service, and WCF service can invoke multiple callbacks at a time. Problem: You notice that the callback operations are executed sequentially even though they are marked as one way operations. Cause: Callback operations are handled on a separate worker thread at client application. By default, the concurrency mode…

1

WCF: INTEROP SCENERIOS

WCF: INTEROP                 Pushpa Yadav (Microsoft India GTSC) =================================================================================================================   SCENERIO 2: WCF Client talking to some third party web service with message security.   ERROR: The security header element ‘Timestamp’ with the ‘Timestamp-b82acb5a-c863-428d-a8c9-0928ae3fe651’ id must be signed.    STACK: <ExceptionType>System.ServiceModel.Security.MessageSecurityException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType> <Message>The security header element ‘Timestamp’ with the…

0

WCF: Observing Message ProtectionOrder

WCF: Observing Message ProtectionOrder    Objective 1: Impact of Protection Order   Objective 2: How to observe/confirm that my request is signed and encrypted from WCF traces.   Objective 3: Utilize the knowledge of reading WCF traces and apply the same for troubleshooting the INTEROPE scenarios.      Understanding: http://msdn.microsoft.com/en-us/library/system.servicemodel.security.messageprotectionorder.aspx     Scope: Via Protection…

1