Клубове Дир.бг
powered by diri.bg
търси в Клубове diri.bg Разширено търсене

Вход
Име
Парола

Клубове
Dir.bg
Взаимопомощ
Горещи теми
Компютри и Интернет
Контакти
Култура и изкуство
Мнения
Наука
Политика, Свят
Спорт
Техника
Градове
Религия и мистика
Фен клубове
Хоби, Развлечения
Общества
Я, архивите са живи
Клубове Дирене Регистрация Кой е тук Въпроси Списък Купувам / Продавам 05:38 24.09.24 
Компютри и Интернет
   >> Delphi
Всички теми Следваща тема *Кратък преглед

Тема Откриване на USB портове  
Автор Mixy (почетен член)
Публикувано01.05.03 11:06



Някой работил ли е с USB портовете под Delphi? Налага ми се да знам, дали на компютъра, на който работи програмата ми има инсталирани USB портове (USB Root Hub), колко са и колко в момента са свободни/заети. Пробвах с търсене и четене от Registry, но това определено не е най-сигурния подход за намиране на USB. Все още не съм стигнал до съществото на връзката (драйвери, протокол за комуникация и т.н.), но ако някой се е занимавал, нека каже няколко думи по въпроса. 10x предварително

Mixy


Тема Re: Откриване на USB портовенови [re: Mixy]  
Автор PecheniaМодератор (нема лабаво ;-)
Публикувано01.05.03 16:26



Като рових в google, тук видях интересно описание:
http://www.jameco.com/Jameco/images/cc-images/cc-zerkus-106.pdf
А в Torry има компоненти претендиращи да показват драйвери и прочее:
http://www.torry.net/systeminfo.htm

чети и дишай по-леко


Тема Re: Откриване на USB портовенови [re: Pechenia]  
Автор Mixy (почетен член)
Публикувано01.05.03 23:51



Мерси за инфото. Прегледах PDF файла, но както и няколко други мои находки няма да ми свърши работа. Колкото до компонентите в Torry, аз първо тях открих. Единия е JsSysInfo v.2.0 PR 7b (SW, $60) и вероятно върши работа, но не ми се плаща само за проба, а другия е SystemInfo v.1.4 (FW), но при мен нещо се дъни в частта за разпознаване на IDE устройствата (демото гърми с Range Check Error, а сорс няма). Явно не търся правилно и ще трябва да се насоча към откирване на хардуерни компоненти по дънната платка или в чипсета... Иначе спецификации и протоколи за USB - колкото щеш ->

, но как да detect-на USB хъба на дъното?

Mixy

Тема Re: Откриване на USB портовенови [re: Mixy]  
Автор PhantomASМодератор (няма)
Публикувано02.05.03 08:19



http://www.mitec.d2.cz/ - много сериозно нещо за system info - преди доста време го бях публикувал - но явно никой не му е обърнал внимание. Фрее / без сорс.

---
Е т'ва е живот!


Тема Re: Откриване на USB портовенови [re: PhantomAS]  
Автор Mixy (почетен член)
Публикувано02.05.03 12:53



Да, компонента на Mitec наистина е много як, с големи възможности за извличане на подробна системна информация. Но без сорс няма да ми е полезен. Трябва ми нещо като guide или reference за откриване на USB под Windows. Рових и в MSDN, но моето CD е от преди няколко години и в него нищо не се споменава за USB освен общи приказки, а сайта на M$ беше претоварен (или по-скоро моята връзка беше скапана) и не можа да ми върне резултати от търсенето. Мерси все пак!

Mixy


Тема Re: Откриване на USB портовенови [re: Mixy]  
Авторv_automation (Нерегистриран)
Публикувано03.05.03 05:20



Zdravey!
Vij tova dali ste stane.
------------------------------------------------------------------------

PSS ID Number: Q311272

Article Last Modified on 08-6-2002


--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft Windows 2000 Driver Development Kit (DDK)
Microsoft Windows XP Driver Development Kit (DDK)

--------------------------------------------------------------------------------


