ServerHelpFile, ServerProject

These properties of the Project object let you set and query the name of the help file invoked for the COM servers in the project, and the first part of the name used to create the COM objects.

Usage

prjProject.ServerHelpFile = cHelpFileName
cHelpFileName = prjProject.ServerHelpFile
prjProject.ServerProject = cProjectName
cProjectName = prjProject.ServerProject

Parameter

Value

Meaning

cHelpFileName

Character

The path and filename of the help file invoked from an object or class browser when examining the COM object.

Empty string

There is no help file for the servers in this project. (Not a great idea, of course.)

cProjectName

Character

The first portion of the ProgID, the programmatic identifier that uniquely identifies the server.


If you are creating a set of COM objects to be used by others, or even if you want to remember what they do a few months down the line, you can add a reference to a help file to the COM object and its type library. When the type library is examined (in the Class Browser or other object browsers), the help file can be invoked to provide documentation for your classes. We were a little surprised to find that the help file is at the project level and not set up so each server could have its own. But, realistically, you're most likely to set up individual projects for each server you plan to distribute separately, since the project generates one EXE or DLL file.The ServerProject property determines the first half of the name you use when creating the server objects using CreateObject() or NewObject(). ServerProject is the object name up to the period. This name defaults to the name of your project, but if you'd prefer to have your developers invoking CreateObject("CoolThing.MyServer") rather than CreateObject("YetAnotherProject.MyServer"), you can change it programmatically with this property, or graphically in the Servers tab of the Project Info dialog.

Example

* This command returns the current help file for Project oProj:
? oProj.ServerHelpFile
* This command changes the server name in all ProgIDs
oProj.ServerProject = "MyTestServerProject"

See Also

Project, ProgID, Server


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .