Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

COMTI Type Library Files with Native Decimal Data Type Are Not Supported in Visual Basic Version 6


View products that this article applies to.

This article was previously published under Q328965

↑ Back to the top


Symptoms

After you upgrade to Host Integration Server 2000 SP1, performing any of the following actions causes all Decimal data type parameters to be written to a COM Transaction Integrator (COMTI) type library file (.tlb) as native Decimal data types:
  • Modifying an existing COMTI type library (.tlb)
  • Creating a new COMTI type library (.tlb)
When using a COMTI .tlb file that contains native Decimal data types in Visual Basic 6, you receive the following error message:
Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic
In Host Integration Server 2000 prior to SP1, the Decimal data type parameters were written to the COMTI .tlb file as Variant data types.

↑ Back to the top


Cause

Changes that were made in SP1 result in the Decimal data type parameters being written differently to the .tlb file. These changes were made to improve compatability with Visual Studio .NET.

These changes cause a problem because Visual Basic 6 does not support native Decimal data types. Therefore, when using early binding, the .tlb files cannot be used with Visual Basic 6.

↑ Back to the top


Resolution

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft Host Integration Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
328152� How to obtain the latest service pack for Host Integration Server 2000

Hotfix information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date                Time    Version      Size         File name
   -------------------------------------------------------------
   04-Dec-2002  12:36  5.0.0.900    123,152  Tadtlb.dll 
   04-Dec-2002  12:37  5.0.0.870    950,272  Componentbuilder.exe 
   30-Oct-2002  22:03                     836,175  Comticb.chm 
   30-Oct-2002  22:07                     829,582  Resnapin.chm

				

Note: Because of file dependencies, the most recent fix that contains the preceding files may also contain additional files.

↑ Back to the top


Workaround

To work around this problem, use late binding in Visual Basic 6.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

This problem was corrected in Microsoft Host Integration Server 2000 Service Pack 2.

↑ Back to the top


More information

After you install the fix, you can access a new option that is available on the Interface Properties page in the COMTI Component Builder:
  • Right-click the name of the interface, and then click Properties. Notice the Support old style VB Decimal Data types check box.
  • COMTI Component Builder will create the resulting COMTI .tlb file using the data type that you select as follows:
    • When the check box is selected, using Variant data types as it did before SP1.
    • When the check box is cleared, using the native Decimal data type.
After the fix is installed, COMTI component builder can also detect whether existing COMTI .tlb files are using Variant data types or native Decimal data types, and will select or clear the check box accordingly. You can manually change this whenever you want on the Interface Properties page.

Note: The default for all new COMTI .tlb files is to use native Decimal data types.

↑ Back to the top


Keywords: KB328965, kbhotfixserver, kbqfe, kbfix, kbbug

↑ Back to the top

Article Info
Article ID : 328965
Revision : 5
Created on : 9/27/2005
Published on : 9/27/2005
Exists online : False
Views : 402