次の方法で共有


2.2.7.5.1 customUI Element

The customUI XML element directs the client to execute a method at a specific entry point in a specific file on the client computer. This element can also direct the client to respond with the result of the execution.

The customUI element SHOULD contain text data, encoded as a null-terminated UTF-16LE string ([RFC2781] section 4.2), to pass to the method indicated by the entrypoint attribute. The mechanism by which the client invokes the executable code is specific to the client implementation.<3>

If the bidi attribute value is "true", the entrypoint method MUST return a text value encoded as a null-terminated UTF-16LE string in the AsyncUICustomUIReply response (section 2.2.7.6) to this notification.

 <xs:element name="customUI">
   <xs:complexType>
     <xs:simpleContent>
       <xs:extension
         base="xs:string"
       >
         <xs:attribute name="dll"
           type="xs:string"
           use="required"
          />
         <xs:attribute name="entrypoint"
           type="xs:string"
           use="required"
          />
         <xs:attribute name="bidi"
           use="required"
         >
           <xs:simpleType>
             <xs:restriction
               base="xs:string"
             >
               <xs:enumeration
                 value="true"
                />
               <xs:enumeration
                 value="false"
                />
             </xs:restriction>
           </xs:simpleType>
         </xs:attribute>
       </xs:extension>
     </xs:simpleContent>
   </xs:complexType>
 </xs:element>

Attributes

Name

Type

Description

dll

xs:string

The value of this attribute is a string that contains the driver-file name of a file on the client system that contains executable code. The driver-file name MUST NOT contain any of the following Unicode standard [UNICODE] characters:

 \ (character code U+005C)

/ (character code U+002F)

? (character code U+003F)

* (character code U+002A)

< (character code U+003C)

> (character code U+003E)

" (character code U+0022)

| (character code U+007C)

: (character code U+003A)

entrypoint

xs:string

The value of this attribute is a string that specifies a public method in the file designated by the dll attribute.

bidi

enumeration

The value of this attribute MUST specify whether the client is expected to send a response to the server. The case-sensitive string MUST be one of the following values.

Value

Description

true

Indicates that the notification containing the customUI element MUST have been sent over a bidirectional notification channel, and the client MUST send a response back to the print server. The method specified by entrypoint MUST return a string, which MUST be returned to the server in an AsyncUICustomUIReply response.

false

Indicates that the notification containing the customUI element MUST NOT have been sent over a bidirectional notification channel, and the client MUST NOT send a response back to the print server.