Click here to Skip to main content
15,505,986 members
Home / Discussions / C#
   

C#

 
Generaldatagridview Pin
saharmirzaei11-Feb-14 0:48
saharmirzaei11-Feb-14 0:48 
QuestionHelp Provider Pin
kwinko10-Feb-14 20:13
kwinko10-Feb-14 20:13 
AnswerRe: Help Provider Pin
OriginalGriff10-Feb-14 21:37
mveOriginalGriff10-Feb-14 21:37 
QuestionWhat is the purpose of a .edmx file? Pin
Xarzu10-Feb-14 15:40
Xarzu10-Feb-14 15:40 
AnswerRe: What is the purpose of a .edmx file? Pin
Snehasish_Nandy10-Feb-14 19:39
professionalSnehasish_Nandy10-Feb-14 19:39 
AnswerRe: What is the purpose of a .edmx file? Pin
Nicholas Marty10-Feb-14 22:38
professionalNicholas Marty10-Feb-14 22:38 
QuestionReading and writing USB HID FeatureReports async. Pin
BigBenDk10-Feb-14 6:34
BigBenDk10-Feb-14 6:34 
AnswerRe: Reading and writing USB HID FeatureReports async. Pin
Jason Gleim10-Feb-14 10:22
professionalJason Gleim10-Feb-14 10: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 11:26
BigBenDk10-Feb-14 11:26 
GeneralRe: Reading and writing USB HID FeatureReports async. Pin
Jason Gleim10-Feb-14 11:38
professionalJason Gleim10-Feb-14 11:38 
AnswerRe: Reading and writing USB HID FeatureReports async. Pin
Bernhard Hiller10-Feb-14 22:21
Bernhard Hiller10-Feb-14 22:21 
QuestionSOAP from scratch? Pin
Antessima10-Feb-14 5:41
Antessima10-Feb-14 5:41 
AnswerRe: SOAP from scratch? Pin
jschell10-Feb-14 9:11
jschell10-Feb-14 9:11 
GeneralRe: SOAP from scratch? Pin
Antessima10-Feb-14 9:42
Antessima10-Feb-14 9:42 
GeneralRe: SOAP from scratch? Pin
jschell11-Feb-14 12:04
jschell11-Feb-14 12:04 
QuestionReadAllBytes Method of the File Class PROBLEM Pin
computerpublic10-Feb-14 5:39
computerpublic10-Feb-14 5:39 
AnswerRe: ReadAllBytes Method of the File Class PROBLEM Pin
Richard Deeming10-Feb-14 6:30
mveRichard Deeming10-Feb-14 6:30 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
computerpublic10-Feb-14 6:45
computerpublic10-Feb-14 6:45 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
Richard Deeming10-Feb-14 6:56
mveRichard Deeming10-Feb-14 6:56 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
computerpublic10-Feb-14 7:27
computerpublic10-Feb-14 7:27 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
Richard Deeming10-Feb-14 7:54
mveRichard Deeming10-Feb-14 7:54 
AnswerRe: ReadAllBytes Method of the File Class PROBLEM Pin
Matt T Heffron10-Feb-14 8:47
professionalMatt T Heffron10-Feb-14 8:47 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
BillWoodruff10-Feb-14 22:23
mveBillWoodruff10-Feb-14 22:23 
AnswerRe: ReadAllBytes Method of the File Class PROBLEM Pin
BillWoodruff10-Feb-14 7:37
mveBillWoodruff10-Feb-14 7:37 
GeneralRe: ReadAllBytes Method of the File Class PROBLEM Pin
computerpublic10-Feb-14 7:51
computerpublic10-Feb-14 7: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.