Microsoft KB Archive/328965

From BetaArchive Wiki

Article ID: 328965

Article Last Modified on 9/27/2005



APPLIES TO

  • Microsoft Host Integration Server 2000 Service Pack 1



This article was previously published under Q328965

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.

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.

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.


WORKAROUND

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

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.

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.


Additional query words: wchar_t

Keywords: kbbug kbfix kbqfe kbhotfixserver KB328965