Summary
The "DevCon" utility is a command line utility that acts as an alternative to Device Manager. It allows you to enable, disable, restart, update, remove, and query individual devices or groups of devices. DevCon provides information that is relevant to the developer and is not available in Device Manager.

DevCon is designed for use on Windows 2000 and Windows XP. It will not work on Microsoft Windows 95, Windows 98, or Windows Millennium Edition.



More Information
DevCon is not redistributable. It is provided for use as a debugging and development tool. You can freely modify DevCon for private use. The sample demonstrates how to use the SetupAPI and CfgMgr32 APIs together effectively to enumerate devices and perform device operations.

The following file is available for download from the Microsoft Download Center:


DevCon.exe
Release Date: NOV-01-2001

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on secure servers that prevent any unauthorized changes to the file.

The DevCon.exe file contains the following files:

File Description
I386\DevCon.exe 32-bit DevCon tool binary. This will not function completely on 64-bit Windows.
Ia64\DevCon.exe 64-bit DevCon tool binary.


NOTE: The source code for DevCon is also available in the Windows XP DDK (which is available from http://www.microsoft.com/ddk/) under DDK root\Src\Setup\Devcon, along with documentation.
Using DevCon
DevCon is a command-line utility with built-in documentation. If you run the command line devcon help, the following list of commands and descriptions will appear. The command devcon help command will give more detailed help on any command. With some of these commands, you can specify a remote target computer. These commands will work if you are using the 32-bit version of DevCon on WOW64.
Device Console Help:
devcon.exe [-r] [-m:\\<machine>] <command> [<arg>...]
-r if specified will reboot machine after command is complete, if needed.
<machine> is name of target machine.
<command> is command to perform (see below).
<arg>... is one or more arguments if required by command.
For help on a specific command, type: devcon.exe help <command>
classfilter Allows modification of class filters.
classes List all device setup classes.
disable Disable devices that match the specific hardware or
instance ID.
driverfiles List driver files installed for devices.
drivernodes Lists all the driver nodes of devices.
enable Enable devices that match the specific hardware or
instance ID.
find Find devices that match the specific hardware or
instance ID.
findall Find devices including those that are not present.
help Display this information.
hwids Lists hardware ID's of devices.
install Manually install a device.
listclass List all devices for a setup class.
reboot Reboot local machine.
remove Remove devices that match the specific hardware or
instance ID.
rescan Scan for new hardware.
resources Lists hardware resources of devices.
restart Restart devices that match the specific hardware or
instance ID.
stack Lists expected driver stack of devices.
status List running status of devices.
update Manually update a device.
Example DevCon Commands
devcon find *

Lists device instances of all devices that are present on the local computer.

devcon find pci\*

Lists all known Peripheral Component Interconnect (PCI) devices that are on the local computer (this command assumes that a device is PCI if it has a hardware ID that is prefixed by "PCI\").

devcon -m:\\test find pci\*

Lists all known PCI devices on the computer "test". ( -m allows you to specify a target computer. Interprocess communication (IPC) access to the computer is required.)

devcon classes

Lists all known setup classes. The output contains the short nonlocalized name (for example, "USB") and the descriptive name (for example, "Universal Serial Bus controllers").

devcon listclass usb 1394

Lists all devices that are present for each class named (in this case, USB and 1394).

devcon find =ports *pnp*

Lists devices that are present that are a member of the ports setup class and contain "PNP" in their hardware ID.

devcon find =ports @root\*

Lists devices that are present that are a member of the ports setup class and are in the "root" branch of the enum tree (the instance ID is prefixed by "root\"). Note that you should not make any programmatic assumption about how an instance ID is formatted. To determine root devices, you can check device status bits. This feature is included in DevCon to aid in debugging.

devcon findall =ports

Lists "nonpresent" devices along with devices that are present for the ports class. This will include devices that have been removed, devices that have been moved from one slot to another, and, in some cases, devices that have been enumerated differently due to a BIOS change.

devcon status @pci\*

Lists the status of each device present that has an instance ID that begins with "pci\".

devcon status @ACPI\PNP0501\1

Lists the status of a specific device instance, in this case an Advanced Configuration and Power Interface (ACPI)-enumerated serial port.

devcon status @root\rdp_mou\0000

Lists the status of the Microsoft Terminal Server or Terminal Services mouse driver.

devcon status *PNP05*

Lists the status of all COM ports.

devcon resources =ports

Lists the resources that are used by all devices in the ports setup class.

devcon driverfiles =ports

Lists files that are associated with each device in the ports setup class.

devcon stack =ports

Lists the expected driver stack for the device. This includes device and class upper/lower filters as well as the controlling service.

devcon drivernodes @ROOT\PCI_HAL\PNP0A03

Lists all compatible drivers for the device "ROOT\PCI_HAL\PNP0A03". This can be used to determine why an integral device information file (INF) was chosen instead of a third-party INF.

devcon remove @usb\*

Removes all USB devices. Devices that are removed will be listed along with removal status.

devcon rescan

Rescans for new Plug and Play devices.

devcon update mydev.inf *pnp0501

Updates all devices that exactly match the hardware ID "*pnp0501" in order to use the best driver in Mydev.inf that is associated with the hardware ID *pnp0501. Note that this will force all devices to use the driver in Mydev.inf even if there is a better match already on the system. This is useful when you want to install new versions of drivers during development before you obtain a signature. It only affects the devices that match the specified hardware ID, and not child devices. If the specified .inf file is unsigned, Windows may display a dialog box that prompts you to confirm whether the driver should be installed. If a restart is required, this will be reported and DevCon will return with an error level of "1". If you specify " -r", this will cause a restart to occur automatically if one is required.

devcon -r install Windows directory\Inf\Netloop.inf *MSLOOP

Installs a new instance of the Microsoft loopback adaptor. This will create a new root-enumerated device node to allow you to install a "virtual device," such as the loopback adaptor. This command also restarts the computer silently if a restart is required.

devcon disable *MSLOOP

Disables all devices that have a hardware ID that ends in "MSLOOP" (including "*MSLOOP").

devcon enable '*MSLOOP

Enables all devices that have a hardware ID of "*MSLOOP". The single quotation mark indicates that the hardware ID must be taken literally (in other words, the asterisk ["*"] actually is an asterisk; it is not a wildcard character).

devcon restart =net @'ROOT\*MSLOOP\0000

Restarts the loopback adaptor "ROOT\*MSLOOP\0000". The single quotation mark indicates that the instance ID must be taken literally.

Devcon classfilter upper !filter1 !filter2

Deletes the two specified filters.

Devcon classfilter lower !badfilter +goodfilter

Replaces the "badfilter" with the "goodfilter".


NOTES
Devcon will return an error level for use in scripts:


"0" indicates a success.
"1" indicates that a restart is required.
"2" indicates a failure.
"3" indicates a syntax error.
If you specify -r and a restart is required, the restart will occur without warning once all devices have been processed.


If you specify -m:\\ computer and the command will not work for a remote computer, an error will be reported.


Devcon allows wildcards in instance IDs for interactive convenience. Do not make any assumption about the format of an instance ID from computer to computer and from operating system version to operating system version.



Additional query words: DevCon

Keywords: kbfile kbDDK kbDSupport kbGrpDSNTDDK
Issue Type: kbhowto
Technology: kbwin2000Search kbwin2000DDK kbAudDeveloper kbWinDDKSearch kbWinDDK kbWinXPDDKSearch



Тема Re: Откриване на USB портовенови [re: v_automation]  
Автор Mixy (почетен член)
Публикувано03.05.03 11:11



Мерси, ще го погледна, пък да видим какво ще излезе.

Mixy



Всички темиСледваща тема*Кратък преглед
Клуб :  


Clubs.dir.bg е форум за дискусии. Dir.bg не носи отговорност за съдържанието и достоверността на публикуваните в дискусиите материали.

Никаква част от съдържанието на тази страница не може да бъде репродуцирана, записвана или предавана под каквато и да е форма или по какъвто и да е повод без писменото съгласие на Dir.bg
За Забележки, коментари и предложения ползвайте формата за Обратна връзка | Мобилна версия | Потребителско споразумение
© 2006-2024 Dir.bg Всички права запазени.