Limitations of VB 3.0 as a Client When Calling a VB 4.0 Server

Last reviewed: October 30, 1995
Article ID: Q138139
The information in this article applies to:
  • Professional and Enterprise Editions of Microsoft Visual Basic 32-bit only, for Windows, version 4.0
  • Standard and Professional Editions of Microsoft Visual Basic, for Windows, version 3.0

SUMMARY

It is possible to call an OLE server created in Visual Basic version 4.0 (both 16-bit as well as 32-bit Servers) from a Visual Basic version 3.0 client application. Note, however, that a 16-bit application cannot call a 32-bit DLL server. Therefore, if the 32-bit server is an OLE DLL server, it cannot be called. If the 32-bit server is an OLE EXE server, it can be called from a 16-bit client application.

This functionality is possible because OLE is binary compatible, which is one of the main benefits of OLE. However, there are certain limitations that must be kept in mind simply because these are features not supported in Visual Basic version 3.0.

MORE INFORMATION

The Limitations

  1. It is not possible to use early binding while creating object instances. This is because Visual Basic version 3.0 only supports late binding. In other words, the only way to create an object of type MyClass implemented by a server called MyServer is:

    Dim obj As Object Set Obj = CreateObject("MyServer.MyClass")

  2. You cannot call in-process OLE Servers (that is, Visual Basic version 4.0 OLE DLLs) from Visual Basic version 3.0. This is because you can only create 32-bit OLE DLLs in Visual Basic version 4.0.

  3. You cannot return an array data type to Visual Basic version 3.0 from a Visual Basic version 4.0 OLE server because this is not supported in Visual Basic version 3.0.

  4. Visual Basic version 3.0 does not support rich Error information like that provided by Visual Basic version 4.0's Error Object. So, if the server raises an error, only a default error message is returned back to the Visual Basic version 3.0 client. One way to work around this is to implement your own error object in the server, and have the Visual Basic version 3.0 client call that object in the error handler for the default error message.


Additional reference words: 4.00 inproc inprocess vb4win vb432
KBCategory: kbole
KBSubcategory: IAPOLE


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 30, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.