Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. Pin
Richard MacCutchan7-Sep-09 4:57
mveRichard MacCutchan7-Sep-09 4:57 
AnswerRe: byte alignment issue? Writing struct to file in binary mode. Pin
Luc Pattyn7-Sep-09 2:39
sitebuilderLuc Pattyn7-Sep-09 2:39 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. [modified] Pin
Sauce!7-Sep-09 6:04
Sauce!7-Sep-09 6:04 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. Pin
Luc Pattyn7-Sep-09 6:16
sitebuilderLuc Pattyn7-Sep-09 6:16 
GeneralRe: byte alignment issue? Writing struct to file in binary mode. Pin
Richard MacCutchan7-Sep-09 10:59
mveRichard MacCutchan7-Sep-09 10:59 
QuestionStrings in EXE Pin
choramale_vs7-Sep-09 1:45
choramale_vs7-Sep-09 1:45 
AnswerRe: Strings in EXE Pin
Richard MacCutchan7-Sep-09 1:52
mveRichard MacCutchan7-Sep-09 1:52 
GeneralRe: Strings in EXE Pin
choramale_vs7-Sep-09 2:26
choramale_vs7-Sep-09 2:26 
I have to display all the strings present in an EXE file (i.e. compiled CPP file present in debug folder). How do i do this? I have written the following code. Can u please tell me what the problem is?.

#include "stdafx.h"
#include "windows.h"
#include "tchar.h"
#include "stdio.h"
#include "string.h"

BOOL CALLBACK MyStringCB(HMODULE some_library,LPCTSTR RT_String,LPTSTR buffer,LONG_PTR aux_param);

char buffer[200];

int _tmain(int argc, _TCHAR* argv[])
{DWORD S;
 LPCTSTR RT_String=NULL;
LONG_PTR aux_param=NULL;
	BOOL q,r;
	HMODULE some_library = LoadLibrary("C:/Hi/Debug/Hi.exe");
	q=  MyStringCB(some_library,RT_String,buffer,aux_param);
r=EnumResourceNames(some_library, RT_STRING, MyStringCB, aux_param);

S=GetLastError();

return 0;

}

BOOL CALLBACK MyStringCB(HMODULE some_library,LPCTSTR RT_String,LPTSTR buffer,LONG_PTR aux_param)
 {  DWORD startId = ((DWORD)buffer - 1) * 16; 
 DWORD i, endId = startId + 16;
   for (i = startId ; i < endId; ++i) 
 {    LoadString(some_library, i,buffer,sizeof(buffer)); 
 } 
 return TRUE;
 }

GeneralRe: Strings in EXE Pin
Richard MacCutchan7-Sep-09 2:30
mveRichard MacCutchan7-Sep-09 2:30 
GeneralRe: Strings in EXE Pin
choramale_vs7-Sep-09 2:51
choramale_vs7-Sep-09 2:51 
GeneralRe: Strings in EXE Pin
Richard MacCutchan7-Sep-09 4:21
mveRichard MacCutchan7-Sep-09 4:21 
AnswerRe: Strings in EXE Pin
CPallini7-Sep-09 1:55
mveCPallini7-Sep-09 1:55 
GeneralRe: Strings in EXE Pin
choramale_vs7-Sep-09 3:50
choramale_vs7-Sep-09 3:50 
GeneralRe: Strings in EXE Pin
Michael Schubert7-Sep-09 4:03
Michael Schubert7-Sep-09 4:03 
GeneralRe: Strings in EXE Pin
choramale_vs7-Sep-09 4:14
choramale_vs7-Sep-09 4:14 
GeneralRe: Strings in EXE Pin
Michael Schubert7-Sep-09 4:37
Michael Schubert7-Sep-09 4:37 
GeneralRe: Strings in EXE Pin
Nick_1117-Sep-09 6:17
Nick_1117-Sep-09 6:17 
GeneralRe: Strings in EXE Pin
Michael Schubert7-Sep-09 6:54
Michael Schubert7-Sep-09 6:54 
QuestionMySQL connection Pin
rdop7-Sep-09 1:16
rdop7-Sep-09 1:16 
QuestionTrackPopupMenuEx not popup menu on rite cordinates in ListCtrl. Pin
Le@rner7-Sep-09 1:07
Le@rner7-Sep-09 1:07 
AnswerRe: TrackPopupMenuEx not popup menu on rite cordinates in ListCtrl. Pin
Richard MacCutchan7-Sep-09 2:20
mveRichard MacCutchan7-Sep-09 2:20 
GeneralRe: TrackPopupMenuEx not popup menu on rite cordinates in ListCtrl. Pin
Le@rner7-Sep-09 2:49
Le@rner7-Sep-09 2:49 
GeneralRe: TrackPopupMenuEx not popup menu on rite cordinates in ListCtrl. Pin
Richard MacCutchan7-Sep-09 4:16
mveRichard MacCutchan7-Sep-09 4:16 
GeneralRe: TrackPopupMenuEx not popup menu on rite cordinates in ListCtrl. Pin
Le@rner8-Sep-09 18:17
Le@rner8-Sep-09 18:17 
GeneralRe: TrackPopupMenuEx not popup menu on rite cordinates in ListCtrl. Pin
Richard MacCutchan8-Sep-09 22:59
mveRichard MacCutchan8-Sep-09 22:59 

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.