Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

GenerateRegFile function – PB Docs 70 – PowerBuilder Library

GenerateRegFile function – PB Docs 70

GenerateRegFile function



Description

Creates a file with registry update instructions for deploying
a PowerBuilder object as an automation server.

Controls

PowerBuilder.Application (automation server)

Syntax

Argument Description
automationobject When PowerBuilder is the OLE client, the
name of the OLEObject instantiated with the PowerBuilder.Application automation
server. For other clients, use syntax appropriate for calling a
function belonging to an automation object
guid A string whose value is the globally
unique identifier (GUID) that you want to use for the object. You
can specify a GUID that you:

  • Generated with a call
    to GenerateGUID
  • Generated earlier and are reusing (because this
    object replaces an earlier version)
  • Received from Microsoft
classname A string whose value is the name of the
class user object that will be the automation server. The object
must be in one of the libraries specified in the LibraryList property
progid A string whose value is the programmatic
identifier that people will use to connect to your server
majorversion An integer whose value you want to use
for the major version number of your server object
minorversion An integer whose value you want to use
for the minor version number of your server object
description A string whose value is a description
of your server object. The description will be displayed in the
Registry Editor and other OLE browsers
outputfilename A string whose value is the name of the
file the GenerateRegFile will create. The default filename extension recognized
by the registry is .REG

Return Values

Long. Returns a status code indicating whether an error occurred.
Values are:

  • 0 The registry update file was generated successfully
  • -1 Memory allocation error
  • -2 No output filename was provided
  • -3 Unable to open the output file
  • -9 Unknown error

Usage

Before you call GenerateRegFile, you must start a PowerBuilder.Application session
and set the LibraryList and MachineCode properties to the value
that the server object will use. You also need a GUID to serve as
the object’s class identifier (CLSID). For information
about the format of a GUID, see the GenerateGUID function.

After you create a registry update file, you can also generate
a type library file for the object, which provides browsing information
for your server object. See the GenerateTypeLib function.

The default extension for a registry update file is REG. You
can install the object in the registry by double-clicking on the
update file. Information is installed in the registry about the
object, including the location of its DLL and the location of its
type library file, if any. For how to use a PowerBuilder tool to register
objects, see “Registering the object”.

Examples

This example calls GenerateRegFile. (Don’t
use this GUID in your own applications!)

This example establishes a PowerBuilder.Application server session
and sets all the values necessary for generating a registry update
file.

See Also

  • GenerateGUID
  • GenerateTypeLib

Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x