IGPMMigrationTable::AddEntry method

Creates an entry in the migration table. The method updates an existing entry.

Syntax


HRESULT AddEntry(
  [in]           BSTR bstrSource,
  [in]            gpmEntryType,
  [in, optional] VARIANT *pvarDestination,
  [in, optional]  *destination,
  [out]          IGPMMapEntry **ppEntry
);

Parameters

bstrSource [in]

Source field of the entry. This parameter cannot be null.

gpmEntryType [in]

This parameter must be one of the following values.

typeUser

This value equals 0 (zero). Creates a User entry in the migration table.

typeComputer

Creates a entry for a User.

typeLocalGroup

Creates an entry for a LocalGroup.

typeGlobalGroup

Creates an entry for a GlobalGroup.

typeUniversalGroup

Creates an entry for a UniversalGroup.

typeUNCPath

Creates an entry for a UNCPath.

typeUnknown

Creates an entry for an unknown.

pvarDestination [in, optional]

A pointer to a VARIANT structure. You can use the DestinationOptions: opDestinationSameAsSource, opDestinationNone, or opDestinationByRelativeName by passing in a pvarDestination with a vt member of VT_I4. To explicitly pass in the destination, pass in a pvarDestination with a vt member of VT_BSTR, and this sets the DestinationOptions to opDestinationSet. If you pass in null, AddEntry uses the default value for the destination option, opDestinationSameAsSource.

destination [in, optional]

This parameter specifies the destination as a string or as a destination option. Passing a string for the destination implicitly sets the entry's DestinationOptionSet equal to the DestinationOptionSet property of the GPMConstants object. The destination can also be specified by passing the DestinationSameAsSource, DestinationNone, or DestinationByRelativeName properties of the GPMConstants object.

ppEntry [out]

The new entry.

Return value

C++

Returns S_OK if successful. Returns a failure code if an error occurs.

JScript

Returns a reference to a GPMMapEntry object.

VB

Returns a reference to a GPMMapEntry object.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Gpmgmt.h

IDL

Gpmgmt.idl

DLL

Gpmgmt.dll

IID

IID_IGPMMigrationTable is defined as 48F823B1-EFAF-470B-B6ED-40D14EE1A4EC

See also

IGPMMigrationTable
IGPMMigrationTable

 

 

Show: