C++ MessageBox, LPCSTR Issue
Code:
#define Address1 (*(short*)( 0x01234567 ) )
MessageBox( NULL, Address1, "Window Caption1", MB_ICONINFORMATION );
I'm just wondering the correct way of passing the value to a msgbox without creating memory leaks as this is something that will run over a long period of time.. Also how would you add to a C++ msgbox? I can show you an example in VB.Net if that helps..
Code:
MessageBox.Show("Value of Address1: " + Address1, "Window Caption1")
[php]
char* buffer;
char* message = "Value of address: ";
int value = (int)*(int*)0x12345678;
...
itoa(value,buffer,10);
message += buffer;
MessageBox(NULL,message,"Window caption",MB_OK);
[/php]
That was completely off the top of my head.. You should make use of the itoa() function, it converts an integer to a string, could be useful here.