JP2022078756A - Information processing apparatus, control method, and program - Google Patents

Information processing apparatus, control method, and program Download PDF

Info

Publication number
JP2022078756A
JP2022078756A JP2020189651A JP2020189651A JP2022078756A JP 2022078756 A JP2022078756 A JP 2022078756A JP 2020189651 A JP2020189651 A JP 2020189651A JP 2020189651 A JP2020189651 A JP 2020189651A JP 2022078756 A JP2022078756 A JP 2022078756A
Authority
JP
Japan
Prior art keywords
usb device
unique information
usb
information processing
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2020189651A
Other languages
Japanese (ja)
Inventor
一樹 坂本
Kazuki Sakamoto
達也 米森
Tatsuya Yonemori
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Finetech Nisca Inc
Original Assignee
Canon Finetech Nisca Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Finetech Nisca Inc filed Critical Canon Finetech Nisca Inc
Priority to JP2020189651A priority Critical patent/JP2022078756A/en
Publication of JP2022078756A publication Critical patent/JP2022078756A/en
Pending legal-status Critical Current

Links

Images

Abstract

To delete overlapping device objects.SOLUTION: An information processing apparatus acquires unique information from a USB device connected thereto, loads a driver in a main memory, and creates a device object for controlling the driver in the main memory. The information processing apparatus stores, in storage means, an entry that links a device name of the device object and the unique information to each other. When a predetermined deletion condition is satisfied, the information processing apparatus deletes the device object. The predetermined deletion condition is a situation where a plurality of entries having the same unique information as the unique information acquired from the USB device are stored in the storage means in an overlapping manner.SELECTED DRAWING: Figure 4

Description

本発明は情報処理装置、制御方法およびプログラムに関する。 The present invention relates to information processing devices, control methods and programs.

ホストコンピュータ(以降ホストPCと呼ぶ)は、一般に、複数のUSBポートを有している。USBはユニバーサル・シリアル・バスの略称である。各USBポートには、プリンタ、イメージスキャナーおよびデジタルカメラなどのUSBデバイスが接続される。USBデバイスは周辺機器と呼ばれてもよい。ホストPCは、各USBデバイスを識別するために、3つのIDを使用する。1つ目のIDは、USBデバイスを製造したメーカを特定可能なUSB Vender ID(VID)である。2つ目のIDは、同一のメーカにより製造された個々の製品を特定可能なUSB Product ID(PID)である。たとえば、プリンタのPIDとイメージリーダのPIDは異なっている。また、第一世代のプリンタのPIDと、後続製品である第二世代のプリンタのPIDも異なっている。3つ目のIDは、同一製品の中で個々の機体を識別可能なUSB Serial ID(SID)である。メーカは同一の製品を大量生産し、各機体に固有のSIDを付与する。ホストPCは、各USBデバイスから取得されたVID、PIDおよびSIDを用いて各USBデバイスを区別する。 A host computer (hereinafter referred to as a host PC) generally has a plurality of USB ports. USB is an abbreviation for Universal Serial Bus. USB devices such as printers, image scanners and digital cameras are connected to each USB port. USB devices may be referred to as peripheral devices. The host PC uses three IDs to identify each USB device. The first ID is a USB Vendor ID (VID) that can identify the manufacturer that manufactured the USB device. The second ID is a USB Product ID (PID) that can identify individual products manufactured by the same manufacturer. For example, the PID of the printer and the PID of the image reader are different. In addition, the PID of the first-generation printer and the PID of the second-generation printer, which is a subsequent product, are also different. The third ID is a USB Serial ID (SID) that can identify individual aircraft in the same product. Manufacturers mass-produce the same products and give each aircraft a unique SID. The host PC distinguishes each USB device by using the VID, PID and SID acquired from each USB device.

このように、SIDは機体ごとに異なるユニークなIDである。しかし、異なる複数の機体に対して、あえて同一のSIDを付与することで、ホストPCにこれらの異なる機体を同一の機体として認識させることができる。一般には、USBデバイスごとにデバイスドライバのインストールが必要となる。しかし、この認識技術を使用すると、1つ目の機体が接続されたときにはドライバのインストールが必要となるが、2つ目の機体が接続されたときにはドライバのインストールが不要となる。また、1つ目の機体についてのドライバ設定情報(例:写真印刷モード)が2つ目の機体についてのドライバ設定情報として引き継がれる。 In this way, the SID is a unique ID that differs for each aircraft. However, by intentionally assigning the same SID to a plurality of different aircraft, the host PC can recognize these different aircraft as the same aircraft. Generally, it is necessary to install a device driver for each USB device. However, when this recognition technique is used, it is necessary to install the driver when the first aircraft is connected, but it is not necessary to install the driver when the second aircraft is connected. Further, the driver setting information for the first aircraft (example: photo print mode) is inherited as the driver setting information for the second aircraft.

特許文献1では、ホストPCに1台目のUSBデバイスがすでに接続されている状態で、同一機種の別機体である2台目のUSBデバイスが接続された場合の制御が記載されている。具体的に、ホストPCは、2台目のUSBデバイスのVID、PIDおよびSIDが1台目のUSBデバイスのVID、PIDおよびSIDと一致すると、2台目のUSBデバイスにSIDを再要求する。2台目のUSBデバイスは、1台目のUSBデバイスのSIDと共通のSIDを有しているため、この共通のSIDに1を加算して生成した別のSIDをホストPCに送信する。これにより、ホストPCは、1台目のUSBデバイスと2台目のUSBデバイスとを異なる機体であると認識し、1台目のUSBデバイスと2台目のUSBデバイスとをそれぞれ利用する。なお、2台目のUSBデバイスは、共通のSIDしか記憶しておらず、この共通のSIDに1を加算して生成した別のSIDを記憶しない。そのため、2台目のUSBデバイスが別のPCに接続されると、2台目のUSBデバイスは共通のSIDを当該別のPCに送信する。そのため、別のPCは、2台目のUSBデバイスを1台目のUSBデバイスとして使用する。 Patent Document 1 describes control when a second USB device, which is another machine of the same model, is connected while the first USB device is already connected to the host PC. Specifically, when the VID, PID and SID of the second USB device match the VIDEO, PID and SID of the first USB device, the host PC re-requests the SID from the second USB device. Since the second USB device has a SID common to the SID of the first USB device, another SID generated by adding 1 to this common SID is transmitted to the host PC. As a result, the host PC recognizes that the first USB device and the second USB device are different aircraft, and uses the first USB device and the second USB device, respectively. The second USB device stores only a common SID, and does not store another SID generated by adding 1 to this common SID. Therefore, when the second USB device is connected to another PC, the second USB device transmits a common SID to the other PC. Therefore, another PC uses the second USB device as the first USB device.

特開2006-243988号公報Japanese Unexamined Patent Publication No. 2006-243888

ところで、従来技術では、複数のデバイスオブジェクトが無駄に作成されてしまい、PCのリソースが無駄に消費されてしまっていた。たとえば、あるPCに1台目のUSBデバイスと2台目のUSBデバイスとが同時に接続されて使用された後で、これらがPCから取り外され、今度は2台目のUSBデバイスだけが当該PCに接続されたケースを考慮してみよう。このケースでは、1台目のUSBデバイスと2台目のUSBデバイスとが同時に接続されると、二つのデバイスオブジェクトが生成される。なぜなら、2台目のUSBデバイスのSIDは、共通SIDとは異なるSID(共通SIDに1を加算されたもの)だからである。次に、2台目のUSBデバイスが単独でこのPCに接続されると、2台目のUSBデバイスは共通SIDをPCに送信する。PCは、受信された共通のSIDに基づき、2台目のUSBデバイスを1台目のUSBデバイスと認識してしまう。2台目のUSBデバイスには、共通のSIDに紐づけられた、つまり、1台目のUSBデバイスに紐づけられたドライバ設定とデバイスオブジェクトとが適用されてしまう。そのため、共通SIDとは異なるSIDにより2台目のUSBデバイスがPCに接続されたときに作成されたデバイスオブジェクトなどが無駄になってしまう。 By the way, in the prior art, a plurality of device objects are wastefully created, and PC resources are wasted. For example, after a first USB device and a second USB device are connected and used at the same time on a PC, they are removed from the PC, and this time only the second USB device is connected to the PC. Consider the connected case. In this case, when the first USB device and the second USB device are connected at the same time, two device objects are generated. This is because the SID of the second USB device is a SID different from the common SID (a common SID plus 1). Next, when the second USB device is independently connected to this PC, the second USB device transmits the common SID to the PC. The PC recognizes the second USB device as the first USB device based on the received common SID. The driver settings and device objects associated with the common SID, that is, associated with the first USB device, are applied to the second USB device. Therefore, the device object created when the second USB device is connected to the PC by the SID different from the common SID is wasted.

SIDを自由に書き替え可能なケースでも同様の問題が生じる。このケースでは、各機体には、原則として、異なるSIDが付与されるが、後発的にSIDが書き換え可能である。この場合、それぞれSIDが異なる1台目のUSBデバイスと2台目のUSBデバイスとがPCに最初に接続されたときに、二つのデバイスオブジェクトが生成される。これら二つのUSBデバイスがPCから取り外された後で、2台目のUSBデバイスのSIDが1台目のUSBデバイスのSIDと同一のSIDに書き換えられる。その後、2台目のUSBデバイスが接続されると、PCは、2台目のUSBデバイスを1台目のUSBデバイスと認識し、1台目のUSBデバイスのデバイスオブジェクトが2台目のUSBデバイスに適用される。やはり、このケースでも、最初に作成された二つのデバイスオブジェクトのうち一つのデバイスオブジェクトが無駄になる。 A similar problem occurs in the case where the SID can be freely rewritten. In this case, in principle, different SIDs are given to each aircraft, but the SID can be rewritten later. In this case, when the first USB device and the second USB device having different SIDs are first connected to the PC, two device objects are generated. After these two USB devices are removed from the PC, the SID of the second USB device is rewritten to the same SID as the SID of the first USB device. After that, when the second USB device is connected, the PC recognizes the second USB device as the first USB device, and the device object of the first USB device is the second USB device. Applies to. Again, in this case, one of the first two device objects created is wasted.

そこで、本発明は、重複したデバイスオブジェクトを削除することを目的とする。 Therefore, an object of the present invention is to delete a duplicate device object.

