How To Manually Register a Custom OLE Server

Last reviewed: January 10, 1997
Article ID: Q156547
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows 5.0

SUMMARY

This article describes how you can manually register an OLE server on a computer that has never had Visual FoxPro 5.0 installed.

This article also assumes you already know how to create a custom OLE server. You can read Chapter 16 of the Visual FoxPro Developer's Guide, "Registering a Custom OLE Server," for more information.

MORE INFORMATION

In order to register an .exe or a .dll custom OLE server, you need to have the following two files located in the \System directory for Windows 95 or the \System32 directory for Windows NT on the machine you are installing to.

   VFP500.DLL
   VFP5ENU.DLL

If you do not have these files, you can obtain them from the machine on which you have Visual FoxPro 5.0 installed.

When you build a custom OLE server, the following three files are created:

  • The .dll or .exe file
  • A type library .tlb file (The .TLB file is optional and is not required to be distributed)
  • A registry .vbr file

Here is an example that shows you how to register an .exe file:

When trying to register an .exe file, you must have the .exe and the .vbr files. The example below assumes you already have a custom OLE server built and named Oleserver.exe:

  • Oleserver.exe (This is the custom OLE server .exe file that you built
                     from your project.)
    
  • Oleserver.vbr (This file gets automatically created when you build your
                     custom OLE server.)
    
    
Once you copy these two files into the target machine, from the directory that contains these two files, type the command below at the MS-DOS prompt.

   OLEServer /regserver

Your .exe file should now be registered.

Here is an example that shows you how to register a .dll file:

When trying to register a .dll file you must have the .dll and .vbr files and have access to a third file, Regsvr32.exe. The example below assumes you already have a custom OLE server built and named Oleserver.dll:

  • OLEServer.DLL (This is the custom OLE server .dll file you built from
                     your project.)
    
  • OLEServer.VBR (This file gets automatically created when you build your
                     project.)
    
  • Regsvr32.exe (This file comes with Visual FoxPro 5.0 and a number of
                     other Microsoft applications.)
    
    
Once you copy these two files (.dll and .vbr) into the target machine, from the directory that contains these two files, type the command below at the MS-DOS prompt

   REGSVR32 OLEServer.DLL

You should get a message box that says "DllRegisterServer in OLEServer.dll succeeded." Your .dll file is now registered.

If you do not have Regsvr32.exe in you target machine, you can obtain this file from Visual FoxPro 5.0 directory

NOTE: Manually registering these files is necessary only if you are not using the Visual FoxPro Setup Wizard to install your custom OLE server.


KBCategory: kbinterop kb3rdparty kbhowto
KBSubcategory: FxinteropOle
Additional reference words: 5.00 kbdse VFoxWin



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: January 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.