Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with USB component

Status
Not open for further replies.

castore

Programmer
Apr 1, 2005
18
0
0
IT
I'm new in delphi ....
I must control usb port to discover if a device is connected.
I found on torry's


somethig that i think is what i'm looking for.

But i'm not able to use it.
Please can somebody help me and explain how to use it in a my application?

Thanks to everyone in advance
castore
 
An explanation of "why you can't use it" and "my application" would be prudent here.

Firstly, we have no clue what your application is/does

Secondly, "I'm not able to use it" is ambiguous. Does that mean, 1) you implemented the code and it doesn't work 2) you can't figure out how to integrate Torry's code into yours 3) you can't get it to compile once you put the code in 4) etc 5) etc

Could you explain further?


Regards,
JGS
 
Yes, excuse me, you are right

As i said i'm newbie. I use Dlephi 7 since less than 2 months.
I must write a program that need to alert when somebody inserts a device in one of the pc's USB port.

I have no idea how to control USB port in Delphi, so i looked for some component in Torry's. There, i found a unit that i suppose does what i need.

I have no experience with component's code.
In this case i don't know how to use the code i downloaded from torry's.
I tried the way 'Install Component' into new package.
All was ok. So now I can see the package inside all other packages; also library paths is upgraded.

Now?
In my program how can i call (and what is ) the function that returns the result that says if a device is connected to any of USB port.
In have read the code but it's very difficult for me.
I think i have to use WMDeviceChange procedure but i don't know how i can do.
Perhaps i'm on the wrong way.
Perhaps i have to add the unit to my project? (I think not)

Ok i have still to study a lot, but at the meantime i must work, and now i have this problem to solve.

Thanks for your interest i appreciate you.
Excuse for my poor english. I hope you all can understand.
 
I forgot to say that after installComponent, no component was added to palette, i see only the package, as i named it, in component/Install Packages - Design packages

More, library path was upgraded.

Regards
Castore
 
I solved at least!

In the component is missing the procedure Register !!

it works fine, now

Thanks to everyone who dedicated some time to me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top