本発明は、たとえば、
USBデバイスを接続可能な接続手段と、
前記接続手段に接続された前記USBデバイスから前記USBデバイスのベンダーを示す第一ID、前記USBデバイスのプロダクトを示す第二ID、前記USBデバイスのシリアル情報を示す第三IDに加えて、固有情報である第四IDを取得する取得手段と、
前記第一ID、前記第二IDおよび前記第三IDに基づき前記USBデバイスを制御するためのドライバをメインメモリにロードし、前記ドライバを制御するためのデバイスオブジェクトをメインメモリに生成する生成手段と、
前記デバイスオブジェクトのデバイス名と前記固有情報とを紐づけるエントリーを記憶する記憶手段と、
所定の削除条件が満たされると、前記デバイスオブジェクトと当該デバイスオブジェクトに紐づけられた前記エントリーを削除する削除手段と、を有し、
前記所定の削除条件は、前記USBデバイスから取得された固有情報と同一の固有情報を有する複数のエントリーが重複して前記記憶手段に記憶されていることである、ことを特徴とする情報処理装置を提供する。
The present invention is, for example,
A connection method that can connect a USB device,
In addition to the first ID indicating the vendor of the USB device, the second ID indicating the product of the USB device, and the third ID indicating the serial information of the USB device from the USB device connected to the connecting means, unique information The acquisition method for acquiring the fourth ID, which is
A generation means for loading a driver for controlling the USB device based on the first ID, the second ID, and the third ID into the main memory, and generating a device object for controlling the driver in the main memory. ,
A storage means for storing an entry that associates the device name of the device object with the unique information, and
When a predetermined deletion condition is satisfied, the device object and a deletion means for deleting the entry associated with the device object are provided.
The predetermined deletion condition is an information processing apparatus characterized in that a plurality of entries having the same unique information as the unique information acquired from the USB device are duplicately stored in the storage means. I will provide a.

本発明によれば、重複したデバイスオブジェクトが削除される。 According to the present invention, duplicate device objects are deleted.

情報処理システムを示す図Diagram showing an information processing system 制御系を示す図Diagram showing the control system 記憶領域を示す図Diagram showing storage area USBデバイス制御方法を示すフローチャートFlow chart showing the USB device control method 記憶領域に記憶される情報の変遷を説明する図Diagram explaining the transition of information stored in the storage area ホストPCに接続されるUSBデバイスの変遷を説明する図The figure explaining the transition of the USB device connected to the host PC USBデバイス制御方法を示すフローチャートFlow chart showing the USB device control method メッセージを示す図Diagram showing the message

以下、添付図面を参照して実施形態が詳しく説明される。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものではなく、また実施形態で説明されている特徴の組み合わせの全てが発明に必須のものとは限らない。実施形態で説明されている複数の特徴のうち二つ以上の特徴が任意に組み合わされてもよい。また、同一または同様の構成には同一の参照番号が付され、重複した説明は省略される。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. It should be noted that the following embodiments do not limit the invention according to the claims, and not all combinations of features described in the embodiments are essential to the invention. Two or more of the plurality of features described in the embodiments may be arbitrarily combined. In addition, the same or similar configuration is given the same reference number, and duplicate explanations are omitted.

<第1の実施例>
[システムの構成]
図1は情報処理システム100を示している。情報処理システム100は、ホストPC101と、ホストPC101からの指示に従って様々な動作をするUSBデバイス102a、102bとを有している。ホストPC101とUSBデバイス102aはUSBケーブル103aにより接続されている。ホストPC101とUSBデバイス102bはUSBケーブル103bにより接続されている。USBデバイス102a、102bは、同一製品かつ別機体である。図1では、USBデバイス102a、102bは、印刷装置である。以下では、説明の便宜上、USBデバイス102a、102bはそれぞれ印刷装置102a、102bと呼ばれる。本発明は、USBデバイス102a、102bは、同一製品かつ別機体であれば、適用可能であるため、USBデバイス102a、102bは印刷装置に限定されない。印刷装置102a、102bに共通する事項が説明される場合には、参照符号の末尾に付与された"a"、"b"などの文字は省略される。また、USBデバイス102の数は三台以上であってもよい。印刷装置102は、ホストPC101から受信された印刷データに基づいて、印刷用紙等の記録媒体に画像を印刷する。
<First Example>
[System configuration]
FIG. 1 shows an information processing system 100. The information processing system 100 has a host PC 101 and USB devices 102a and 102b that perform various operations according to instructions from the host PC 101. The host PC 101 and the USB device 102a are connected by a USB cable 103a. The host PC 101 and the USB device 102b are connected by a USB cable 103b. The USB devices 102a and 102b are the same product and different machines. In FIG. 1, the USB devices 102a and 102b are printing devices. Hereinafter, for convenience of explanation, the USB devices 102a and 102b are referred to as printing devices 102a and 102b, respectively. The present invention is applicable as long as the USB devices 102a and 102b are the same product and different machines, so that the USB devices 102a and 102b are not limited to the printing device. When the matters common to the printing devices 102a and 102b are explained, the characters such as "a" and "b" added to the end of the reference code are omitted. Further, the number of USB devices 102 may be three or more. The printing device 102 prints an image on a recording medium such as printing paper based on the print data received from the host PC 101.

[制御系]
図2はホストPC101と印刷装置102の制御系を示している。図2では説明の便宜上、一台の印刷装置102だけが図示されている。
[Control system]
FIG. 2 shows a control system of the host PC 101 and the printing device 102. In FIG. 2, for convenience of explanation, only one printing device 102 is shown.

(1)ホストPC
ホストPC101は情報処理装置と呼ばれてもよい。ホストPC101のCPU210は、オペレーティングシステム(OS)の制御下で各種プログラムを実行する。CPU210のシステムバスは、PCIバスおよびISAバス、ホスト/PCIブリッジ211、及びPCI/ISAブリッジ215を経由した階層的なバスを有し、各ハードウェアと接続される。PCIは、ペリフェラル・コンポーネント・インターコネクトの略称である。ISAはインダストリ・スタンダード・アーキテクチャの略称である。PCIバスおよびISAバスは、いわゆるローカルバスである。ホスト/PCIブリッジ211は、CPU210に接続されたCPUバスと、PCIバスと、メインメモリ212に接続されたメモリバスとを相互に接続するブリッジ回路である。PCI/ISAブリッジ215は、PCIバスとISAバスとを相互に接続されたバスである。この例では、ISAバスにはHDD214、ROM216およびキーボード&マウス220が接続されている。HDDはハードディスクドライブの略称である。PCIバスにはUSB通信インターフェイス213とCRTC217とが接続されている。CRTC217は表示制御回路である。
(1) Host PC
The host PC 101 may be called an information processing device. The CPU 210 of the host PC 101 executes various programs under the control of the operating system (OS). The system bus of the CPU 210 has a PCI bus and an ISA bus, a host / PCI bridge 211, and a hierarchical bus via the PCI / ISA bridge 215, and is connected to each hardware. PCI is an abbreviation for peripheral component interconnect. ISA is an abbreviation for Industry Standard Architecture. The PCI bus and ISA bus are so-called local buses. The host / PCI bridge 211 is a bridge circuit that interconnects the CPU bus connected to the CPU 210, the PCI bus, and the memory bus connected to the main memory 212. The PCI / ISA bridge 215 is a bus in which the PCI bus and the ISA bus are interconnected. In this example, HDD 214, ROM 216 and keyboard & mouse 220 are connected to the ISA bus. HDD is an abbreviation for hard disk drive. The USB communication interface 213 and the CRTC217 are connected to the PCI bus. CRTC217 is a display control circuit.

メインメモリ212は、たとえば、RAM(ランダムアクセスメモリ)により構成される。メインメモリ212は、オペレーティングシステム(OS)、アプリケーションプログラム、デバイスドライバ等、実行プログラムの一時的記憶領域として使用される。メインメモリ212は、各プログラムを実行するために必要となる作業用メモリ領域を有してもよい。 The main memory 212 is composed of, for example, a RAM (random access memory). The main memory 212 is used as a temporary storage area for an execution program such as an operating system (OS), an application program, and a device driver. The main memory 212 may have a working memory area required for executing each program.

CPU210は、印刷データ等を全てメインメモリ212上に展開する。CPU210は、展開された画像データを、USB通信インターフェイス213を介して印刷装置102へ転送する。ROM216は、キーボード&マウス220などの入出力機器を制御するBIOS(基本入出力システム)プログラムなどを記憶している。 The CPU 210 expands all print data and the like on the main memory 212. The CPU 210 transfers the expanded image data to the printing device 102 via the USB communication interface 213. The ROM 216 stores a BIOS (basic input / output system) program that controls input / output devices such as a keyboard and mouse 220.

HDD214は、オペレーティングシステム(OS)、各種アプリケーションプログラム、USBデバイスのドライバプログラム、そして本発明を適用されるUSBデバイス制御プログラムなどを記憶している。これらのプログラムは、HDD214からメインメモリ212にロードされて、実行される。HDD214はSSD(ソリッドステートドライブ)などにより構成されてもよい。 The HDD 214 stores an operating system (OS), various application programs, a driver program for a USB device, a USB device control program to which the present invention is applied, and the like. These programs are loaded from the HDD 214 into the main memory 212 and executed. HDD 214 may be configured by SSD (Solid State Drive) or the like.

CRTC217はCPU210によってVRAM218に書き込まれた表示用ビットマップデータを継続的に読み出して、ディスプレイ219に転送する。これにより、ディスプレイ219は、様々な情報を表示することができる。 The CRTC217 continuously reads the display bitmap data written in the VRAM 218 by the CPU 210 and transfers it to the display 219. As a result, the display 219 can display various information.

(2)印刷装置(USBデバイス)
図2では、印刷装置102a、102bは印刷装置102と表記されている。これは、印刷装置102a、102bは同一製品の別機体(別個体)だからである。印刷装置102のCPU201は、ROM203に記憶されている制御プログラムを実行することにより、印刷装置102を制御する。RAM202は、印刷データおよび印刷装置102に関わる設定等を記憶する記憶装置である。RAM202は、DRAMおよびフラッシュメモリなどを有している。USB通信回路204は、CPU201がホストPC101と通信を行うための回路である。ヘッド制御回路205は、CPU201からの指示にしたがって記録ヘッドを制御する回路である。駆動回路206は、CPU201からの指示にしたがって印刷媒体を搬送するアクチュエータを駆動する回路である。R/W回路207は、各記録ヘッド内のメモリにデータを書き込んだり、当該メモリからデータを読み出したりする制御回路である。USBデバイスの種類によっては、ヘッド制御回路205、駆動回路206およびR/W回路207とは異なる制御回路および駆動回路が搭載される。RAM202は、ホストPC101のUSBデバイス制御プログラムで使用される機器固有の情報を記憶する。たとえば、RAM202の一部を構成するフラッシュメモリは、VID、PID、およびSIDを記憶している。VIDおよびPIDは書き換え不可の情報であるため、ROM203に保持されていてもよい。SIDは書き換え可能なIDである。本実施例では、さらに、第四のIDである固有情報もフラッシュメモリに保持される。第四のIDも書き換え不可の情報であるため、ROM203に保持されていてもよい。
(2) Printing device (USB device)
In FIG. 2, the printing devices 102a and 102b are referred to as printing devices 102. This is because the printing devices 102a and 102b are separate machines (separate bodies) of the same product. The CPU 201 of the printing device 102 controls the printing device 102 by executing a control program stored in the ROM 203. The RAM 202 is a storage device that stores print data and settings related to the print device 102. The RAM 202 includes a DRAM, a flash memory, and the like. The USB communication circuit 204 is a circuit for the CPU 201 to communicate with the host PC 101. The head control circuit 205 is a circuit that controls the recording head according to an instruction from the CPU 201. The drive circuit 206 is a circuit that drives an actuator that conveys a print medium according to an instruction from the CPU 201. The R / W circuit 207 is a control circuit for writing data to a memory in each recording head and reading data from the memory. Depending on the type of USB device, a control circuit and a drive circuit different from the head control circuit 205, the drive circuit 206, and the R / W circuit 207 are mounted. The RAM 202 stores device-specific information used in the USB device control program of the host PC 101. For example, the flash memory that forms part of the RAM 202 stores VIDs, PIDs, and SIDs. Since VID and PID are non-rewritable information, they may be held in ROM 203. The SID is a rewritable ID. In this embodiment, the unique information, which is the fourth ID, is also stored in the flash memory. Since the fourth ID is also non-rewritable information, it may be held in ROM 203.

