Microsoft KB Archive/303942

= Variant That Contains SAFEARRAY Is Not Marshaled Correctly =

Article ID: 303942

Article Last Modified on 6/5/2003

-

APPLIES TO


 * Microsoft COM+ 1.0, when used with:
 * Microsoft Windows 2000 Service Pack 2

-



This article was previously published under Q303942



SYMPTOMS
In COM+ applications, when you marshal back an [in,out](VB ByRef) or [out] Variant parameter that contains a SAFEARRAY from the server COM+ component, the SAFEARRAY pointer becomes NULL. When you try to access this variant in Microsoft Visual Basic code, you receive a &quot;subscript out of range&quot; error.

This problem occurs after you install Windows 2000 Service Pack 2 (SP2) and does not occur in Windows 2000 SP1. In addition, this problem does not occur if the component is not part of a COM+ application.



RESOLUTION
To resolve this problem, obtain Microsoft COM+ Rollup Hotfix 15. For additional information, please see the following article in the Microsoft Knowledge Base:

306417 INFO: Availability of Windows 2000 Post-Service Pack 2 COM+ Hotfix Rollup Package 15

To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

260910 How to Obtain the Latest Windows 2000 Service Pack



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows 2000 Service Pack 3.



MORE INFORMATION
For additional information about how to obtain a hotfix for Windows 2000 Datacenter Server, click the article number below to view the article in the Microsoft Knowledge Base:

265173 Datacenter Program and Windows 2000 Datacenter Server Product

For additional information on how to install multiple hotfixes with only one reboot, click the article number below to view the article in the Microsoft Knowledge Base:

296861 Use QChain.exe to Install Multiple Hotfixes with One Reboot

For additional information about how to install Windows 2000 and Windows 2000 hotfixes at the same time, click the article number below to view the article in the Microsoft Knowledge Base:

249149 Installing Microsoft Windows 2000 and Windows 2000 Hotfixes

Additional query words: kbIISCom kbWin2000preSP3COMRollup15Fix

Keywords: kbbug kbfix kbwin2000presp3fix kbwin2000sp3fix KB303942

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.