Click here to Skip to main content
15,914,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: closing several instances of same thread Pin
Arman S.18-May-07 21:03
Arman S.18-May-07 21:03 
GeneralRe: closing several instances of same thread Pin
Hamid_RT18-May-07 21:43
Hamid_RT18-May-07 21:43 
AnswerRe: closing several instances of same thread Pin
Arman S.18-May-07 21:09
Arman S.18-May-07 21:09 
QuestionHelp aout Ownerdraw CHeaderCtrl Pin
kcynic18-May-07 16:31
kcynic18-May-07 16:31 
AnswerRe: Help aout Ownerdraw CHeaderCtrl Pin
Hamid_RT18-May-07 19:49
Hamid_RT18-May-07 19:49 
GeneralRe: Help aout Ownerdraw CHeaderCtrl Pin
kcynic18-May-07 21:30
kcynic18-May-07 21:30 
GeneralRe: Help aout Ownerdraw CHeaderCtrl Pin
Hamid_RT18-May-07 21:50
Hamid_RT18-May-07 21:50 
QuestionUrgent question: Char issues Pin
donno118-May-07 15:36
donno118-May-07 15:36 
I have an urgent question. I'm developing an application for a uni assignment which communicates with a vehicle CAN bus adapter with an FTDI chip, and I only have access to the car for another 2h. I'm trying to read data from the FTDI buffer, but what's returned is in what looks to be the extended character set (basically jibberish), not the standard which I am expecting. I'm spooling it to a csv file using Char::ToString(). My code for FT_read (defined within the driver .dll, http://www.ftdichip.com/Support/Knowledgebase/index.html?programmingguides.htm under Programming guides, D2XX,Classic Interface Functions), is as below:

if(FT_Read(handle, received_buffer, byte_count, &num_bytes_received) != FT_OK)
{
MessageBox::Show("Error: Read Failed"); //unable to open device
//Close_FTDI();
return 0; //Error
}
else
{
return 1; //Success
//debug_output_txt->AppendText(received_buffer); //output received characters
}

where received_buffer is char received_buffer[256], and byte count and num_bytes_received are DWORD(unsigned long).

I just read on the ftdi site pasted above, that the data type for the received_buffer should be lpvoid - which is typedef void * lpvoid. I'm not that good with pointers, so could this be where I'm going wrong? Although, my code is almost a direct copy of their example.

Any idea guys?

Sorry about the lack of structure in my post - I'm a tad on edge at the moment.

Cheers

John
AnswerRe: Urgent question: Char issues Pin
PJ Arends18-May-07 16:34
professionalPJ Arends18-May-07 16:34 
GeneralRe: Urgent question: Char issues Pin
donno118-May-07 16:51
donno118-May-07 16:51 
GeneralRe: Urgent question: Char issues Pin
PJ Arends18-May-07 17:17
professionalPJ Arends18-May-07 17:17 
GeneralRe: Urgent question: Char issues Pin
donno118-May-07 17:30
donno118-May-07 17:30 
GeneralRe: Urgent question: Char issues Pin
donno118-May-07 21:31
donno118-May-07 21:31 
AnswerRe: Urgent question: Char issues Pin
normanS18-May-07 21:51
normanS18-May-07 21:51 
GeneralRe: Urgent question: Char issues Pin
donno118-May-07 22:46
donno118-May-07 22:46 
GeneralRe: Urgent question: Char issues Pin
normanS19-May-07 7:31
normanS19-May-07 7:31 
QuestionWrong code while reading a file i think :( [modified] Pin
Immunity1818-May-07 14:03
Immunity1818-May-07 14:03 
AnswerRe: Wrong code while reading a file i think :( Pin
Manoj Kumar Rai19-May-07 0:34
professionalManoj Kumar Rai19-May-07 0:34 
QuestionHow to solve this warning Pin
Jerry Burns18-May-07 9:23
Jerry Burns18-May-07 9:23 
QuestionRe: How to solve this warning Pin
David Crow18-May-07 10:19
David Crow18-May-07 10:19 
AnswerRe: How to solve this warning Pin
Jerry Burns18-May-07 10:55
Jerry Burns18-May-07 10:55 
GeneralRe: How to solve this warning Pin
David Crow21-May-07 2:27
David Crow21-May-07 2:27 
AnswerRe: How to solve this warning Pin
Manoj Kumar Rai19-May-07 0:37
professionalManoj Kumar Rai19-May-07 0:37 
QuestionDrawing titlebar on XP with themes Options Options Pin
maxus9918-May-07 7:20
maxus9918-May-07 7:20 
QuestionHow to convert from CString to integer? And Message Boxes Pin
Star0918-May-07 6:54
Star0918-May-07 6:54 

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.