ユーザーは、何らかの理由で印刷装置102aを別の印刷装置102bに入れ替えることがある。この場合、印刷装置102bのSIDが印刷装置102aのSIDに書き換えられてもよい(SIDの共通化)。これにより、ホストPC101は、印刷装置102bを印刷装置102aと認識し、印刷装置102aのために作成されたプリンタオブジェクトおよび設定情報を印刷装置102bのために引き続き使用することができる。印刷装置102bのSIDの書き換えはホストPC101が書き換え指示をCPU201に送信することで実行されてもよい。印刷装置102が入力装置を有する場合、CPU201は、入力装置から入力された書き換え指示にしたがってSIDを書き換えてもよい。 The user may replace the printing device 102a with another printing device 102b for some reason. In this case, the SID of the printing device 102b may be rewritten to the SID of the printing device 102a (common SID). As a result, the host PC 101 recognizes the printing device 102b as the printing device 102a, and can continue to use the printer object and the setting information created for the printing device 102a for the printing device 102b. The rewriting of the SID of the printing device 102b may be executed by the host PC 101 transmitting a rewriting instruction to the CPU 201. When the printing device 102 has an input device, the CPU 201 may rewrite the SID according to the rewriting instruction input from the input device.

[第四のID(固有情報)]
図3はUSBデバイスの固有情報を記憶する記憶領域300を示している。記憶領域300はメインメモリ212に確保される領域である。図3においては、記憶領域300は、オブジェクト名301、303、305とそれに紐づけられた固有情報302、304、306など、USBデバイスを管理するための管理情報を記憶している。オブジェクト名301、303、305はそれぞれUSBデバイスのデバイスオブジェクトを識別するための名称である。固有情報302、304、306は、各USBデバイスに付与される識別情報であって、VID、PIDおよびSIDとは異なる、第四のIDである。
[Fourth ID (unique information)]
FIG. 3 shows a storage area 300 for storing unique information of the USB device. The storage area 300 is an area reserved in the main memory 212. In FIG. 3, the storage area 300 stores management information for managing the USB device, such as the object names 301, 303, 305 and the unique information 302, 304, 306 associated with the object names 301, 303, 305. The object names 301, 303, and 305 are names for identifying the device object of the USB device, respectively. The unique information 302, 304, and 306 are identification information given to each USB device, and are a fourth ID different from the VID, PID, and SID.

ホストPCが印刷装置102を使用するにはドライバがホストPC101へインストールされていなければならない。ドライバ(ドライバプログラム)はHDD214からメインメモリ212に読み出され、CPU210により実行される。CPU210は、ドライバをインストールする際にドライバのオブジェクト名をユーザーの指示にしたがって任意で設定することができる。デフォルトのオブジェクト名は印刷装置102の製品名となっていることが多い。ここではデフォルトのオブジェクト名がXXXXであると仮定されている。以下では、デバイスオブジェクトは、プリンタオブジェクトと呼ばれる。 In order for the host PC to use the printing device 102, the driver must be installed on the host PC 101. The driver (driver program) is read from the HDD 214 to the main memory 212 and executed by the CPU 210. When installing the driver, the CPU 210 can arbitrarily set the object name of the driver according to the user's instruction. The default object name is often the product name of the printing apparatus 102. Here, it is assumed that the default object name is XXX. In the following, the device object is referred to as the printer object.

印刷装置102がUSB通信インターフェイス213に接続されると、CPU210は、USB通信インターフェイス213を介して印刷装置102のVID、PIDおよびSIDに加え、第四のIDである固有情報302を印刷装置102から取得する。固有情報302は機体ごとに割り振られたシリアルナンバーのようなユニーク情報であり、機体を特定するために使用される情報である。CPU210は、印刷装置102から取得された固有情報302をオブジェクト名301と紐づけてエントリーを作成し、エントリーを記憶領域300に記憶する。つまり、一つのエントリーは、固有情報302とオブジェクト名301とのペアを含む。 When the printing device 102 is connected to the USB communication interface 213, the CPU 210 transfers the unique information 302, which is the fourth ID, from the printing device 102 in addition to the VID, PID, and SID of the printing device 102 via the USB communication interface 213. get. The unique information 302 is unique information such as a serial number assigned to each aircraft, and is information used to identify the aircraft. The CPU 210 creates an entry by associating the unique information 302 acquired from the printing device 102 with the object name 301, and stores the entry in the storage area 300. That is, one entry contains a pair of unique information 302 and object name 301.

VID、PID、SIDは同じであるが、固有情報302が異なる別の印刷装置102がUSB通信インターフェイス213に接続されることがある。この場合、CPU210は、別の印刷装置102からVID、PID、SIDおよび固有情報304を読み出す。さらに、CPU210は、固有情報304をオブジェクト名303と紐づけて、記憶領域300に記憶する。ここでは、オブジェクト名303は「Original」であり、固有情報304は「BBBB」である。 Another printing device 102 having the same VID, PID, and SID but different unique information 302 may be connected to the USB communication interface 213. In this case, the CPU 210 reads the VID, PID, SID, and unique information 304 from another printing device 102. Further, the CPU 210 associates the unique information 304 with the object name 303 and stores it in the storage area 300. Here, the object name 303 is "Original" and the unique information 304 is "BBBB".

VID、PID、SIDが同じであるが、固有情報306が異なる別の印刷装置102がUSB通信インターフェイス213に接続される場合がある。この場合、CPU210は、別の印刷装置102からVID、PID、SIDおよび固有情報306を読み出し、固有情報306をオブジェクト名305と紐づけて、記憶領域300に記憶する。ここでは、オブジェクト名303は「XXXX(1コピー)」であり、固有情報304は「CCCC」である。 Another printing device 102 having the same VID, PID, and SID but different unique information 306 may be connected to the USB communication interface 213. In this case, the CPU 210 reads the VID, PID, SID, and the unique information 306 from another printing device 102, associates the unique information 306 with the object name 305, and stores the unique information 306 in the storage area 300. Here, the object name 303 is "XXXX (1 copy)" and the unique information 304 is "CCCC".

オブジェクト名303を付与された印刷装置102は、印刷装置102bであってもよい。上述されたように、ユーザーは、オブジェクト名を自由に変更できるからである。 The printing device 102 to which the object name 303 is given may be the printing device 102b. This is because, as mentioned above, the user is free to change the object name.

オブジェクト名305と固有情報306とのペアは、図1では図示を省略されている第三の印刷装置102(印刷装置102cと表記されてもよい。)に紐づけられている。オブジェクト名305はOSが備える複数の機能のうちの一つであるPnP(プラグアンドプレイ)機能により追加されたプリンタオブジェクトを示している。PnP機能で追加されるプリンタオブジェクトのオブジェクト名は、デフォルトの名称に1コピー、2コピー、3コピー・・が付加されて、生成される。固有情報306は、すでにPC101に接続されたことがある印刷装置102aの固有情報302および印刷装置102bの固有情報304とは異なる。CPU201は、プリンタオブジェクトの新規追加、名称変更および削除に応じて記憶領域300に記憶されている情報を更新してもよい。 The pair of the object name 305 and the unique information 306 is associated with a third printing device 102 (which may be referred to as a printing device 102c), which is not shown in FIG. 1. The object name 305 indicates a printer object added by the PnP (Plug and Play) function, which is one of the plurality of functions provided by the OS. The object name of the printer object added by the PnP function is generated by adding 1 copy, 2 copies, 3 copies, and so on to the default name. The unique information 306 is different from the unique information 302 of the printing device 102a and the unique information 304 of the printing device 102b that have already been connected to the PC 101. The CPU 201 may update the information stored in the storage area 300 in response to the addition, renaming, and deletion of the printer object.

[フローチャート]
図4はCPU210により実行されるUSBデバイス制御方法(以下、制御方法と呼ばれる。)を示すフローチャートである。図5(A)ないし図5(D)は記憶領域300に記憶される情報の変化を示している。図6(A)ないし図6(C)はホストPC101に接続されている印刷装置102を示している。ここでは、第二のUSBデバイスのSIDを書き換えることで、第一のUSBデバイス用のデバイスオブジェクトおよび設定が第二のUSBデバイスに適用される。図4に示された制御方法は一定周期で実行されることが想定されている。
[flowchart]
FIG. 4 is a flowchart showing a USB device control method (hereinafter referred to as a control method) executed by the CPU 210. 5 (A) to 5 (D) show changes in the information stored in the storage area 300. 6 (A) to 6 (C) show the printing apparatus 102 connected to the host PC 101. Here, by rewriting the SID of the second USB device, the device object and settings for the first USB device are applied to the second USB device. The control method shown in FIG. 4 is assumed to be executed at regular intervals.

(I)ケース1
ケース1は、印刷装置102bのSIDが印刷装置102aのSIDに書き換えられることで発生する無駄なデバイスオブジェクトが削除されるケースである。ケース1は、以下のフェーズ1からフェーズ3を含む。
(I) Case 1
Case 1 is a case in which a useless device object generated by rewriting the SID of the printing device 102b to the SID of the printing device 102a is deleted. Case 1 includes the following Phases 1 to 3.

