Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Visual Basic Reference

Visual Studio 6.0

SetAutoServerSettings Method

See Also    Example    Applies To

Sets the Remote Automation registry values to meet ActiveX and Remote Automation requirements, including configuration settings for remote server access.

Syntax

object. SetAutoServerSettings(remote, [progid], [clsid], [servername], [protocol], [authentication])

The SetAutoServerSettings method syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
remote Required. Boolean. True if the server is remote, False if local.
progid Optional. A variant expression specifying the ProgID for the server.
clsid Optional. A variant expression specifying the CLSID for the server.
servername Optional. A variant expression specifying the name of the server machine.
protocol Optional. A variant expression specifying the RPC name of the protocol to be used.
authentication Optional. A variant expression specifying the RPC authentication level.

Return Values

The SetAutoServerSettings method returns the following error codes:

Value Description
0 No error.
1 Unknown run time error occurred.
2 No protocol was specified.
3 No server machine name was specified.
4 An error occurred reading from the registry.
5 An error occurred writing to the registry.
6 Both the ProgID and CLSID parameters were missing.
7 There is no local server (either in-process or cross-process, 16-bit or 32-bit).
8 There was an error looking for the Proxy DLLs, check that they were installed properly.

Remarks

The SetAutoServerSettings method takes either a CLSID or a ProgID and sets the registry information to local or remote depending on the value of the remote parameter. If both a CLSID and a ProgID are passed to the method, the CLSID takes precedence.

Show:
© 2015 Microsoft