Click here to Skip to main content
15,920,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Displaying images on a CDialog Pin
Tom Archer24-Jul-03 15:00
Tom Archer24-Jul-03 15:00 
GeneralRe: Displaying images on a CDialog Pin
Michael Dunn24-Jul-03 12:39
sitebuilderMichael Dunn24-Jul-03 12:39 
GeneralRe: Displaying images on a CDialog Pin
Tom Archer24-Jul-03 13:17
Tom Archer24-Jul-03 13:17 
GeneralRe: Displaying images on a CDialog Pin
Ryan Binns24-Jul-03 15:11
Ryan Binns24-Jul-03 15:11 
GeneralSet multiple dialog activated status Pin
sdfdsfa24-Jul-03 10:29
sdfdsfa24-Jul-03 10:29 
GeneralRe: Set multiple dialog activated status Pin
Tom Archer24-Jul-03 14:59
Tom Archer24-Jul-03 14:59 
GeneralHGLOBAL question Pin
Beer2624-Jul-03 9:59
Beer2624-Jul-03 9:59 
GeneralRe: HGLOBAL question - ignorant response Pin
AlexO24-Jul-03 10:34
AlexO24-Jul-03 10:34 
The topic is advanced, and using that kind of trickery requires skills and most importantly reason. I am not even going to discuss what possible reason you have to write code like this. Lets concentrate on what you actually trying to do:

Beer26 wrote:
HGLOBAL pexec = GlobalReAlloc(hbytes, size, GMEM_FIXED);

I am not completely sure what you expect from the statement above. I assume you want to create a copy of the resource in memory (I do not think GMEM_FIXED is going to be honored in Win32) You might be better off allocating new block of memory, insteadof realloc-ing something that you did not alloc-ed.

Beer26 wrote:
ptr = (int (__cdecl *)(int, char *[]))pexec;

I read the line above as - you assume that recourse you loaded is actually executable code of the function with signature "int (*ptr)(int argc, char* argv[]);" (please confirm). Are you sure that it is a valid executable code?

Beer26 wrote:
int j = 1; char *strs;
(*ptr)(j, &strs);


the line above actually try to execute the loaded code. (please confirm). Please note also that strs is not initialized.

How did you compile it? How did you put into resource? How are calls "getc" or "printf" going to be resolved ?
GeneralRe: HGLOBAL question Pin
peterchen24-Jul-03 10:38
peterchen24-Jul-03 10:38 
GeneralRe: HGLOBAL question Pin
Beer2624-Jul-03 10:47
Beer2624-Jul-03 10:47 
GeneralRe: HGLOBAL question Pin
peterchen24-Jul-03 10:52
peterchen24-Jul-03 10:52 
GeneralRe: HGLOBAL question Pin
Terry O'Nolley24-Jul-03 10:47
Terry O'Nolley24-Jul-03 10:47 
GeneralRe: HGLOBAL question Pin
Beer2624-Jul-03 10:48
Beer2624-Jul-03 10:48 
GeneralInline function causing unresolved symbols. Pin
73Zeppelin24-Jul-03 8:53
73Zeppelin24-Jul-03 8:53 
GeneralRe: Inline function causing unresolved symbols. Pin
David Crow24-Jul-03 9:04
David Crow24-Jul-03 9:04 
GeneralRe: Inline function causing unresolved symbols. Pin
73Zeppelin24-Jul-03 9:05
73Zeppelin24-Jul-03 9:05 
GeneralRe: Inline function causing unresolved symbols. Pin
David Crow24-Jul-03 9:09
David Crow24-Jul-03 9:09 
GeneralRe: Inline function causing unresolved symbols. Pin
73Zeppelin24-Jul-03 9:19
73Zeppelin24-Jul-03 9:19 
GeneralRe: Inline function causing unresolved symbols. Pin
David Crow24-Jul-03 9:22
David Crow24-Jul-03 9:22 
GeneralRe: Inline function causing unresolved symbols. Pin
73Zeppelin24-Jul-03 9:24
73Zeppelin24-Jul-03 9:24 
GeneralRe: Inline function causing unresolved symbols. Pin
73Zeppelin24-Jul-03 9:07
73Zeppelin24-Jul-03 9:07 
GeneralRe: Inline function causing unresolved symbols. Pin
Tim Smith24-Jul-03 9:09
Tim Smith24-Jul-03 9:09 
GeneralRe: Inline function causing unresolved symbols. Pin
73Zeppelin24-Jul-03 9:13
73Zeppelin24-Jul-03 9:13 
GeneralRe: Inline function causing unresolved symbols. Pin
John M. Drescher24-Jul-03 9:37
John M. Drescher24-Jul-03 9:37 
GeneralRe: Inline function causing unresolved symbols. Pin
73Zeppelin25-Jul-03 3:03
73Zeppelin25-Jul-03 3:03 

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.