(1)フェーズ1
ここでは、印刷装置102aが初めてホストPC101へ接続されることが想定されている。印刷装置102aはまだホストPC101に接続されない。図6(A)が示すように、印刷装置102aのSIDは「1111」である。印刷装置102aがホストPC101に接続されたときに印刷装置102aに付与されるオブジェクト名は「XXXX」である。
(1) Phase 1
Here, it is assumed that the printing apparatus 102a is connected to the host PC 101 for the first time. The printing device 102a is not yet connected to the host PC 101. As shown in FIG. 6A, the SID of the printing apparatus 102a is "1111". The object name given to the printing device 102a when the printing device 102a is connected to the host PC 101 is "XXXX".

S401でCPU210は何らかのUSBデバイス(例:印刷装置102a)がUSB通信インターフェイス213のUSBポートに接続されたかどうかを判定する。USBデバイスの接続判定は、当業界においてよく知られているため、ここでは、接続判定の具体的な方法は説明されない。何らかのUSBデバイスが接続されている場合、CPU210は、S402へ進む。何のUSBデバイスも接続されていなかった場合、CPU210は、制御方法を終了する。 In S401, the CPU 210 determines whether or not any USB device (eg, printing device 102a) is connected to the USB port of the USB communication interface 213. Since the connection determination of the USB device is well known in the art, a specific method of the connection determination is not described here. If any USB device is connected, the CPU 210 proceeds to S402. If no USB device is connected, the CPU 210 terminates the control method.

S402でCPU210は、USB通信インターフェイス213に接続されているUSBデバイスのオブジェクト名を取得する。CPU210は、印刷装置102aと通信可能なプリンタオブジェクトのオブジェクト名をOSから取得する。ここでは、印刷装置102aのVID、PIDおよびSIDに対応するオブジェクト名として「XXXX」が取得される。なお、OSは、VID、PIDおよびSIDにオブジェクト名を紐づけることで各デバイスオブジェクトを管理している。 In S402, the CPU 210 acquires the object name of the USB device connected to the USB communication interface 213. The CPU 210 acquires the object name of the printer object that can communicate with the printing device 102a from the OS. Here, "XXXX" is acquired as the object name corresponding to the VID, PID, and SID of the printing apparatus 102a. The OS manages each device object by associating the object name with the VID, PID, and SID.

S403でCPU210は、取得されたオブジェクト名と同一のオブジェクト名が記憶領域300に登録済みであるかどうかを判定する。たとえば、印刷装置102aがホストPC101に初めて接続された場合、記憶領域300にはオブジェクト名である「XXXX」は格納されていない。よって、CPU210は、S412へ進む。 In S403, the CPU 210 determines whether or not the same object name as the acquired object name is registered in the storage area 300. For example, when the printing device 102a is connected to the host PC 101 for the first time, the object name "XXXX" is not stored in the storage area 300. Therefore, the CPU 210 proceeds to S412.

S412でCPU210は、USB通信インターフェイス213を介してUSBデバイスから固有情報(第四のID)を取得する。たとえば、CPU210は、印刷装置102aと通信し、印刷装置102aの固有情報を取得する。印刷装置102aの固有情報は、たとえば、「AAAA」である。 In S412, the CPU 210 acquires unique information (fourth ID) from the USB device via the USB communication interface 213. For example, the CPU 210 communicates with the printing device 102a and acquires unique information of the printing device 102a. The unique information of the printing apparatus 102a is, for example, "AAAA".

S413でCPU210は、取得されたオブジェクト名と固有情報とを紐づけて記憶領域300に記憶する。図5(A)が示すように、記憶領域300には、オブジェクト名と502(「XXXX」)と固有情報503(「AAAA」)とが記憶される。その後、CPU210は、制御方法を終了する。 In S413, the CPU 210 stores the acquired object name and the unique information in the storage area 300 in association with each other. As shown in FIG. 5A, the storage area 300 stores an object name, 502 (“XXXX”), and unique information 503 (“AAAA”). After that, the CPU 210 ends the control method.

(2)フェーズ2
ここでは、ホストPC101に印刷装置102aが接続された状態で、さらに、印刷装置102bが新たにホストPC101へ接続される。図6(B)が示すように、印刷装置102bのSIDは「2222」である。印刷装置102bがホストPC101に接続されたときに印刷装置102bに付与されるオブジェクト名は「XXXX(1コピー)」である。印刷装置102bの固有情報は「BBBB」である。
(2) Phase 2
Here, with the printing device 102a connected to the host PC 101, the printing device 102b is newly connected to the host PC 101. As shown in FIG. 6B, the SID of the printing apparatus 102b is "2222". The object name given to the printing device 102b when the printing device 102b is connected to the host PC 101 is "XXXX (1 copy)". The unique information of the printing apparatus 102b is "BBBB".

S401でCPU210は印刷装置102bがUSB通信インターフェイス213に接続されたことを検知する。S402でCPU210は印刷装置102bから印刷装置102bのVID、PIDおよびSIDを取得し、VID、PIDおよびSIDに基づきオブジェクト名「XXXX(1コピー)」をOSから取得する。上述されたように、OSは、印刷装置102bのVID、およびPIDに基づきデフォルトのオブジェクト名「XXXX」を決定し、さらに、SIDに基づき「1コピー」をデフォルトのオブジェクト名「XXXX」に付加する。これにより、SID「2222」のためのオブジェクト名「XXXX(1コピー)」を生成する。S403でCPU210は、オブジェクト名「XXXX(1コピー)」が記憶領域300(図5(A))に登録されていないと判定し、S412に進む。S412でCPU210は、印刷装置102bから固有情報「BBBB」を取得する。S413でCPU210は印刷装置102bのオブジェクト名「XXXX(1コピー)」と固有情報「BBBB」とを紐づけて記憶領域300に記憶する。図5(B)はこの状態の記憶領域300を示している。 In S401, the CPU 210 detects that the printing device 102b is connected to the USB communication interface 213. In S402, the CPU 210 acquires the UID, PID, and SID of the printing device 102b from the printing device 102b, and acquires the object name "XXXX (1 copy)" from the OS based on the UID, PID, and SID. As described above, the OS determines the default object name "XXXX" based on the VID and PID of the printing apparatus 102b, and further adds "1 copy" to the default object name "XXXX" based on the SID. .. As a result, the object name "XXXX (1 copy)" for the SID "2222" is generated. In S403, the CPU 210 determines that the object name "XXXX (1 copy)" is not registered in the storage area 300 (FIG. 5A), and proceeds to S412. In S412, the CPU 210 acquires the unique information "BBBB" from the printing device 102b. In S413, the CPU 210 associates the object name "XXXXX (1 copy)" of the printing device 102b with the unique information "BBBB" and stores them in the storage area 300. FIG. 5B shows the storage area 300 in this state.

(3)フェーズ3
ここでは、印刷装置102a、102bがホストPC101から取り外される。さらに、印刷装置102bのSID(「2222」)が印刷装置102aのSID(「1111」)に書き換えられる。そして、印刷装置102bがホストPC101へ再び接続される。図6(C)が示すように、ホストPC101には、SIDを「1111」に書き換えられた印刷装置102bが接続される。
(3) Phase 3
Here, the printing devices 102a and 102b are removed from the host PC 101. Further, the SID (“2222”) of the printing device 102b is rewritten to the SID (“1111”) of the printing device 102a. Then, the printing device 102b is reconnected to the host PC 101. As shown in FIG. 6C, a printing device 102b whose SID is rewritten to "1111" is connected to the host PC 101.

S401でCPU210は印刷装置102bがUSB通信インターフェイス213に接続されたことを検知する。S402でCPU210は印刷装置102bから印刷装置102bのVID、PIDおよびSIDを取得し、VID、PIDおよびSIDに基づきオブジェクト名「XXXX」をOSから取得する。SIDが「1111」であるため、オブジェクト名「XXXX」が取得される。S403でCPU210は、オブジェクト名「XXXX」が記憶領域300(図5(A))に登録されていると判定し、S404に進む。 In S401, the CPU 210 detects that the printing device 102b is connected to the USB communication interface 213. In S402, the CPU 210 acquires the UID, PID, and SID of the printing device 102b from the printing device 102b, and acquires the object name "XXXX" from the OS based on the UID, PID, and SID. Since the SID is "1111", the object name "XXXX" is acquired. In S403, the CPU 210 determines that the object name "XXXX" is registered in the storage area 300 (FIG. 5A), and proceeds to S404.

S404でCPU210は、印刷装置102bから固有情報「BBBB」を取得する。S405でCPU210は記憶領域300から、オブジェクト名「XXXX」に紐づけられている固有情報を検索する。S406でCPU210は、印刷装置102bから取得された固有情報「BBBB」と、記憶領域300から取得された固有情報とが一致するかどうかを判定する。図5(B)が示すように、記憶領域300には、オブジェクト名「XXXX」に紐づけられて固有情報「AAAA」が記憶されている。よって、CPU210は、固有情報「BBBB」と固有情報「AAAA」とが一致しないと判定し、S407に進む。 In S404, the CPU 210 acquires the unique information "BBBB" from the printing device 102b. In S405, the CPU 210 searches the storage area 300 for the unique information associated with the object name "XXXX". In S406, the CPU 210 determines whether or not the unique information "BBBB" acquired from the printing apparatus 102b and the unique information acquired from the storage area 300 match. As shown in FIG. 5B, the storage area 300 stores the unique information “AAAA” associated with the object name “XXXX”. Therefore, the CPU 210 determines that the unique information "BBBB" and the unique information "AAAA" do not match, and proceeds to S407.

S407でCPU210は、オブジェクト名「XXXX」に紐づけられて、記憶領域300に記憶されている固有情報「AAAA」を、固有情報「BBBB」に更新する。 In S407, the CPU 210 is associated with the object name "XXXXX" and updates the unique information "AAAA" stored in the storage area 300 to the unique information "BBBB".

S408でCPU210は、印刷装置102bから取得された固有情報「BBBB」が記憶領域300において重複して登録されているかどうかを判定する。CPU210は、記憶領域300において、固有情報「BBBB」を検索することで、重複して登録されている固有情報「BBBB」とオブジェクト名とのペア(エントリーまたはレコードと呼ばれてもよい)を検索する。記憶領域300において、固有情報「BBBB」が重複していなければ、CPU210はS411に進む。ここでは、図5(C)が示すように、固有情報「BBBB」は、オブジェクト名「XXXX」とオブジェクト名「XXXX(1コピー)」とに重複して紐づけられている。これは、固有情報503が「AAAA」から「BBBB」へ更新されたからである。図5(C)が示すように、固有情報「BBBB」が重複しているため、CPU210はS409に進む。 In S408, the CPU 210 determines whether or not the unique information "BBBB" acquired from the printing apparatus 102b is registered in the storage area 300 in duplicate. By searching for the unique information "BBBB" in the storage area 300, the CPU 210 searches for a pair (may be called an entry or a record) of the unique information "BBBB" and the object name that are registered in duplicate. do. If the unique information "BBBB" does not overlap in the storage area 300, the CPU 210 proceeds to S411. Here, as shown in FIG. 5C, the unique information "BBBB" is duplicated with the object name "XXXX" and the object name "XXXXX (1 copy)". This is because the unique information 503 has been updated from "AAAA" to "BBBB". As shown in FIG. 5C, since the unique information “BBBB” is duplicated, the CPU 210 proceeds to S409.

