ProgID

The Programmatic Identifier (known as ProgID) is the string you pass to CreateObject() or NewObject() to create a COM object. This property tells you what string to use for a particular COM object you're creating. The property is read-only.

Usage

cMyServername = oServer.ProgID
When you create a COM server as part of a VFP Project, the server's name is created in the form "Project.ClassName," where Project is the name of your project and ClassName is the name of the visual class or program that defines the server class. To create an instance of your object, pass this name to CreateObject(). The ProgID displays the name to pass.You cannot change this name directly. You can change the first half by modifying the server name using the Project's ServerProject property, and the second half by renaming the class library or program that defines the object.

Example

* Ted's project for testing SYS(2335) was called SYS2335
* His test class was a program named Fred.PRG
? oProject.Servers[1].ProgID          && "SYS2335.fred"
oDear = CREATEOBJECT("SYS2335.Fred")  && creates the object

See Also

CreateObject(), NewObject(), Project, Server, ServerProject


Back to Table of Contents

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