KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q239849: Type Mismatch Error Occurs When UDT Is a COMTI Return Value

Article: Q239849
Product(s): Microsoft SNA Server
Version(s): WINDOWS:4.0 SP2
Operating System(s): 
Keyword(s): kbsna400sp2
Last Modified: 05-APR-2000

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft COM Transaction Integrator for CICS and IMS, version 4.0 SP2 
- Microsoft SNA Server, version 4.0 SP2 
-------------------------------------------------------------------------------

SYMPTOMS
========

A Visual Basic client invokes a method of a COM Transaction Integrator for CICS
and IMS (COMTI) component library, which declares a user-defined type (UDT) as a
return value for the method. Visual Basic responds with a "type mismatch" error
and the code does not compile. This only happens when the COMTI component is
early bound. The UDT is defined in the Visual Basic code by referencing its
declaration in the component library. Under the same circumstances, if late
binding is used, the code compiles and executes correctly. In this case, the
compiler has no knowledge of the component and a type mismatch can not occur.

CAUSE
=====

The COMTI Component Builder (CB) declares the return value as a UDT pointer. The
Visual Basic statement that invokes the COMTI method specifies the return value
as a UDT, which is why there is a type mismatch.


WORKAROUND
==========

To work around this issue, make the UDT an [output] parameter instead of a
return value, or use late binding.

STATUS
======

Microsoft has confirmed this to be a problem in Microsoft SNA Server version
4.0, SP2.


Additional query words:

======================================================================
Keywords          : kbsna400sp2 
Technology        : kbAudDeveloper kbSNAServSearch kbCOMTISearch kbCOMTI400SP2 kbSNAServ400SP2
Version           : WINDOWS:4.0 SP2
Issue type        : kbbug
Solution Type     : kbnofix

=============================================================================

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.

Copyright Microsoft Corporation 1986-2002.