Click here to Skip to main content
15,922,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUnder what circumstances does IE run in explorer.exe process? Pin
Tommy Svensson31-Jul-03 3:57
Tommy Svensson31-Jul-03 3:57 
AnswerRe: Under what circumstances does IE run in explorer.exe process? Pin
Mike Dimmick31-Jul-03 4:56
Mike Dimmick31-Jul-03 4:56 
GeneralRe: Under what circumstances does IE run in explorer.exe process? Pin
Tommy Svensson31-Jul-03 5:04
Tommy Svensson31-Jul-03 5:04 
Generaldialog in top left of screen Pin
si_6931-Jul-03 3:43
si_6931-Jul-03 3:43 
GeneralRe: dialog in top left of screen Pin
si_6931-Jul-03 3:45
si_6931-Jul-03 3:45 
GeneralRe: dialog in top left of screen Pin
User 665831-Jul-03 4:01
User 665831-Jul-03 4:01 
GeneralRe: dialog in top left of screen Pin
si_6931-Jul-03 5:19
si_6931-Jul-03 5:19 
Generaldrag 'n drop CBitmap Pin
selena31-Jul-03 3:29
selena31-Jul-03 3:29 
GeneralComponent oriented application Pin
Jerome Conus31-Jul-03 3:25
Jerome Conus31-Jul-03 3:25 
GeneralRe: Component oriented application Pin
armentage31-Jul-03 4:00
armentage31-Jul-03 4:00 
GeneralRe: Component oriented application Pin
Jim Crafton31-Jul-03 8:06
Jim Crafton31-Jul-03 8:06 
GeneralMFC Tree View Pin
rahulmsaxena31-Jul-03 3:24
rahulmsaxena31-Jul-03 3:24 
GeneralRe: MFC Tree View Pin
Tim Ranker31-Jul-03 3:39
Tim Ranker31-Jul-03 3:39 
GeneralRe: MFC Tree View Pin
rahulmsaxena31-Jul-03 3:51
rahulmsaxena31-Jul-03 3:51 
GeneralRe: MFC Tree View Pin
Tim Ranker31-Jul-03 4:54
Tim Ranker31-Jul-03 4:54 
GeneralRe: MFC Tree View Pin
rahulmsaxena31-Jul-03 9:20
rahulmsaxena31-Jul-03 9:20 
GeneralRe: MFC Tree View Pin
Tim Ranker31-Jul-03 10:16
Tim Ranker31-Jul-03 10:16 
GeneralHowto: get a Two's Complement Checksum Pin
DudleyDoorite31-Jul-03 2:43
DudleyDoorite31-Jul-03 2:43 
I have a serial device that has a checksum in the communication data packet.
The only description the documentation has is "2's complement of the sum of
all bytes from byte1 to byte n-4". This sound as though I should add all bytes
in the structure from the first byte to the byte before the checksum byte and place the
twos complement of this value into the checksum byte.

When I create a packet and add the bytes together then I get a value that is larger
than a 8 bit value. I have asked the found from asking in other forums and scanning
the internet that a 2's complement is taking a number and inverting all bits and then
adding 1 to it. my problem is that the size of the value should be 8 bits and when I
add them up I get 16 and some times 32 bit values.

I am trying to communicate with this device using VB.Net, I ask this question in the VB.Net
forum but no one has answered. So I thought I would ask here and try to port any answers to
VB. Now that I think I have explained everything my question is:

how do I do a 2's complement of the sum of all bytes in an array and put that value into a single 8 bit byte?

Thank you for any help you can offer.

Confused | :confused:

=================================
When I was in school, all I wanted was to get out into the real world.
Now that I'm in the real world, all I want is to go back to school.
GeneralRe: Howto: get a Two's Complement Checksum Pin
Ryan Binns31-Jul-03 3:19
Ryan Binns31-Jul-03 3:19 
GeneralRe: Howto: get a Two's Complement Checksum Pin
Tim Ranker31-Jul-03 3:31
Tim Ranker31-Jul-03 3:31 
GeneralRe: Howto: get a Two's Complement Checksum Pin
DudleyDoorite31-Jul-03 3:43
DudleyDoorite31-Jul-03 3:43 
GeneralExtracting Audio from AVI Pin
Anonymous31-Jul-03 2:22
Anonymous31-Jul-03 2:22 
GeneralRe: Extracting Audio from AVI Pin
Jim Crafton31-Jul-03 8:07
Jim Crafton31-Jul-03 8:07 
Generallaser pointer interaction Pin
sleep223131-Jul-03 1:34
sleep223131-Jul-03 1:34 
GeneralRe: laser pointer interaction Pin
Alexander M.,31-Jul-03 10:40
Alexander M.,31-Jul-03 10:40 

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.