PRB: VB4 16-Bit Clients Cannot Early-Bind to VB5 .EXE Servers (175488)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 4.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 4.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q175488 SYMPTOMS
If you have a Visual Basic 4.0 16-bit client that early-binds to a Visual
Basic 4.0 32-bit server and you replace the Visual Basic 4.0 32-bit server
with a binary-compatible Visual Basic 5.0 or 6.0 32-bit server, you receive
the following message when you try to run the client:
"Run-time error '-2147319784 (80028018)' OLE Automation error"
CAUSE
A Visual Basic 4.0 16-bit client can make use of the services of a Visual
Basic 4.0 32-bit local server (EXE OLE Server) with both early- and late-
binding. However, a Visual Basic 4.0 16-bit client can only late-bind to a
Visual Basic 5.0 or 6.0 32-bit server (ActiveX EXE).
The type library of the Visual Basic 5.0 or 6.0 32-bit server does not
appear in the references list of the Visual Basic 4.0 16-bit design
environment.
This also applies if you are upgrading a Visual Basic 4.0 32-bit local
server to a Visual Basic 5.0 or 6.0 ActiveX EXE and your server is going to
be used by a Visual Basic 4.0 16-bit client. You will have to use late-
binding in the Visual Basic 4.0 16-bit application. This is true even if
you simply recompile the project in Visual Basic 5.0 or 6.0 and set the
component to be binary compatible to the existing Visual Basic 4.0 32-bit
component.
RESOLUTION
Use late binding with CreateObject as shown below.
Modification Type: | Minor | Last Reviewed: | 7/15/2004 |
---|
Keywords: | kberrmsg kbprb KB175488 |
---|
|