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

C / C++ / MFC

 
GeneralRe: How can I use LPBITMAPINFOHEADER to store and redisplay view contents? Pin
Ted Christiansen7-Sep-02 2:49
Ted Christiansen7-Sep-02 2:49 
GeneralRe: How can I use LPBITMAPINFOHEADER to store and redisplay view contents? Pin
Chris Losinger7-Sep-02 5:35
professionalChris Losinger7-Sep-02 5:35 
GeneralPostQuitMessage(0) wont quit the app Pin
ns5-Sep-02 8:25
ns5-Sep-02 8:25 
GeneralRe: PostQuitMessage(0) wont quit the app Pin
ns5-Sep-02 8:31
ns5-Sep-02 8:31 
GeneralRe: PostQuitMessage(0) wont quit the app Pin
dazinith5-Sep-02 9:22
dazinith5-Sep-02 9:22 
GeneralRe: PostQuitMessage(0) wont quit the app Pin
ns5-Sep-02 10:09
ns5-Sep-02 10:09 
GeneralRe: PostQuitMessage(0) wont quit the app Pin
Joaquín M López Muñoz5-Sep-02 12:03
Joaquín M López Muñoz5-Sep-02 12:03 
Generalreverse read Pin
Shotgun5-Sep-02 8:16
Shotgun5-Sep-02 8:16 
okay, long story short, newbie - beware.
form someones example of Little Install Builder, we loaded the app in a string and read it looking for a marker, how could i look through the string backwards, looking for a marker? i included the example

CString strTag;
int nLength;
char szModuleName[MAX_PATH];
char *ppMemoryBlock, *ppBlockEnd, *ptr;
char *pStartPos = 0;

// get our own name
GetModuleFileName(NULL, szModuleName, sizeof(szModuleName));
LoadFile(szModuleName, &ppMemoryBlock, &ppBlockEnd);

if (!ppMemoryBlock)
{
return FALSE;
}

ptr = ppMemoryBlock;
int nCounter = 0;
strTag = "{35C63374-512F-394a-8516-NE3513160CBG}";
//// reverse it to prevent detecting it in this executable
strTag.MakeReverse();

nLength = strTag.GetLength();

//// search in memory block for string
for ( ; ptr < ppBlockEnd; ptr++)
{
if (nCounter < nLength)
{
// compare part of string
if (*ptr == strTag.GetAt(nCounter))
{
// this part is OK
nCounter++;
}
else
{
// not good -> reset counter
nCounter = 0;
}
}
else
{
// found string !

// // rewind pointer (do not include marker tag)
for (int i=0; i < nLength; i++)
ptr--;
// do what got to do, they extracted file

// // skip marker
for (int j=0; j < nLength; j++)
ptr++;

pStartPos = ptr;
nCounter = 0;
}
}

// // release memory
GlobalFree((HGLOBAL)ppMemoryBlock);

i've tried, looking from ppBlockEnd ptr-- with no luck
any helps really appreciated.

shotgun
Questioncan i make activex of my application?? Pin
aashu5-Sep-02 7:02
aashu5-Sep-02 7:02 
QuestionIs There a way to get notified when network is done or up in VC++? Pin
Anonymous5-Sep-02 6:35
Anonymous5-Sep-02 6:35 
AnswerRe: Is There a way to get notified when network is done or up in VC++? Pin
Joaquín M López Muñoz5-Sep-02 7:46
Joaquín M López Muñoz5-Sep-02 7:46 
GeneralRe: Is There a way to get notified when network is done or up in VC++? Pin
Anonymous5-Sep-02 8:42
Anonymous5-Sep-02 8:42 
GeneralSource Control Pin
Bugra Barin5-Sep-02 6:25
Bugra Barin5-Sep-02 6:25 
GeneralRe: Source Control Pin
Pavel Klocek5-Sep-02 6:32
Pavel Klocek5-Sep-02 6:32 
GeneralRe: Source Control Pin
Daniel Turini5-Sep-02 10:22
Daniel Turini5-Sep-02 10:22 
GeneralRe: Source Control Pin
Bugra Barin5-Sep-02 11:42
Bugra Barin5-Sep-02 11:42 
GeneralRe: Source Control Pin
Alois Kraus5-Sep-02 20:24
Alois Kraus5-Sep-02 20:24 
GeneralRe: Source Control Pin
Ted Christiansen6-Sep-02 0:50
Ted Christiansen6-Sep-02 0:50 
GeneralCImageList Pin
orcun colak5-Sep-02 6:20
orcun colak5-Sep-02 6:20 
GeneralRe: CImageList Pin
Chris Losinger5-Sep-02 6:32
professionalChris Losinger5-Sep-02 6:32 
GeneralRe: CImageList Pin
orcun colak5-Sep-02 7:28
orcun colak5-Sep-02 7:28 
Generalshow default in Drop list Pin
jimNLX5-Sep-02 6:09
jimNLX5-Sep-02 6:09 
GeneralRe: show default in Drop list Pin
Pavel Klocek5-Sep-02 6:17
Pavel Klocek5-Sep-02 6:17 
GeneralRe: show default in Drop list Pin
jimNLX5-Sep-02 6:23
jimNLX5-Sep-02 6:23 
GeneralRe: show default in Drop list Pin
Pavel Klocek5-Sep-02 6:22
Pavel Klocek5-Sep-02 6:22 

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.