S409でCPU210は、重複した固有情報に紐づけられているオブジェクト名540のデバイスオブジェクトをメインメモリ212から削除する。S410でCPU210は、重複した固有情報に紐づけられているオブジェクト名540(「XXXX(1コピー)」)のエントリーを記憶領域300から削除する。つまり、オブジェクト名540(「XXXX(1コピー)」)と固有情報505(「BBBB」)とのペアからなるエントリーが記憶領域300から削除される。その結果、記憶領域300は、図5(D)が示された状態となる。 In S409, the CPU 210 deletes the device object with the object name 540 associated with the duplicate unique information from the main memory 212. In S410, the CPU 210 deletes the entry of the object name 540 (“XXXXX (1 copy)”) associated with the duplicate unique information from the storage area 300. That is, the entry consisting of the pair of the object name 540 (“XXXX (1 copy)”) and the unique information 505 (“BBBB”) is deleted from the storage area 300. As a result, the storage area 300 is in the state shown in FIG. 5 (D).

S411でCPU210は記憶領域300に記憶されているすべてのエントリーについて、固有情報(「BBBB」)の重複の有無を確認したかどうかを判定する。すべてのエントリーについて確認が完了していれば、CPU210は、制御方法を終了する。一方で、すべてのエントリーについて確認が完了していなければ、CPU210は、S408に戻り、記憶領域300における次のエントリーの固有情報と、印刷装置102bから取得された固有情報とを比較することで、固有情報の重複の有無を判定する。 In S411, the CPU 210 determines whether or not it has been confirmed whether or not the unique information (“BBBB”) is duplicated for all the entries stored in the storage area 300. If the confirmation is completed for all the entries, the CPU 210 ends the control method. On the other hand, if the confirmation is not completed for all the entries, the CPU 210 returns to S408 and compares the unique information of the next entry in the storage area 300 with the unique information acquired from the printing device 102b. Determine if there is duplication of unique information.

このように、印刷装置102bのSID(「2222」)が印刷装置102aのSID(「1111」)と一致するように書き換えられた場合、SID(「2222」)に関連付けられた生成されたデバイスオブジェクトがS409で削除される。さらに、印刷装置102bのSIDが「2222」であったときに作成されたエントリーも記憶領域300から削除される。 Thus, when the SID (“2222”) of the printing device 102b is rewritten to match the SID (“1111”) of the printing device 102a, the generated device object associated with the SID (“2222”). Is deleted in S409. Further, the entry created when the SID of the printing device 102b is "2222" is also deleted from the storage area 300.

ケース1では、印刷装置102bのSIDが印刷装置102aのSIDに書き換えられる。そのため、印刷装置102bは、印刷装置102aのオブジェクト名に紐づけられる。印刷装置102bは、印刷装置102aのオブジェクト名により識別される印刷装置102aのオブジェクトと設定を引き継いで使用する。 In case 1, the SID of the printing device 102b is rewritten to the SID of the printing device 102a. Therefore, the printing device 102b is associated with the object name of the printing device 102a. The printing device 102b inherits and uses the object and the setting of the printing device 102a identified by the object name of the printing device 102a.

(II)ケース2
ケース2は、ホストPC101で印刷装置102a、102bが同時に使用されるケースである。つまり、印刷装置102bのSIDは「2222」のままであり、他の値に書き換えられない。
(II) Case 2
Case 2 is a case where the printing devices 102a and 102b are simultaneously used by the host PC 101. That is, the SID of the printing apparatus 102b remains "2222" and cannot be rewritten to another value.

(1)フェーズ1
ケース1のフェーズ1と共通である。
(1) Phase 1
This is the same as Phase 1 of Case 1.

(2)フェーズ2
ケース1のフェーズ2と共通である。
(2) Phase 2
This is the same as Phase 2 of Case 1.

(3)フェーズ3
フェーズ1、2が完了すると、記憶領域300は、図5(B)に示された状態となる。図6(B)が示すように、ホストPC101には印刷装置102a、102bが接続されている。この状態で、一端、印刷装置102a、102bがホストPC101から取り外され、その後、印刷装置102bのみがホストPC101に接続されることが仮定されている。
(3) Phase 3
When Phases 1 and 2 are completed, the storage area 300 is in the state shown in FIG. 5 (B). As shown in FIG. 6B, the printing devices 102a and 102b are connected to the host PC 101. In this state, it is assumed that the printing devices 102a and 102b are once removed from the host PC 101, and then only the printing devices 102b are connected to the host PC 101.

S401でCPU210は印刷装置102bがホストPC101と再度接続されたことを検知する。S402でCPU210は印刷装置102bのオブジェクト名(「XXXX(1コピー)」)を取得する。S403でCPU210は、取得されオブジェクト名を検索し、当該オブジェクト名が記憶領域300に記憶されているかどうかを判定する。図5(B)が示すように、オブジェクト名(「XXXX(1コピー)」)は、オブジェクト名504にすでに登録されている。よって、CPU210はS404に進む。 In S401, the CPU 210 detects that the printing device 102b is reconnected to the host PC 101. In S402, the CPU 210 acquires the object name (“XXXX (1 copy)”) of the printing apparatus 102b. In S403, the CPU 210 searches for the acquired object name, and determines whether or not the object name is stored in the storage area 300. As shown in FIG. 5B, the object name (“XXXX (1 copy)”) is already registered in the object name 504. Therefore, the CPU 210 proceeds to S404.

S404でCPU210は印刷装置102bから取得された固有情報(「BBBB」)を取得する。S405でCPU210はオブジェクト名(「XXXX(1コピー)」)に紐づけられている固有情報505(「BBBB」)を記憶領域300から取得する。S406でCPU210は二つの固有情報が一致すると判定し、制御方法を終了する。 In S404, the CPU 210 acquires the unique information (“BBBB”) acquired from the printing apparatus 102b. In S405, the CPU 210 acquires the unique information 505 (“BBBB”) associated with the object name (“XXXXX (1 copy)”) from the storage area 300. In S406, the CPU 210 determines that the two unique information match, and ends the control method.

これにより、記憶領域300は図5(B)に示された状態を維持する。印刷装置102bのオブジェクト名(「XXXX(1コピー)」)に関連付けられているデバイスオブジェクトと設定はメインメモリ212に保持されている。よって、印刷装置102bは、再び、このデバイスオブジェクトと設定にしたがってCPU210により制御されて、印刷を実行する。印刷装置102aは、オブジェクト名(「XXXX」)に関連付けられているデバイスオブジェクトと設定にしたがってCPU210により制御されて、印刷を実行する。したがって、印刷装置102a、102bはそれぞれ異なる設定にしたがって動作する。このように、印刷装置102a、102bを同時に使用する場合、印刷装置102aのSIDと印刷装置102bのSIDは書き換えられず、両者は異なったままである。よって、印刷装置102aのデバイス名と印刷装置102bのデバイス名も異なったままとなり、印刷装置102a、102bが同時に制御可能となる。 As a result, the storage area 300 maintains the state shown in FIG. 5 (B). The device object and settings associated with the object name (“XXXX (1 copy)”) of the printing device 102b are held in the main memory 212. Therefore, the printing device 102b is again controlled by the CPU 210 according to the device object and the setting to execute printing. The printing device 102a is controlled by the CPU 210 according to the device object and the setting associated with the object name (“XXXX”) to execute printing. Therefore, the printing devices 102a and 102b operate according to different settings. As described above, when the printing devices 102a and 102b are used at the same time, the SID of the printing device 102a and the SID of the printing device 102b are not rewritten, and both remain different. Therefore, the device name of the printing device 102a and the device name of the printing device 102b also remain different, and the printing devices 102a and 102b can be controlled at the same time.

(III)ケース3
ケース3では、第二のUSBデバイスのSIDを第一のUSBデバイスのSIDに書き換えることで、第二のUSBデバイスが、第一のUSBデバイスと同じデバイスオブジェクトおよび設定を使用することが想定されている。なお、印刷装置102bのSIDを書き換える前に、印刷装置102bはホストPC101へ接続されていないことが前提とされている。つまり、印刷装置102bのSIDが書き換えられた後に初めて、印刷装置102bはホストPC101へ接続されることが前提とされている。この点でケース1とケース3は異なっている。
(III) Case 3
In Case 3, it is assumed that the second USB device uses the same device objects and settings as the first USB device by rewriting the SID of the second USB device to the SID of the first USB device. There is. Before rewriting the SID of the printing device 102b, it is assumed that the printing device 102b is not connected to the host PC 101. That is, it is assumed that the printing device 102b is connected to the host PC 101 only after the SID of the printing device 102b is rewritten. Case 1 and Case 3 are different in this respect.

(1)フェーズ1
ケース1のフェーズ1と共通である。これにより、印刷装置102aが初めてホストPC101に接続される。記憶領域300は図5(1)に示された状態となる。図6(A)が示すように、ホストPC101には印刷装置102aだけが接続されている。
(1) Phase 1
This is the same as Phase 1 of Case 1. As a result, the printing device 102a is connected to the host PC 101 for the first time. The storage area 300 is in the state shown in FIG. 5 (1). As shown in FIG. 6A, only the printing device 102a is connected to the host PC 101.

(2)フェーズ2
印刷装置102aがホストPC101から取り外される。次に、印刷装置102bのSIDが「2222」から「1111」へ書き換えられ、印刷装置102bがホストPC101へ接続される。図6(C)が示すように、この状態では、印刷装置102bだけがホストPC101へ接続されている。
(2) Phase 2
The printing device 102a is removed from the host PC 101. Next, the SID of the printing device 102b is rewritten from "2222" to "1111", and the printing device 102b is connected to the host PC 101. As shown in FIG. 6C, in this state, only the printing device 102b is connected to the host PC 101.

S401でCPU210は印刷装置102bがUSB通信インターフェイス213接続されたことを検知する。S402でCPU210は印刷装置102bからSIDを取得し、取得されたSIDに対応するオブジェクト名をOSなどから取得する。印刷装置102bのSIDはすでに「1111」に書き換わっているため、「1111」に紐づけられているオブジェクト名「XXXX」が取得される。 In S401, the CPU 210 detects that the printing device 102b is connected to the USB communication interface 213. In S402, the CPU 210 acquires the SID from the printing device 102b, and acquires the object name corresponding to the acquired SID from the OS or the like. Since the SID of the printing apparatus 102b has already been rewritten to "1111", the object name "XXXX" associated with "1111" is acquired.

