Click here to Skip to main content
15,913,486 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionReading BYTE* Pin
satsumatable22-May-06 19:44
satsumatable22-May-06 19:44 
AnswerRe: Reading BYTE* Pin
kakan22-May-06 19:51
professionalkakan22-May-06 19:51 
GeneralRe: Reading BYTE* Pin
satsumatable22-May-06 19:59
satsumatable22-May-06 19:59 
GeneralRe: Reading BYTE* Pin
Sarath C22-May-06 20:18
Sarath C22-May-06 20:18 
GeneralRe: Reading BYTE* [modified] Pin
sunit522-May-06 20:21
sunit522-May-06 20:21 
GeneralRe: Reading BYTE* Pin
Maxwell Chen22-May-06 20:24
Maxwell Chen22-May-06 20:24 
GeneralRe: Reading BYTE* Pin
satsumatable22-May-06 20:31
satsumatable22-May-06 20:31 
GeneralRe: Reading BYTE* Pin
Maxwell Chen22-May-06 20:39
Maxwell Chen22-May-06 20:39 
sivaprakashshanmugam wrote:
//ActiveX control code
void VRMControl::SendBy(BYTE* ByteValue, LONG Length)
{
BYTE val[3];
ZeroMemory (val,3);
memcpy (val,ByteValue,3);
AfxMessageBox (CString(val));
}


void VRMControl::SendBy(BYTE* ByteValue, LONG Length)<br />
{<br />
BYTE val[3];<br />
// ZeroMemory (val,3); // No need for this line.<br />
memcpy (val,ByteValue,3); <br />
AfxMessageBox (CString(val)); /* Before doing this (converting a byte array to string), you have to find out if there a '\0' to end this string.  If ByteValue[2] = '\0', then it is OK.  If not, then it crashes your program. */<br />
}



Maxwell Chen
GeneralRe: Reading BYTE* Pin
satsumatable22-May-06 20:54
satsumatable22-May-06 20:54 
GeneralRe: Reading BYTE* Pin
Maxwell Chen22-May-06 21:03
Maxwell Chen22-May-06 21:03 
GeneralRe: Reading BYTE* Pin
satsumatable22-May-06 21:07
satsumatable22-May-06 21:07 
GeneralRe: Reading BYTE* Pin
Maxwell Chen22-May-06 21:30
Maxwell Chen22-May-06 21:30 
GeneralRe: Reading BYTE* Pin
satsumatable22-May-06 21:34
satsumatable22-May-06 21:34 
GeneralRe: Reading BYTE* Pin
Maxwell Chen22-May-06 22:01
Maxwell Chen22-May-06 22:01 
QuestionSMBIOS Pin
aaaan22-May-06 19:39
aaaan22-May-06 19:39 
AnswerRe: SMBIOS Pin
Laxman Auti22-May-06 19:48
Laxman Auti22-May-06 19:48 
GeneralRe: SMBIOS Pin
aaaan22-May-06 20:37
aaaan22-May-06 20:37 
QuestionCString to Char array Pin
VinayCool22-May-06 19:36
VinayCool22-May-06 19:36 
AnswerRe: CString to Char array [modified] Pin
kakan22-May-06 19:40
professionalkakan22-May-06 19:40 
AnswerRe: CString to Char array Pin
Laxman Auti22-May-06 19:43
Laxman Auti22-May-06 19:43 
Generalfile not opening Pin
VinayCool22-May-06 20:22
VinayCool22-May-06 20:22 
GeneralRe: file not opening Pin
Laxman Auti22-May-06 22:37
Laxman Auti22-May-06 22:37 
GeneralRe: file not opening Pin
VinayCool22-May-06 22:43
VinayCool22-May-06 22:43 
AnswerRe: file not opening Pin
Laxman Auti22-May-06 23:01
Laxman Auti22-May-06 23:01 
GeneralRe: file not opening Pin
VinayCool22-May-06 23:09
VinayCool22-May-06 23:09 

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.