# MTCreateAccount

This interface contains methods to create an account from an MPS point of view.

## Program ID

MetraPipeline.MTCreateAccount.1

## MTCreateAccount Methods

AddPresServerLogon | Adds a Presentation Server logon.
AddUser | Adds a user and retrieves the account ID.
DeletePresServerLogon | Removes a Presentation Server logon.
Initialize | Initializes the object.

## Example

Example to be provided in a future release of this online help system.

# Method Detail

## AddPresServerLogon

Adds a Presentation Server logon. The account is created based on the input parameters.

### Visual Basic Syntax

Sub AddPresServerLogon (
Logon as String,
Name_Space as String,
Password as String
Language as String,
AccountID as Long)

### C++ Syntax

HRESULT AddPresServerLogon (
[in] BSTR Logon,
[in] BSTR Name_Space,
[in] BSTR Password,
[in] BSTR Language,
[in] long AccountID);

### Arguments

Logon

The user name for the account

Name_Space

The namespace in which to create the account

Password

The initial password for the account

Language

The language associated with the account

AccountID

The unique ID to associate with the account; this is the internal ID used by the MetraTech platform

## AddUser

Adds a user and retrieves the account ID.

### Visual Basic Syntax

Function AddUser (
pCredentials as Object,
aLanguage as String,
TimezoneID as Long,
AccountStatus as Long,
pRowset as Object ) as Long

### C++ Syntax

HRESULT AddUser (
[in] LPDISPATCH pCredentials,
[in] BSTR aLanguage,
[in] long TimezoneID,
[in] long AccountStatus,
[in] LPDISPATCH pRowset,
[out,retval] long* AccountID);

### Arguments

pCredentials

Security credentials authorizing creation of the account

aLanguage

The language associated with the account

TimezoneID

The time zone associated with the user

AccountStatus

The account status enumerated value. The Enumspace is metratech.com/accountcreation and the type is AccountStatus.

PRowset

The rowset object used to maintain a transactional state.

### Return Value

A unique ID is created for the account; this is the internal ID used by the MetraTech platform.

## DeletePresServerLogon

Removes a Presentation Server logon.

### Visual Basic Syntax

Sub DeletePresServerLogon (
Logon as String,
Name_Space as String,
Password as String
Language as String,
AccountID as Long)

### C++ Syntax

HRESULT DeletePresServerLogon (
[in] BSTR Logon,
[in] BSTR Name_Space,
[in] BSTR Password,
[in] BSTR Language,
[in] long AccountID);

### Arguments

Logon

The user name for the account

Name_Space

The namespace in which to create the account

Password

The initial password for the account

Language

The language associated with the account

AccountID

The unique ID associated with the account to be removed

## Initialize

Initializes the object.

### Visual Basic Syntax

Sub Initialize()

### C++ Syntax

HRESULT Initialize();