Click here to Skip to main content
15,884,353 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How correctly to check up availability of a XP theme? Pin
Jochen Arndt31-Oct-12 2:54
professionalJochen Arndt31-Oct-12 2:54 
GeneralRe: How correctly to check up availability of a XP theme? Pin
Eugene Pustovoyt31-Oct-12 4:12
Eugene Pustovoyt31-Oct-12 4:12 
QuestionWhat is the difference between following declarations ? Pin
PrafullaVedante30-Oct-12 22:52
PrafullaVedante30-Oct-12 22:52 
AnswerRe: What is the difference between following declarations ? Pin
Richard MacCutchan30-Oct-12 23:07
mveRichard MacCutchan30-Oct-12 23:07 
AnswerRe: What is the difference between following declarations ? Pin
Orjan Westin30-Oct-12 23:37
professionalOrjan Westin30-Oct-12 23:37 
GeneralRe: What is the difference between following declarations ? Pin
Stefan_Lang7-Nov-12 2:49
Stefan_Lang7-Nov-12 2:49 
GeneralRe: What is the difference between following declarations ? Pin
Orjan Westin8-Nov-12 9:07
professionalOrjan Westin8-Nov-12 9:07 
QuestionWrite a tiff file to disk Pin
Marcio Kugler Rodrigues30-Oct-12 7:50
Marcio Kugler Rodrigues30-Oct-12 7:50 
Hello all,
I'm new to C and i received a challenge to work on a project to integrate 2 different machines. One of the machines is a scanner. A protocol was developed to make the conversation" between the 2 machines possible using the serial over USB physical link.

I have the specification of this protocol with the commands that the scanner can receive and what is the expected response. All commands work perfectly however i'm in doubt on how to retrieve the image from the scanner.
See the command definition below:

Request syntax :
000200000000crc16

The scanner response in case of success will be :
[“0002”][length][image data in binary][crc16]

As The payload field in this response will be a BINARY stream of octets that needs no further conversion prior to be saved in a file or to be delivered to its final destination.

To better ilustrate the response is something like:
000200006690bin_datacrc
Where:
0002 is the command
00006690 is the lenght of the img data
bin_data is bin image data
crc

The problem is that i don't know how to handle BINARY stream of octets. I read a couple of articles but they are always related to read bin data from files and in this case we have a stream and i'm not sure if it's the same.

Do you know a possible solution to write this BINARY stream of octets in a file ???
If someone can share some info i really appreciate it!!!
Thanks and congrats for the great job you guys do here at the forums...
Simplicity is the Ultimate Sophistication!!!

AnswerRe: Write a tiff file to disk Pin
Richard MacCutchan30-Oct-12 8:37
mveRichard MacCutchan30-Oct-12 8:37 
AnswerRe: Write a tiff file to disk Pin
CPallini30-Oct-12 23:03
mveCPallini30-Oct-12 23:03 
QuestionGUI enabled for service under windows 2008 Pin
es196830-Oct-12 3:58
es196830-Oct-12 3:58 
AnswerRe: GUI enabled for service under windows 2008 Pin
Richard MacCutchan30-Oct-12 10:38
mveRichard MacCutchan30-Oct-12 10:38 
QuestionOnPaint not executed Pin
_Flaviu29-Oct-12 22:20
_Flaviu29-Oct-12 22:20 
AnswerRe: OnPaint not executed Pin
Richard MacCutchan29-Oct-12 22:57
mveRichard MacCutchan29-Oct-12 22:57 
GeneralRe: OnPaint not executed Pin
_Flaviu29-Oct-12 23:21
_Flaviu29-Oct-12 23:21 
QuestionRemoving repeated path Pin
sarfaraznawaz29-Oct-12 19:32
sarfaraznawaz29-Oct-12 19:32 
AnswerRe: Removing repeated path Pin
_Flaviu29-Oct-12 22:12
_Flaviu29-Oct-12 22:12 
AnswerRe: Removing repeated path Pin
Richard MacCutchan29-Oct-12 22:59
mveRichard MacCutchan29-Oct-12 22:59 
GeneralRe: Removing repeated path Pin
sarfaraznawaz29-Oct-12 23:29
sarfaraznawaz29-Oct-12 23:29 
GeneralRe: Removing repeated path Pin
Richard MacCutchan30-Oct-12 0:40
mveRichard MacCutchan30-Oct-12 0:40 
QuestionRe: Removing repeated path Pin
David Crow30-Oct-12 3:18
David Crow30-Oct-12 3:18 
QuestionWIC/C++: People Tagging: Unable to set the People Tagging metadata Pin
Morpheus2matrix29-Oct-12 9:27
Morpheus2matrix29-Oct-12 9:27 
AnswerRe: WIC/C++: People Tagging: Unable to set the People Tagging metadata Pin
enhzflep29-Oct-12 15:27
enhzflep29-Oct-12 15:27 
GeneralRe: WIC/C++: People Tagging: Unable to set the People Tagging metadata Pin
Morpheus2matrix29-Oct-12 22:06
Morpheus2matrix29-Oct-12 22:06 
GeneralRe: WIC/C++: People Tagging: Unable to set the People Tagging metadata Pin
enhzflep30-Oct-12 9:16
enhzflep30-Oct-12 9:16 

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.