S403でCPU210は、取得されたデバイス名(「XXXX」)が記憶領域300に登録されているかどうかを判定する。図5(A)が示すように、記憶領域300に記憶されているオブジェクト名502は「XXXX」である。CPU210は、取得されたデバイス名(「XXXX」)と、記憶されているデバイス名(「XXXX」)とが一致するため、S404へ進む。 In S403, the CPU 210 determines whether or not the acquired device name (“XXXX”) is registered in the storage area 300. As shown in FIG. 5A, the object name 502 stored in the storage area 300 is “XXXX”. The CPU 210 proceeds to S404 because the acquired device name (“XXXX”) and the stored device name (“XXXX”) match.

S404でCPU210は、印刷装置102bから固有情報「BBBB」を取得する。S405でCPU210は、記憶領域300から、デバイス名(「XXXX」)に紐づけられている固有情報「AAAA」を取得する。S406でCPU210は両者が一致しないと判定し、S407へ進む。 In S404, the CPU 210 acquires the unique information "BBBB" from the printing device 102b. In S405, the CPU 210 acquires the unique information "AAAA" associated with the device name ("XXXX") from the storage area 300. In S406, the CPU 210 determines that the two do not match, and proceeds to S407.

S407でCPU210は記憶領域300に記憶されている固有情報503を「AAAA」から「BBBB」に書き換える。この時点で記憶領域300は図5(D)に示された状態になる。つまり、デバイス名「XXXX」と固有情報「BBBB」とが紐づけられる。 In S407, the CPU 210 rewrites the unique information 503 stored in the storage area 300 from "AAAA" to "BBBB". At this point, the storage area 300 is in the state shown in FIG. 5 (D). That is, the device name "XXXXX" and the unique information "BBBB" are associated with each other.

S408でCPU201は固有情報「BBBB」が記憶領域300において重複して記憶されているかどうかを判定する。図5(D)が示すように、固有情報の重複は存在しない。よって、CPU210はS411に進み、S411を実行する。つまり、ここでは、デバイスオブジェクトおよび設定情報の削除は実行されない。 In S408, the CPU 201 determines whether or not the unique information "BBBB" is stored in the storage area 300 in duplicate. As shown in FIG. 5D, there is no duplication of unique information. Therefore, the CPU 210 proceeds to S411 and executes S411. That is, the device object and configuration information are not deleted here.

以上で説明されたように、第1の実施例のUSBデバイス制御プログラムによれば、印刷装置102aと印刷装置102bとの入れ替えを行う際、不要に生成されたオブジェクトのみが自動で削除することが可能になる。 As described above, according to the USB device control program of the first embodiment, when the printing device 102a and the printing device 102b are replaced, only the objects generated unnecessarily can be automatically deleted. It will be possible.

<第2の実施例>
第1の実施例ではS409でデバイスオブジェクトがユーザーの関与が無く削除されている。第2の実施例ではデバイスオブジェクトの削除についてユーザーの指示に従うことに特徴がある。第2の実施例において第1の実施例と同様の構成については同様の符号が用いられ、その説明は省略される。
<Second Example>
In the first embodiment, the device object is deleted in S409 without the involvement of the user. The second embodiment is characterized in following the user's instruction regarding the deletion of the device object. In the second embodiment, the same reference numerals are used for the same configurations as in the first embodiment, and the description thereof will be omitted.

図7は第2の実施例における制御方法を示すフローチャートである。なお、図4と図7との違いは、S408とS409との間にS701とS702とが追加されている点である。その他のステップについては、図4と図7とで共通している。S408で重複した固有情報が見つかると、CPU210はS701に進む。 FIG. 7 is a flowchart showing the control method in the second embodiment. The difference between FIGS. 4 and 7 is that S701 and S702 are added between S408 and S409. Other steps are common to FIGS. 4 and 7. If duplicated unique information is found in S408, the CPU 210 proceeds to S701.

S701でCPU210はディスプレイ219に削除の問い合わせを表示する。図8は削除をユーザーに問い合わせるためのメッセージ800を表示するダイアログボックスの一例を示している。メッセージ800は、たとえば、不要なオブジェクト名と、削除の問い合わせとを含んでもよい。メッセージ800を表示するダイアログボックスには、「はい」ボタン801と「いいえ」ボタン802とが含まれてもよい。 In S701, the CPU 210 displays a deletion inquiry on the display 219. FIG. 8 shows an example of a dialog box displaying a message 800 for inquiring the user to delete. The message 800 may include, for example, an unnecessary object name and a deletion inquiry. The dialog box displaying the message 800 may include a "yes" button 801 and a "no" button 802.

S702でCPU201は、ユーザーにより削除指示が入力されたかどうかを判定する。図8に示されたように、CPU210は、キーボード&マウス220により「はい」ボタン801が押されたことを検知すると、削除指示が入力されたと判定する。この場合、CPU210は、S409に進む。一方で、CPU210は、キーボード&マウス220により「いいえ」ボタン802が押されたことを検知すると、削除指示が入力されなかった(削除禁止が入力された)と判定する。この場合、CPU210は、S409およびS410をスキップして、S411に進む。 In S702, the CPU 201 determines whether or not a deletion instruction has been input by the user. As shown in FIG. 8, when the CPU 210 detects that the “Yes” button 801 is pressed by the keyboard & mouse 220, it determines that the deletion instruction has been input. In this case, the CPU 210 proceeds to S409. On the other hand, when the CPU 210 detects that the "No" button 802 is pressed by the keyboard & mouse 220, it determines that the deletion instruction has not been input (the deletion prohibition has been input). In this case, the CPU 210 skips S409 and S410 and proceeds to S411.

このように、第2の実施例によれば、ユーザーがデバイスオブジェクトを意図的に残したいと考えている場合には、デバイスオブジェクトを残しておくことが可能になる。たとえば、ユーザーは、印刷装置102bと印刷装置102aとをそれぞれ異なる設定で使用したかったが、印刷装置102bのSIDを「1111」から「2222」に戻すべきことを失念していることがある。この場合には、メッセージ800が表示される。ユーザーは、このメッセージ800を見ることで、SIDを「1111」から「2222」へ戻し忘れていることに気づき、「いいえ」ボタン802を押し下げて、SID「2222」のためのデバイスオブジェクトと設定を維持することができる。ユーザーは、印刷装置102bのSIDを「1111」から「2222」に戻すことで、SID「2222」のためのデバイスオブジェクトと設定を使用して、印刷装置102bのSIDを使用できる。 Thus, according to the second embodiment, if the user intentionally wants to keep the device object, it is possible to keep the device object. For example, the user wants to use the printing device 102b and the printing device 102a with different settings, but may have forgotten that the SID of the printing device 102b should be changed back from "1111" to "2222". In this case, message 800 is displayed. By looking at this message 800, the user notices that he has forgotten to change the SID back from "1111" to "2222", and presses the "No" button 802 to set the device object and settings for the SID "2222". Can be maintained. By returning the SID of the printing device 102b from "1111" to "2222", the user can use the SID of the printing device 102b by using the device object and the setting for the SID "2222".

<その他の実施例>
第1の実施例と第2の実施例ではUSBデバイスの一例として印刷装置102が紹介された。しかし、本発明の技術思想は印刷装置にのみ限定されないことは明らかであろう。USBデバイスは、USB接続によりホストPC101から指示を受けて動作をするデバイスであれば十分である。たとえば、USBデバイスとしては、イメージスキャナー、ファクシミリ装置、および、カメラなど、どのようなものであってもよい。
<Other Examples>
In the first embodiment and the second embodiment, the printing device 102 was introduced as an example of the USB device. However, it will be clear that the technical idea of the present invention is not limited to the printing apparatus. The USB device is sufficient as long as it is a device that operates by receiving an instruction from the host PC 101 via a USB connection. For example, the USB device may be any image scanner, facsimile machine, camera, or the like.

本発明のUSBデバイス制御プログラムは、初回のドライバインストールの前、または、初回のドライバインストールのときに、ホストPC101へインストールされうる。初回のドライバインストールの前にUSBデバイス制御プログラムがインストールされる場合、S402で通信可能なドライバが存在しないことが考えられる。この場合、CPU210は、ディスプレイ219を通じてドライバのインストールをユーザーに促してもよい。また、CPU210は、ドライバインストールシーケンス内でS402、S412およびS413を実行してもよい。 The USB device control program of the present invention may be installed on the host PC 101 before the first driver installation or at the time of the first driver installation. If the USB device control program is installed before the initial driver installation, it is possible that there is no driver that can communicate with S402. In this case, the CPU 210 may prompt the user to install the driver through the display 219. The CPU 210 may also execute S402, S412 and S413 within the driver installation sequence.

第1の実施例と第2の実施例では、一定周期でUSBデバイス制御プログラムが実行されているが、これは一例に過ぎない。たとえば、ホストPC101が起動している間は常時S401でUSBデバイスの接続を監視するような常時監視が採用されてもよい。 In the first embodiment and the second embodiment, the USB device control program is executed at regular intervals, but this is only one example. For example, constant monitoring may be adopted such that the connection of the USB device is constantly monitored by S401 while the host PC 101 is running.

<実施例から導き出される技術思想>
[観点1]
図2が示すように、USB通信インターフェイス213はUSBデバイスを接続可能な接続手段の一例である。OSおよびUSBデバイス制御プログラムおよびCPU210は取得手段として機能してもよい。取得手段は、接続手段に接続されたUSBデバイスからUSBデバイスのベンダーを示す第一ID、USBデバイスのプロダクトを示す第二ID、USBデバイスのシリアル情報を示す第三IDに加えて、固有情報である第四IDを取得する。CPU210は、第一ID、第二IDおよび第三IDに基づきUSBデバイスを制御するためのドライバをメインメモリ212にロードし、ドライバを制御するためのデバイスオブジェクトをメインメモリ212に生成する生成手段として機能する。メインメモリ212の記憶領域300は、デバイスオブジェクトのデバイス名と固有情報とを紐づけるエントリーを記憶する記憶手段として機能する。CPU210は、所定の削除条件が満たされると、デバイスオブジェクトと当該デバイスオブジェクトに紐づけられたエントリーを削除する削除手段として機能する。所定の削除条件は、USBデバイスから取得された固有情報と同一の固有情報を有する複数のエントリーが重複して記憶手段に記憶されていることである。これにより、重複したデバイスオブジェクトを削除することが可能となる。これは、メインメモリ212などのハードウエアリソースの有効活用につながるであろう。
<Technical Thought Derived from Examples>
[Viewpoint 1]
As shown in FIG. 2, the USB communication interface 213 is an example of a connection means to which a USB device can be connected. The OS and USB device control program and the CPU 210 may function as acquisition means. The acquisition means is a unique information in addition to the first ID indicating the vendor of the USB device, the second ID indicating the product of the USB device, and the third ID indicating the serial information of the USB device from the USB device connected to the connecting means. Acquire a certain fourth ID. The CPU 210 loads the driver for controlling the USB device based on the first ID, the second ID, and the third ID into the main memory 212, and generates a device object for controlling the driver in the main memory 212 as a generation means. Function. The storage area 300 of the main memory 212 functions as a storage means for storing an entry that associates the device name of the device object with the unique information. When a predetermined deletion condition is satisfied, the CPU 210 functions as a deletion means for deleting the device object and the entry associated with the device object. The predetermined deletion condition is that a plurality of entries having the same unique information as the unique information acquired from the USB device are duplicately stored in the storage means. This makes it possible to delete duplicate device objects. This will lead to effective utilization of hardware resources such as main memory 212.

