NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Appendix D- Differences between Internal and OleAut implementation of IDispatch

  1. Invoking a method with some required & some optional parameters but not giving any parameters
    • Compatible: "Invalid number of parameters." (0x8002000e),
    • Internal: "Not enough storage is available to complete this operation." (0x8007000e)
  2. The error being returned indicates that the typelib that OLEAUT uses to do the invoke call is invalid. The argument type of the method being invoked is invalid and this is what is causing the "Bad Variable Type" to be returned. Since the custom implementation is not driven by a typelib the error code being returned is different.
    • Compatible: "Bad Variable Type"
    • Internal: "Catastrophic failure”
  3. When a COM client passes a VT_* | VT_BYREF but sets the member to NULL,
    • Compatible: Returns E_POINTER: "A null reference pointer was passed to the stub."
    • Internal: Returns DISP_E_EXCEPTION: "Exception occurred.”
  4. When a COM client passes a variant of type VT_ERROR to a method taking integer arguments
    • Compatible: fails with DISP_E_TYPEMISMATCH
    • Internal: Succeeds
  5. Late-bound COM clients can invoke managed methods with int or uint parameters passing VT_I4 or VT_INT and VT_UI4 or VT_UINT if the server is using the Internal implementation. If the server is using the Compatible implementation, the client can only use VT_I4 and VT_UI4. VT_INT and VT_UINT will fail with a type mismatch. (HRESULT 0x80020005)
  6. The internal implementation of IDispatch requires that named arguments appear after positional arguments. The named arguments can appear in any order must follow a method position arguments.