![]() |
|
#1
|
|||
|
|||
How to check if pen drive is connected?Hello
I write console application in C and i want this application to detect if pen drive is inserted in to usb. I have read forums and i think that i have to create window and this window will recive information from system and then i can check WM_DEVICECHANGE (i`m not 100% sure if it is right solution). Detecting pen drive is not a main task of this application, so i have to do it i new theard. My problem now is that if i create window in new theard, nothing happens - window doesn`t show up although the i used ShowWindow() function. I would be very grateful for any help. regards x51 |
|||
|
#2
|
||||
|
||||
Re: How to check if pen drive is connected?Quote:
Without CODE this post is completely meaningless... FYI: I, when used as a pronoun, is ALWAYS capitalized. Mxb |
|
#3
|
|||
|
|||
Re: How to check if pen drive is connected?Quote:
English is not my native language and I don`t ask you for grammar advice, and i don`t know for what you need code, my question now (if you didn`t understand it) is how to create window in new thread of console aplication |
|
#4
|
||||
|
||||
Re: How to check if pen drive is connected?Quote:
I donated my grammar FYI (for your information) for free! Quote:
...because we can't tell you what you're doing wrong from just your narrative of it. Quote:
New thread or the same thread, it doesn't matter: CPP / C++ / C Code:
...one could add a WM_CLOSE handler that "PostQuitMessage(0)" and cleanly exit the CMD window, but if I did everything for you, what would you learn? MxB |
|
#5
|
|||
|
|||
Re: How to check if pen drive is connected?Thank You very much :] btw. Adamek will crash Areola
|
|
#6
|
||||
|
||||
Re: How to check if pen drive is connected?Quote:
I bet I could kick both their butts put together in C or C++! ...with one hand tied behind my back! ...Areola is going in for a semicolon to put an end to that forceful statement while Adamek is still looking for Any Key...that's it folks, lights out Mexican Bob has finished it for the both of them with a :sh up-arrow-twice-enter...it's all over! MxB |
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Probing for TCP connections | kterry | C Programming Language | 3 | 14-Feb-2008 11:32 |
| How to make the program know that a external drive is connected? | AnaXyd | .NET Forum | 0 | 07-Jul-2007 04:44 |
| Buying a SATA Drive and Using it as my Master OS Drive | dw84uk | Computer Hardware Forum | 1 | 27-Nov-2006 19:20 |
| Need help understand function prototypes! | Blstretch | C++ Forum | 20 | 25-Oct-2005 14:14 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The