[観点2]
記憶領域300は、接続手段に接続されたUSBデバイスについてのデバイスオブジェクトのデバイス名を含むエントリーをまだ記憶していない場合がある。この場合、CPU210および記憶領域300は、当該デバイスオブジェクトのデバイス名と、当該USBデバイスから取得された固有情報とを関連付けたエントリーを記憶するように構成されていてもよい。これにより、第四のIDである固有情報が記憶領域300に新規に登録されるようになる。
[Viewpoint 2]
The storage area 300 may not yet store an entry containing the device name of the device object for the USB device connected to the connecting means. In this case, the CPU 210 and the storage area 300 may be configured to store an entry in which the device name of the device object and the unique information acquired from the USB device are associated with each other. As a result, the unique information, which is the fourth ID, is newly registered in the storage area 300.

[観点3]
記憶領域300は、接続手段に接続されたUSBデバイスについてのデバイスオブジェクトのデバイス名を含むエントリーをすでに記憶している場合がある。この場合、CPU210および記憶領域300は、当該エントリーに含まれる固有情報を、当該USBデバイスから取得された固有情報に書き換えまたは更新するように構成されていてもよい。これにより、すでに存在するデバイスオブジェクトが使用可能となる。
[Viewpoint 3]
The storage area 300 may already store an entry containing the device name of the device object for the USB device connected to the connecting means. In this case, the CPU 210 and the storage area 300 may be configured to rewrite or update the unique information included in the entry to the unique information acquired from the USB device. This makes the device object that already exists available.

[観点4]
所定の削除条件は、固有情報に書き換えまたは更新が実行された後において、USBデバイスから取得された固有情報と同一の固有情報を有する複数のエントリーが重複して記憶手段に記憶されていることであってもよい。固有情報を書き換えると、同一の固有情報を有する複数のエントリーが重複することがある。重複したエントリーの存在は、不要なデバイスオブジェクトの存在を示唆している。よって、この場合は、不要なエントリーとデバイスオブジェクトが削除される。
[Viewpoint 4]
The predetermined deletion condition is that, after rewriting or updating to the unique information, a plurality of entries having the same unique information as the unique information acquired from the USB device are duplicately stored in the storage means. There may be. When the unique information is rewritten, multiple entries having the same unique information may be duplicated. The presence of duplicate entries suggests the presence of unwanted device objects. Therefore, in this case, unnecessary entries and device objects are deleted.

[観点5]
複数のエントリーが重複して記憶手段に記憶されている場合がある。この場合、CPU210は、デバイスオブジェクトを削除するかどうかをユーザーに問い合わせる問い合わせ手段として機能する。CPU210は、ユーザーがデバイスオブジェクトを削除することを指示した場合、デバイスオブジェクトとエントリーとを削除する。CPU210は、ユーザーがデバイスオブジェクトを削除することを指示しなかった場合、デバイスオブジェクトとエントリーとを削除しない。これにより、ユーザーの意思を反映させることが可能となる。
[Viewpoint 5]
Multiple entries may be duplicated and stored in the storage means. In this case, the CPU 210 functions as an inquiry means for asking the user whether to delete the device object. When the user instructs to delete the device object, the CPU 210 deletes the device object and the entry. The CPU 210 does not delete the device object and the entry if the user does not instruct to delete the device object. This makes it possible to reflect the user's intention.

[観点6、7]
CPU210は制御プログラム(例:USBデバイス制御プログラム)を実行するプロセッサの一例である。プロセッサは、制御プログラムを実行することで、取得手段、および削除手段として機能してもよい。プロセッサは、制御プログラムを、常時実行するか、または、一定周期おきに繰り返し実行してもよい。USBデバイス制御プログラムは、ドライバプログラムとは異なるプログラムである。制御プログラムは、USBデバイスのドライバとともに、情報処理装置(例:ホストPC101)にインストールされるプログラムであってもよい。
[Viewpoints 6 and 7]
The CPU 210 is an example of a processor that executes a control program (eg, a USB device control program). The processor may function as an acquisition means and a deletion means by executing a control program. The processor may execute the control program at all times or repeatedly at regular intervals. The USB device control program is a program different from the driver program. The control program may be a program installed in the information processing device (eg, host PC 101) together with the driver of the USB device.

[観点8~10]
第四IDである固有情報は、USBデバイスのシリアルナンバーであってもよい。第四IDである固有情報は、書き換え不可能なIDであってもよい。これにより、第四IDである固有情報のユニーク性が維持される。USBデバイスのシリアル情報を示す第三IDは、書き換え可能なIDであってもよい。これにより、USBデバイスの用途をユーザーの意思に応じて変えることができる。
[Viewpoints 8 to 10]
The unique information as the fourth ID may be the serial number of the USB device. The unique information which is the fourth ID may be a non-rewritable ID. As a result, the uniqueness of the unique information which is the fourth ID is maintained. The third ID indicating the serial information of the USB device may be a rewritable ID. As a result, the usage of the USB device can be changed according to the user's intention.

[観点11]
生成手段は、情報処理装置のオペレーティングシステムに含まれていてもよい。たとえば、デバイスオブジェクトの生成はOSのPnP機能により実行されてもよい。
[Viewpoint 11]
The generation means may be included in the operating system of the information processing apparatus. For example, the generation of the device object may be executed by the PnP function of the OS.

[観点12]
本発明によれば、情報処理装置に接続されるUSBデバイスを制御する制御方法も提供される。情報処理装置に第一のUSBデバイスが接続されることがある。この場合、第一のUSBデバイスから第一のUSBデバイスのベンダーを示す第一ID、USBデバイスのプロダクトを示す第二ID、USBデバイスのシリアル情報を示す第三ID、固有情報である第四IDが取得される。第一ID、第二IDおよび第三IDに基づき第一のUSBデバイスを制御するためのドライバがメインメモリにロードされ、ドライバを制御するためのデバイスオブジェクトがメインメモリに生成される。第一のUSBデバイスのためのデバイスオブジェクトのデバイス名と第一のUSBデバイスの固有情報とを紐づけるエントリーが記憶手段に記憶される。情報処理装置から第一のUSBデバイスが取り外された後に、第二のUSBデバイスが情報処理装置に接続されることがある。この場合、第二のUSBデバイスから第二のUSBデバイスのベンダーを示す第一ID、USBデバイスのプロダクトを示す第二ID、USBデバイスのシリアル情報を示す第三IDに加えて、固有情報である第四IDが取得される。第二のUSBデバイスから取得された固有情報と、記憶手段に記憶されている第一のUSBデバイスについての固有情報とが一致する場合がある。この場合、記憶手段に記憶されている第一のUSBデバイスについての固有情報が、第二のUSBデバイスから取得された固有情報に書き換えまたは更新される。記憶手段において、第二のUSBデバイスから取得された固有情報と一致する固有情報を有する他のエントリーが存在する場合がある。この場合、当該他のエントリーが記憶手段から削除されるとともに、当該他のエントリーに紐づけられたデバイスオブジェクトが削除される。
[Viewpoint 12]
INDUSTRIAL APPLICABILITY According to the present invention, a control method for controlling a USB device connected to an information processing apparatus is also provided. The first USB device may be connected to the information processing device. In this case, the first ID indicating the vendor of the first USB device from the first USB device, the second ID indicating the product of the USB device, the third ID indicating the serial information of the USB device, and the fourth ID which is the unique information. Is obtained. A driver for controlling the first USB device based on the first ID, the second ID, and the third ID is loaded in the main memory, and a device object for controlling the driver is generated in the main memory. An entry that associates the device name of the device object for the first USB device with the unique information of the first USB device is stored in the storage means. After the first USB device is removed from the information processing device, the second USB device may be connected to the information processing device. In this case, it is unique information in addition to the first ID indicating the vendor of the second USB device from the second USB device, the second ID indicating the product of the USB device, and the third ID indicating the serial information of the USB device. The fourth ID is acquired. The unique information acquired from the second USB device may match the unique information about the first USB device stored in the storage means. In this case, the unique information about the first USB device stored in the storage means is rewritten or updated with the unique information acquired from the second USB device. In the storage means, there may be other entries with unique information that matches the unique information obtained from the second USB device. In this case, the other entry is deleted from the storage means, and the device object associated with the other entry is deleted.

[観点13]
観点12に記載の制御方法をコンピュータに実行させる制御プログラムが提供されてもよい。制御プログラムは、コンピュータ可読記憶媒体(例:CD-ROM、USBメモリ)からホストPC101にインストールされてもよい。
[Viewpoint 13]
A control program may be provided that causes a computer to execute the control method according to the viewpoint 12. The control program may be installed on the host PC 101 from a computer-readable storage medium (eg, CD-ROM, USB memory).

発明は上記の実施形態に制限されるものではなく、発明の要旨の範囲内で、種々の変形・変更が可能である。 The invention is not limited to the above embodiment, and various modifications and changes can be made within the scope of the gist of the invention.

101:ホストPC、102:印刷装置、210:CPU、212:メインメモリ、213:USB通信I/F 101: Host PC, 102: Printing device, 210: CPU, 212: Main memory, 213: USB communication I / F

Claims (13)

