Rediger

Del via


IScanProfileMgr::CreateProfile method

Creates an empty scan profile and associates it with a scanner or other Windows Image Acquisition (WIA) 2.0 item.

Syntax

HRESULT CreateProfile(
  [in]  BSTR         bstrDeviceID,
  [in]  BSTR         bstrName,
  [in]  GUID         guidCategory,
  [out] IScanProfile **ppScanProfile
);

Parameters

bstrDeviceID [in]

Type: BSTR

The ID of the device or WIA 2.0 item.

bstrName [in]

Type: BSTR

The friendly name of the new profile.

guidCategory [in]

Type: GUID

The GUID of the category of the device or WIA 2.0 item. This must be one of the WIA_IPA_ITEM_CATEGORY constants.

ppScanProfile [out]

Type: IScanProfile**

The address of a pointer to the new profile.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

IScanProfileMgr::CreateProfile associates the specified device with the new scan profile.

IScanProfileMgr::CreateProfile automatically generates a GUID for the new profile. Get the GUID with GetGUID.

Use the IScanProfileMgr::Refresh method when more than one IScanProfileMgr object might be creating or deleting profiles at the same time.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Scanprofilemgr.h
IDL
Scanprofiles.idl

See also

IScanProfileMgr

Scan Profile Schema