Click here to Skip to main content
15,909,539 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Newbie Question Pin
kenexcelon16-Sep-05 10:30
kenexcelon16-Sep-05 10:30 
GeneralRe: Newbie Question Pin
David Crow16-Sep-05 10:36
David Crow16-Sep-05 10:36 
GeneralRe: Newbie Question Pin
hunter1316-Sep-05 10:40
hunter1316-Sep-05 10:40 
GeneralRe: Newbie Question Pin
hunter1316-Sep-05 10:36
hunter1316-Sep-05 10:36 
AnswerRe: Newbie Question Pin
kenexcelon16-Sep-05 13:58
kenexcelon16-Sep-05 13:58 
QuestionRun Shellexecute and wait for it to return Pin
anderslundsgard16-Sep-05 9:51
anderslundsgard16-Sep-05 9:51 
AnswerRe: Run Shellexecute and wait for it to return Pin
David Crow16-Sep-05 10:09
David Crow16-Sep-05 10:09 
GeneralRe: Run Shellexecute and wait for it to return Pin
hunter1316-Sep-05 10:33
hunter1316-Sep-05 10:33 
QuestionIrregularly spaced x,y,z data to regular contours Pin
Chris Maunder16-Sep-05 9:47
cofounderChris Maunder16-Sep-05 9:47 
AnswerRe: Irregularly spaced x,y,z data to regular contours Pin
Yongki C. A. Jong17-Sep-05 6:11
Yongki C. A. Jong17-Sep-05 6:11 
AnswerRe: Irregularly spaced x,y,z data to regular contours Pin
cmk17-Sep-05 17:54
cmk17-Sep-05 17:54 
Questioncapturing window image through its handle Pin
Neo_MXP16-Sep-05 9:34
Neo_MXP16-Sep-05 9:34 
AnswerRe: capturing window image through its handle Pin
hunter1316-Sep-05 9:41
hunter1316-Sep-05 9:41 
GeneralRe: capturing window image through its handle Pin
hunter1316-Sep-05 9:50
hunter1316-Sep-05 9:50 
GeneralRe: capturing window image through its handle Pin
Anonymous16-Sep-05 9:59
Anonymous16-Sep-05 9:59 
QuestionConvert ASCII to HEX Pin
RedDragon2k16-Sep-05 9:25
RedDragon2k16-Sep-05 9:25 
AnswerRe: Convert ASCII to HEX Pin
hunter1316-Sep-05 9:35
hunter1316-Sep-05 9:35 
GeneralRe: Convert ASCII to HEX Pin
RedDragon2k16-Sep-05 10:07
RedDragon2k16-Sep-05 10:07 
GeneralRe: Convert ASCII to HEX Pin
hunter1316-Sep-05 10:24
hunter1316-Sep-05 10:24 
lol its little harded Smile | :) but ok Smile | :) use this:
--------------

BYTE StringHexToByte(LPCSTR HexString)
{
BYTE hi;
BYTE lo;

hi = 0;
lo = 0;

if ((HexString[0] - 0x30)<10)
{
hi = HexString[0] - 0x30;
}
else {
switch (toupper(HexString[0])) {
case 'A':
hi = 0x0a;
break;
case 'B':
hi = 0x0b;
break;
case 'C':
hi = 0x0c;
break;
case 'D':
hi = 0x0d;
break;
case 'E':
hi = 0x0e;
break;
case 'F':
hi = 0x0f;
break;
}
}
if ((HexString[1] - 0x30)<10) {
lo = HexString[1] - 0x30;
}
else {
switch (toupper(HexString[1])) {
case 'A':
lo = 0x0a;
break;
case 'B':
lo = 0x0b;
break;
case 'C':
lo = 0x0c;
break;
case 'D':
lo = 0x0d;
break;
case 'E':
lo = 0x0e;
break;
case 'F':
lo = 0x0f;
break;
}
}

return (hi << 4) | lo;
}

static void StringHexToArray(IN LPCSTR HexString, OUT PBYTE Array)
{
UINT i = 0;

while (i < strlen(HexString))
{
*Array++ = StringHexToByte(&HexString[i]);
i += 3;
}
}

---------------

call as

BYTE* lpData = (PBYTE)malloc(1024);
ZeroMemory(lpData, 1024);
StringHexToArray(SourceString, lpData);
free(lpData);
GeneralRe: Convert ASCII to HEX Pin
David Crow16-Sep-05 10:38
David Crow16-Sep-05 10:38 
GeneralRe: Convert ASCII to HEX Pin
gamitech16-Sep-05 10:34
gamitech16-Sep-05 10:34 
AnswerRe: Convert ASCII to HEX Pin
David Crow16-Sep-05 10:04
David Crow16-Sep-05 10:04 
QuestionNetAddShare under NTFS Pin
hunter1316-Sep-05 7:48
hunter1316-Sep-05 7:48 
AnswerRe: NetAddShare under NTFS Pin
David Crow16-Sep-05 8:01
David Crow16-Sep-05 8:01 
GeneralRe: NetAddShare under NTFS Pin
hunter1316-Sep-05 9:20
hunter1316-Sep-05 9:20 

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.