USBデバイスを接続可能な接続手段と、
前記接続手段に接続された前記USBデバイスから前記USBデバイスのベンダーを示す第一ID、前記USBデバイスのプロダクトを示す第二ID、前記USBデバイスのシリアル情報を示す第三IDに加えて、固有情報である第四IDを取得する取得手段と、
前記第一ID、前記第二IDおよび前記第三IDに基づき前記USBデバイスを制御するためのドライバをメインメモリにロードし、前記ドライバを制御するためのデバイスオブジェクトをメインメモリに生成する生成手段と、
前記デバイスオブジェクトのデバイス名と前記固有情報とを紐づけるエントリーを記憶する記憶手段と、
所定の削除条件が満たされると、前記デバイスオブジェクトと当該デバイスオブジェクトに紐づけられた前記エントリーを削除する削除手段と、を有し、
前記所定の削除条件は、前記USBデバイスから取得された固有情報と同一の固有情報を有する複数のエントリーが重複して前記記憶手段に記憶されていることである、ことを特徴とする情報処理装置。
A connection method that can connect a USB device,
In addition to the first ID indicating the vendor of the USB device, the second ID indicating the product of the USB device, and the third ID indicating the serial information of the USB device from the USB device connected to the connecting means, unique information The acquisition method for acquiring the fourth ID, which is
A generation means for loading a driver for controlling the USB device based on the first ID, the second ID, and the third ID into the main memory, and generating a device object for controlling the driver in the main memory. ,
A storage means for storing an entry that associates the device name of the device object with the unique information, and
When a predetermined deletion condition is satisfied, the device object and a deletion means for deleting the entry associated with the device object are provided.
The predetermined deletion condition is an information processing apparatus characterized in that a plurality of entries having the same unique information as the unique information acquired from the USB device are duplicately stored in the storage means. ..
前記記憶手段は、前記接続手段に接続された前記USBデバイスについての前記デバイスオブジェクトのデバイス名を含むエントリーをまだ記憶していない場合に、当該デバイスオブジェクトのデバイス名と、当該USBデバイスから取得された固有情報とを関連付けたエントリーを記憶するように構成されている、ことを特徴とする請求項1に記載の情報処理装置。 The storage means has not yet stored an entry containing the device name of the device object for the USB device connected to the connection means, the device name of the device object and the device name obtained from the USB device. The information processing apparatus according to claim 1, wherein the information processing apparatus is configured to store an entry associated with unique information. 前記記憶手段は、前記接続手段に接続された前記USBデバイスについての前記デバイスオブジェクトのデバイス名を含むエントリーをすでに記憶している場合に、当該エントリーに含まれる固有情報を、当該USBデバイスから取得された固有情報に書き換えまたは更新するように構成されている、ことを特徴とする請求項2に記載の情報処理装置。 When the storage means has already stored an entry including the device name of the device object for the USB device connected to the connection means, the unique information contained in the entry is acquired from the USB device. The information processing apparatus according to claim 2, wherein the information processing apparatus is configured to be rewritten or updated with unique information. 前記所定の削除条件は、前記固有情報に書き換えまたは更新が実行された後において、前記USBデバイスから取得された固有情報と同一の固有情報を有する複数のエントリーが重複して前記記憶手段に記憶されていることである、ことを特徴とする請求項3に記載の情報処理装置。 Under the predetermined deletion condition, after rewriting or updating to the unique information, a plurality of entries having the same unique information as the unique information acquired from the USB device are duplicately stored in the storage means. The information processing apparatus according to claim 3, wherein the information processing apparatus is to be used. 前記複数のエントリーが重複して前記記憶手段に記憶されている場合に、前記デバイスオブジェクトを削除するかどうかをユーザーに問い合わせる問い合わせ手段をさらに有し、
前記削除手段は、
前記ユーザーが前記デバイスオブジェクトを削除することを指示した場合、前記デバイスオブジェクトと前記エントリーとを削除し、
前記ユーザーが前記デバイスオブジェクトを削除することを指示しなかった場合、前記デバイスオブジェクトと前記エントリーとを削除しない、
ことを特徴とする請求項1ないし4のいずれか一項に記載の情報処理装置。
Further having an inquiry means asking the user whether to delete the device object when the plurality of entries are duplicated and stored in the storage means.
The deletion means
When the user instructs to delete the device object, the device object and the entry are deleted.
If the user does not instruct to delete the device object, the device object and the entry are not deleted.
The information processing apparatus according to any one of claims 1 to 4, wherein the information processing apparatus is characterized by the above.
制御プログラムを実行するプロセッサをさらに有し、
前記プロセッサは、前記制御プログラムを実行することで、前記取得手段、および前記削除手段として機能し、
前記プロセッサは、前記制御プログラムを、常時実行するか、または、一定周期おきに繰り返し実行する、ことを特徴とする請求項1ないし5のいずれか一項に記載の情報処理装置。
Has more processors to execute control programs,
By executing the control program, the processor functions as the acquisition means and the deletion means.
The information processing apparatus according to any one of claims 1 to 5, wherein the processor executes the control program at all times or repeatedly at regular intervals.
前記制御プログラムは、前記USBデバイスのドライバとともに、前記情報処理装置にインストールされるプログラムである、ことを特徴とする請求項6に記載の情報処理装置。 The information processing device according to claim 6, wherein the control program is a program installed in the information processing device together with the driver of the USB device. 前記第四IDである前記固有情報は、前記USBデバイスのシリアルナンバーである、ことを特徴とする請求項1ないし7のいずれか一項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 7, wherein the unique information, which is the fourth ID, is a serial number of the USB device. 前記第四IDである前記固有情報は、書き換え不可能なIDである、ことを特徴とする請求項1ないし8のいずれか一項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 8, wherein the unique information, which is the fourth ID, is a non-rewritable ID. 前記USBデバイスのシリアル情報を示す前記第三IDは、書き換え可能なIDであることを特徴とする請求項1ないし9のいずれか一項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 9, wherein the third ID indicating serial information of the USB device is a rewritable ID. 前記生成手段は、前記情報処理装置のオペレーティングシステムに含まれていることを特徴とする請求項1ないし10のいずれか一項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 10, wherein the generation means is included in the operating system of the information processing apparatus. 情報処理装置に接続されるUSBデバイスを制御する制御方法であって、
前記情報処理装置に第一のUSBデバイスが接続されると、
前記第一のUSBデバイスから前記第一のUSBデバイスのベンダーを示す第一ID、前記USBデバイスのプロダクトを示す第二ID、前記USBデバイスのシリアル情報を示す第三IDに加えて、固有情報である第四IDを取得することと、
前記第一ID、前記第二IDおよび前記第三IDに基づき前記第一のUSBデバイスを制御するためのドライバをメインメモリにロードし、前記ドライバを制御するためのデバイスオブジェクトをメインメモリに生成することと、
前記第一のUSBデバイスのための前記デバイスオブジェクトのデバイス名と前記第一のUSBデバイスの前記固有情報とを紐づけるエントリーを記憶手段に記憶することと、
前記情報処理装置から前記第一のUSBデバイスが取り外された後に、第二のUSBデバイスが前記情報処理装置に接続されると、
前記第二のUSBデバイスから前記第二のUSBデバイスのベンダーを示す第一ID、前記USBデバイスのプロダクトを示す第二ID、前記USBデバイスのシリアル情報を示す第三IDに加えて、固有情報である第四IDを取得することと、
前記第二のUSBデバイスから取得された固有情報と、前記記憶手段に記憶されている前記第一のUSBデバイスについての固有情報とが一致すると、前記記憶手段に記憶されている前記第一のUSBデバイスについての固有情報を、前記第二のUSBデバイスから取得された固有情報に書き換えまたは更新することと、
前記記憶手段において、前記第二のUSBデバイスから取得された固有情報と一致する固有情報を有する他のエントリーが存在すると、当該他のエントリーを前記記憶手段から削除するとともに、当該他のエントリーに紐づけられたデバイスオブジェクトを削除することと、
を有することを特徴とする制御方法。
A control method that controls a USB device connected to an information processing device.
When the first USB device is connected to the information processing device,
In addition to the first ID indicating the vendor of the first USB device, the second ID indicating the product of the USB device, and the third ID indicating the serial information of the USB device from the first USB device, unique information is used. Acquiring a certain fourth ID and
A driver for controlling the first USB device based on the first ID, the second ID, and the third ID is loaded into the main memory, and a device object for controlling the driver is generated in the main memory. That and
To store in the storage means an entry that associates the device name of the device object for the first USB device with the unique information of the first USB device.
When the second USB device is connected to the information processing device after the first USB device is removed from the information processing device,
In addition to the first ID indicating the vendor of the second USB device, the second ID indicating the product of the USB device, and the third ID indicating the serial information of the USB device from the second USB device, unique information is used. Acquiring a certain fourth ID and
When the unique information acquired from the second USB device and the unique information about the first USB device stored in the storage means match, the first USB stored in the storage means. Rewriting or updating the unique information about the device to the unique information acquired from the second USB device, and
If there is another entry in the storage means that has unique information that matches the unique information acquired from the second USB device, the other entry is deleted from the storage means and linked to the other entry. Deleting the attached device object and
A control method characterized by having.
請求項12に記載の制御方法をコンピュータに実行させる制御プログラム。 A control program that causes a computer to execute the control method according to claim 12.
JP2020189651A 2020-11-13 2020-11-13 Information processing apparatus, control method, and program Pending JP2022078756A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020189651A JP2022078756A (en) 2020-11-13 2020-11-13 Information processing apparatus, control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020189651A JP2022078756A (en) 2020-11-13 2020-11-13 Information processing apparatus, control method, and program

Publications (1)

Publication Number Publication Date
JP2022078756A true JP2022078756A (en) 2022-05-25

Family

ID=81707098

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020189651A Pending JP2022078756A (en) 2020-11-13 2020-11-13 Information processing apparatus, control method, and program

Country Status (1)

Country Link
JP (1) JP2022078756A (en)

Similar Documents

Publication Publication Date Title
US8261292B2 (en) Information processing apparatus, method of controlling the same, program, and recording medium
JP6874405B2 (en) Information processing equipment, programs, systems
JP5114932B2 (en) Document processing apparatus and document processing program
JP2008238799A (en) Image forming device
US20160070557A1 (en) Information processing apparatus, information processing method, and information processing system
JP7135345B2 (en) Information processing device, information processing system and information processing program
JP4610594B2 (en) Document processing method, document processing system, application, and portable storage device
JP5428816B2 (en) Image forming apparatus, data control method, and program
JP2022078756A (en) Information processing apparatus, control method, and program
JP4087788B2 (en) Information processing apparatus, control method therefor, and program
US20100189459A1 (en) Image forming apparatus and image forming system
JP5133230B2 (en) Information processing apparatus, information processing method, and program
US20130067452A1 (en) Management server, host device, and application management method
JP4847280B2 (en) Print data management apparatus, print data management program, and recording medium
US10545768B2 (en) Information processing apparatus, information processing method, and recording medium
JP4957506B2 (en) Management program, information processing apparatus, and information processing system
JP2007288410A (en) Information processing apparatus, data processing method, storage medium, and program
JP4726250B2 (en) Information processing apparatus, control method therefor, and computer program
US11138051B2 (en) Information processing apparatus and method of transferring data
JP2006107388A (en) Information processor, and information processing method and program
JP7087583B2 (en) Image forming device and program
JP2003076520A (en) System and method for managing information
JP7106870B2 (en) Program update system and program update method
JPH11355545A (en) Data output device
JP2023083857A (en) Terminal device and transfer method of print setting

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20210203