BUG: You receive an error message when you use an Enum parameter in an ActiveX control method that you create in Visual Basic 6.0 (832676)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
SYMPTOMSWhen you use an Enum parameter in a Microsoft
ActiveX control method that you create in Microsoft Visual Basic 6.0, you may receive the following error message if you run the application in the IDE: Run-time error '-2147417848 (80010108)': Method
'GetUpdateInfo' of object '_UserControl1' failed You may receive the following error message if you run the
application from a MS-DOS command prompt: Run-time
error '-2147417848 (80010108)': Automation error The object invoked has
disconnected from its clients. RESOLUTIONTo resolve this problem, put the Enum parameter last in the parameter list, as follows: - In the UserControl1.ctl file, replace the following code
Public Sub GetUpdateInfo(ByVal
UType As UpdateType, ByRef
UpdateFiles() As UpdateInfo,
ByRef uIndex As Integer)
End Sub
with:Public Sub GetUpdateInfo(ByRef
UpdateFiles() As UpdateInfo,
ByRef uIndex As Integer, ByVal
UType As UpdateType)
End Sub
- In the UserControl1.ctl file, replace the following code
UserControl11.GetUpdateInfo
UpdateType.utHRDat, uf, uindex
with:
UserControl11.GetUpdateInfo
uf, uindex, UpdateType.utHRDat
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
REFERENCESFor more information, visit the following Microsoft
Web site:
Modification Type: | Major | Last Reviewed: | 3/12/2004 |
---|
Keywords: | kbConsole kbControl kbbug KB832676 kbAudDeveloper |
---|
|