Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/170831

From BetaArchive Wiki

INFO: Proxy-Stubs for Custom Interfaces Must Include Mtxih.lib


The information in this article applies to:

  • Microsoft Transaction Server, versions 1.0, 2.0


Microsoft Transaction Server components must be accompanied by proxy-stub DLLs, which enable out-of-process calls. For OLE automation interfaces, Microsoft Transaction Server is able to use the Oleaut32.dll proxy-stub provided with the operating system. However, if you compile your own proxy-stub to be used instead of Oleaut32.dll, Microsoft Transaction Server requires that it link in functions from Mtxih.lib.

NOTE: For custom interfaces that cannot be marshaled using standard automation support, you must build the proxy-stub DLL with MIDL version 3.00.44 or later (provided with the Microsoft Platform SDK for Windows NT, version 4.0).

Calls to your Microsoft Transaction Server object through a custom interface will fail unless you perform the following steps:

  1. Add Mtxih.lib as the first library in the link line of the proxy-stub's mk file. Do not add the /NODEFAULTLIB switch to this line.

    NOTE: The Mtxih.lib library must be the first file that you link into your proxy-stub DLL. If the component has both a type library and a proxy-stub DLL, Microsoft Transaction Server will use the proxy-stub DLL.
  2. Add Ole32.lib and Advapi32.lib to the link line. (Other files may also be necessary, depending on the nature of your interface.)
  3. Add the /MD flag to the .c.obj line in the mk file.
  4. Be sure to use the -Oicf MIDL compiler option:

    midl /{Oi | Oic | Oif | Oicf} 

    where /Oif or /Oicf icf specifies the codeless proxy method of marshaling that includes all the features provided by /Oi and /Oic but uses a new interpreter ("fast format strings") that provides better performance than /Oi or /Oic.

    To set the -Oicf MIDL compiler option:

    1. Select Settings from the Project menu.
    2. Select the Stubless Proxies checkbox from the MIDL tab.
  5. Recompile the proxy-stub.
  6. Use Regsvr32 to register the proxy-stub DLL.


Microsoft Transaction Server allows you to create an instance of the custom interface component. However, the following problems may occur if you have not correctly linked Mtxih.lib with your custom interface's proxy-stub or if the proxy-stub is not correctly registered:

  • Calls to the component may fail.
  • Visual Basic clients may report error 800703e6 or 80010105.
  • In Microsoft Transaction Server Explorer, the component's icon may continue rotating even after all clients have released references to the component.
  • Microsoft Transaction Server may log an error in the Windows NT Server event log, stating that EventID 4133 occurred in the context wrapper, with the following accompanying message:

    Interface is not supported by Microsoft Transaction Server. It does not have either a type library or a proxy stub. The object that implements it does not support IDispatch::GetTypeInfo, ITypeLib, or ItypeInfo.

The following is an example of a correct mk file:

   atl9ps.dll: dlldata.obj atl9_p.obj atl9_i.obj
      link /dll /out:atl9ps.dll /def:atl9ps.def /entry:DllMain
   dlldata.obj atl9_p.obj atl9_i.obj mtxih.lib kernel32.lib rpcndr.lib
   rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib ole32.lib advapi32.lib

      cl /c /Ox /MD /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL

      @del atl9ps.dll
      @del atl9ps.lib
      @del atl9ps.exp
      @del dlldata.obj
      @del atl9_p.obj
      @del atl9_i.obj 


For more information, see the Web sites at:

Additional query words: mts

Keywords : kberrmsg kbMTS kbMTS100 kbMTS200 kbVC kbDSupport
Issue type : kbinfo
Technology :

Last Reviewed: October 19, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.