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

Last reviewed: October 10, 1997
Article ID: Q170831
The information in this article applies to:
  • Microsoft Transaction Server, version 1.0

SUMMARY

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.

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.

  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. Recompile the proxy-stub.

  5. Use Regsvr32 to register the proxy-stub DLL.

MORE INFORMATION

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

   .c.obj:
      cl /c /Ox /MD /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL
   $<

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

REFERENCES

For more information, see the Web sites at:


Additional query words: mts
Keywords : kbprg kbusage TSrvGen TSrvProg
Version : 1.0
Platform : WINDOWS
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.