Click here to Skip to main content
15,881,967 members
Home / Discussions / C#
   

C#

 
Generaldatagridview Pin
saharmirzaei10-Feb-14 23:48
saharmirzaei10-Feb-14 23:48 
QuestionHelp Provider Pin
kwinko10-Feb-14 19:13
kwinko10-Feb-14 19:13 
AnswerRe: Help Provider Pin
OriginalGriff10-Feb-14 20:37
mveOriginalGriff10-Feb-14 20:37 
QuestionWhat is the purpose of a .edmx file? Pin
Xarzu10-Feb-14 14:40
Xarzu10-Feb-14 14:40 
AnswerRe: What is the purpose of a .edmx file? Pin
Snehasish_Nandy10-Feb-14 18:39
professionalSnehasish_Nandy10-Feb-14 18:39 
AnswerRe: What is the purpose of a .edmx file? Pin
Nicholas Marty10-Feb-14 21:38
professionalNicholas Marty10-Feb-14 21:38 
QuestionReading and writing USB HID FeatureReports async. Pin
BigBenDk10-Feb-14 5:34
BigBenDk10-Feb-14 5:34 
AnswerRe: Reading and writing USB HID FeatureReports async. Pin
Jason Gleim10-Feb-14 9:22
professionalJason Gleim10-Feb-14 9:22 
I'm curious why you need to constantly get feature information from a HID device since the feature set of a device should be static and fetching it once in response to a connection event I would think would be sufficient. However, it's not for me to judge... Wink | ;)

If the function doesn't support async there is no way to make it act that way without implementing some sort of polling. Unlike making an async call synchronous, there is no 'await' for functions that don't use a callback and immediately return.

That being said, it isn't too hard to implement your own. Setting up a background worker or some other threading solution (even a system.threading.timer can be used) so you check at a given interval is very common. It used to be used a lot with serial comms to check the input buffer. The only gotcha is to make sure you have an abort so your app doesn't hang at close. If you use a timer with a polling interval it will automatically abort when your app shuts down. Also, make sure you handle the cross-thread marshal if anything is going up to the UI.
GeneralRe: Reading and writing USB HID FeatureReports async. Pin
BigBenDk10-Feb-14 10:26
BigBenDk10-Feb-14 10:26 
GeneralRe: Reading and writing USB HID FeatureReports async. Pin
Jason Gleim10-Feb-14 10:38
professionalJason Gleim10-Feb-14 10:38 
AnswerRe: Reading and writing USB HID FeatureReports async. Pin
Bernhard Hiller10-Feb-14 21:21
Bernhard Hiller10-Feb-14 21:21 
QuestionSOAP from scratch? Pin
Antessima10-Feb-14 4:41
Antessima10-Feb-14 4:41 
AnswerRe: SOAP from scratch? Pin
jschell10-Feb-14 8:11
jschell10-Feb-14 8:11 
GeneralRe: SOAP from scratch? Pin
Antessima10-Feb-14 8:42
Antessima10-Feb-14 8:42 
GeneralRe: SOAP from scratch? Pin
jschell11-Feb-14 11:04
jschell11-Feb-14 11:04 
QuestionReadAllBytes Method of the File Class PROBLEM Pin
computerpublic10-Feb-14 4:39
computerpublic10-Feb-14 4:39 
AnswerRe: ReadAllBytes Method of the File Class PROBLEM Pin
Richard Deeming10-Feb-14 5:30
mveRichard Deeming10-Feb-14 5:30 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
computerpublic10-Feb-14 5:45
computerpublic10-Feb-14 5:45 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
Richard Deeming10-Feb-14 5:56
mveRichard Deeming10-Feb-14 5:56 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
computerpublic10-Feb-14 6:27
computerpublic10-Feb-14 6:27 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
Richard Deeming10-Feb-14 6:54
mveRichard Deeming10-Feb-14 6:54 
AnswerRe: ReadAllBytes Method of the File Class PROBLEM Pin
Matt T Heffron10-Feb-14 7:47
professionalMatt T Heffron10-Feb-14 7:47 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
BillWoodruff10-Feb-14 21:23
professionalBillWoodruff10-Feb-14 21:23 
AnswerRe: ReadAllBytes Method of the File Class PROBLEM Pin
BillWoodruff10-Feb-14 6:37
professionalBillWoodruff10-Feb-14 6:37 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
computerpublic10-Feb-14 6:51
computerpublic10-Feb-14 6:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.