Share via


Add Method of the IFPCVendorParametersSets Interface

The Add method creates a new FPCVendorParametersSet object in the collection and returns a reference to it.

C++

Syntax

HRESULT Add(
  [in]            BSTR Id,
  [in, optional]  VARIANT_BOOL Encrypted,
  [in, optional]  VARIANT_BOOL EncryptionReadable,
  [out]           IFPCVendorParametersSet** ppNewSet
);

Parameters

  • Id
    Required. The string-formatted globally unique identifier (GUID) of the new vendor parameters set.

  • Encrypted
    A Boolean value that indicates whether data saved in the new FPCVendorParametersSet object will be encrypted. The default value is VARIANT_FALSE.

  • EncryptionReadable
    When this Boolean value is set to VARIANT_TRUE, encrypted data saved in the new FPCVendorParametersSet object can be read by any user account. When it is set to VARIANT_FALSE, encrypted data can be read only by the Local Service account and the Network Service account. The default value is VARIANT_FALSE.

  • ppNewSet
    Address of an interface pointer that on return points to the new IFPCVendorParametersSet interface created.

Return Value

The method can return one of the following:

  • S_OK, indicating that the operation succeeded.
  • An error code, indicating that the operation failed. In this case, the [out] parameter returned is a null object.

Visual Basic

Syntax

Function Add( _
  ByVal Id As String, _
  [ ByVal Encrypted As Boolean ], _
  [ ByVal EncryptionReadable As Boolean ] _
) As FPCVendorParametersSet

Parameters

  • Id
    Required. The string-formatted globally unique identifier (GUID) of the new vendor parameters set.

  • Encrypted
    A Boolean value that indicates whether data saved in the new FPCVendorParametersSet object will be encrypted. The default value is False.

  • EncryptionReadable
    When this Boolean value is set to True, encrypted data saved in the new FPCVendorParametersSet object can be read by any user account. When it is set to False, encrypted data can be read only by the Local Service account and the Network Service account in Windows Server 2008. The default value is False.

Return Value

The method returns a reference to the FPCVendorParametersSet object added if the call is successful. Otherwise, an error is raised that can be intercepted by using an error handler.

Remarks

The GUID supplied is formatted as a string in the form {12345678-1234-1234-1234-123456789abc}. Note the presence of the braces normally used with GUIDs.

If an FPCVendorParametersSet object is added with the Encrypted parameter set to TRUE (VARIANT_TRUE in C++) and the EncryptionReadable parameter set to FALSE (VARIANT_FALSE), only calls made under the Local Service account or the Network Service account in Windows Server 2008 will be able to read the data stored in the object.

Note  When a user that has permission to access storage, but not to read the encrypted data, requests an FPCVendorParametersSet object that was created with these parameter settings, an empty FPCVendorParametersSet object is returned. Then, if that user makes changes to the object and saves it to persistent storage, the original FPCVendorParametersSet object will be overwritten, and only the data added by that user will be saved.

Requirements

Client Requires Windows 7 or Windows Vista.
Server Requires Windows Server 2008 R2 or Windows Server 2008 x64 Edition with SP2.
Version Requires Forefront Threat Management Gateway (TMG) 2010.
IDL

Declared in Msfpccom.idl.

DLL

Requires Msfpccom.dll.

See Also

FPCVendorParametersSets

Send comments about this topic to Microsoft

Build date: 6/30/2010