프로필 스키마 검사

스캔 프로필 스키마는 스캐너 및 카메라와 같은 WIA(Windows Image Acquisition) 항목의 속성을 저장하는 데 사용할 수 있는 XML 형식을 정의합니다. 이러한 영구 파일을 사용하면 사용자가 항목의 속성 설정을 기억할 필요 없이 애플리케이션에서 자동 검사를 제공할 수 있습니다.

모든 IWiaItem2 디바이스에는 스캔 프로필이 있을 수 있습니다. 그러나 WIA_CATEGORY_FINISHED_FILE 및 WIA_CATEGORY_ROOT 형식의 IWiaItem2 항목에는 프로필이 있을 수 없습니다.

스캔 프로필은 IScanProfile, IScanProfileMgrIScanProfileUI 인터페이스를 통해 만들어지고 관리됩니다. 애플리케이션 사용자는 IScanProfileUI::ScanProfileDialog 메서드를 사용하여 제한된 방법으로 프로필을 수정할 수 있습니다.

모든 검사 프로필에는 , 및 <Properties>요소가 <ProfileGUID>, <DeviceID>, <ProfileName>, <WiaItem>있습니다. 디바이스의 기본 프로필에도 요소가 있습니다 <Default> .

검사 프로필을 만든 후에는 <ProfileGUID> 요소와 <DeviceID> 요소를 변경할 수 없습니다. 요소 및 <WiaItem> 요소의 <ProfileName> 값을 수정할 수 있습니다. <Default> 요소를 추가하거나 삭제할 수 있습니다. 이 작업은 IScanProfile::SetName, IScanProfile::SetItem 및 IScanProfileMgr::SetDefault 메서드를 사용하여 프로그래밍 방식으로 수행할 수 있습니다. IScanProfileUI::ScanProfileDialog 메서드를 통해 사용자가 이러한 속성을 변경할 수도 있습니다.

요소에는 <Properties> 자식이 포함됩니다 <Property> . WIA 항목 또는 디바이스 속성을 프로필에 추가하려면 이 속성을 사용합니다. 사용자 고유의 이미지 묵인 <Property> 자식도 개발할 수 있습니다. 이렇게 하면 스캔 프로필 스키마를 확장할 수 있습니다. 스키마 확장에 대한 자세한 내용은 사용자 지정 속성, IScanProfile::GetPropertyIScanProfile::SetProperty 정의를 참조하세요.

다음은 전체 검사 프로필 스키마입니다. 샘플 프로필은 다음과 같습니다.

<?xml version="1.0"?>
<xs:schema xmlns:xs="https://www.w3.org/2001/XMLSchema"
            targetNamespace="https://www.microsoft.com"
            xmlns="https://www.microsoft.com"
            elementFormDefault="qualified">

<xs:element name="ScanProfile">
            <xs:complexType>
            <xs:sequence>
                        <xs:element name="ProfileGUID" type="xs:string"/>
                        <xs:element name="DeviceID" type="xs:string"/>
<xs:element name="ProfileName" type="xs:string"/>
                        <xs:element name="Default" minOccurs="0">
                                    <xs:complexType>
                                    </xs:complexType>
                        </xs:element>
                        <xs:element name="WiaItem" type="xs:string"/>
                        <xs:element name="Properties" type="Properties"/>
            </xs:sequence>
            </xs:complexType>
</xs:element>
 
<xs:complexType name="Properties">
<xs:sequence>
            <xs:element name="Property" maxOccurs="unbounded" minOccurs="0">
            <xs:complexType>
            <xs:simpleContent>
                        <xs:extension base="xs:string">
                                    <xs:attribute name="id" type="xs:integer" use="required"/>
                                    <xs:attribute name="type" type="xs:integer" use="required"/>
                        </xs:extension>
            </xs:simpleContent>
            </xs:complexType>
            </xs:element>
</xs:sequence>
</xs:complexType>
 
</xs:schema>

예제 표시를 클릭하여 샘플 프로필을 확인합니다.

<ScanProfile>
    <ProfileGUID>
        {F862E217-32B0-4396-987A-2191224925CD}
    </ProfileGUID>
    <DeviceID>
        {6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0001
    </DeviceID>
    <ProfileName>
        Last used settings
    </ProfileName>
    <WiaItem>
        {FB607B1F-43F3-488B-855B-FB703EC342A6}
    </WiaItem>
    <Properties>
        <Property id="4103" type="3">
            3
        </Property>
        <Property id="4106" type="72">
            {B96B3CAB-0728-11D3-9D7B-0000F81EF32E}
        </Property>
        <Property id="6147" type="3">
            300
        </Property>
        <Property id="6154" type="3">
            0
        </Property>
        <Property id="6155" type="3">
            0
        </Property>
    </Properties>
</ScanProfile>

참조

IScanProfile::GetProperty

IScanProfile::SetProperty

개념

WIA 속성 상수

사용자 지정 속성 정의