Re: Migrate Win32 Console Example Code to either Windows Application or Windows Form Application
cl6066 <cl6066 <at> gmail.com>
2012-08-02 15:08:53 GMT
I have 2 questions for you:
1. I don't know which libusb code has been used by you.
2. I think you can
A. Create 1 thread for the sample code process(just put the code of the sample process to the thread), and then the GUI thread can send/receive message (may be in the OnInitialDialog function) to the sample thread. Sample thread will handle the message from GUI thread, read and write operations.
By this solution, the read and write operation will block each other
B. Create 1 thread for the sample code process, create 1 thread for write and create 1 thread for read. Totally 3 threads are created. The GUI thread will send/receive message to/from the sample code thread. The sample code thread will transmit the message from GUI thread to the write thread or transmit the data from read thread to GUI thread.
By this solution, the read and write will not block each other. But more things should be done than the solution A.
BR,
Zhang Chunli
2012/8/2 Mingwu Barton Gao
<gaomingwu333 <at> hotmail.com>
Thanks!
Date: Thu, 2 Aug 2012 18:11:26 +0800
From:
cl6066 <at> gmail.comTo:
libusb-win32-devel <at> lists.sourceforge.net
Subject: Re: [Libusb-win32-devel] Migrate Win32 Console Example Code to either Windows Application or Windows Form Application
I will reply you later because some urgent issues.
2012/8/2 Mingwu Barton Gao
<gaomingwu333 <at> hotmail.com>
Hi Chunli,
Thank you for your reply again. I am developing a graphic user interface on windows.
I know how to develop a graphic user interface itself by choosing windows form project on VC++2010 Express.
The thing is windows form project is clr (Commone Language Runtime) based, but the examples of libusbk is win32 based.
I am not sure how to set up the property of the clr based windows form project, so that the lib of libusbk can still be used.
Can you let me know your comment again?
Barton
Date: Thu, 2 Aug 2012 10:32:55 +0800
From:
cl6066 <at> gmail.comTo:
libusb-win32-devel <at> lists.sourceforge.netSubject: Re: [Libusb-win32-devel] Migrate Win32 Console Example Code to either Windows Application or Windows Form Application
Hi Barton,
I'm not sure which type GUI of the form or document in MS2010 is needed by you. So I can't help you to search and it is better if you can search it by yourself.
I think you can try.
BR,
Zhang Chunli
2012/8/2 Mingwu Barton Gao
<gaomingwu333 <at> hotmail.com>
Hi Chunli,
Thank you for your reply. I really appreciate it.
Actually that is what I meant. I wanna build the GUI in MS windows OS and use the GUI to send and read data from USB device.
Can you let me know where to find the link? I tried but failed to figure it out.
Thank you again!
Barton
Date: Thu, 2 Aug 2012 09:46:13 +0800
From:
cl6066 <at> gmail.comTo:
libusb-win32-devel <at> lists.sourceforge.net
Subject: Re: [Libusb-win32-devel] Migrate Win32 Console Example Code to either Windows Application or Windows Form Application
Hi Barton, Do you mean you want to build the GUI in MS windows OS?If yes, you can get the sample from the website.If no, we can discuss your requirement.
BR,Zhang Chunli
2012/8/2 Mingwu Barton Gao
<gaomingwu333 <at> hotmail.com>
Hi guys,
I am using VC++ 2010 Express to play with the example code. Now I can send and write data to my usb device by modifying the example code using Win32 Console.
Now I need to develop one windows user interface and carry out the same function.
I am not really familiar with the structures or properties with how to start with a Windows Form Project and link related resouce to the project, so that I can migrate the code I mentioned above to send and write the data to the USB device.
Can you guys give me some guidance please?
Thank you very much!
Barton
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
--
Charles[cl.zhang]
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
--
Charles[cl.zhang]
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
--
Charles[cl.zhang]
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
--
Charles[cl.zhang]
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libusb-win32-devel mailing list
Libusb-win32-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel