I have this function in dll. and if I call this DLL so that sometext = "green" then in MessageBox i see "green" but this if sentence doen't work.
How should I modify my if sentence?
Code:
// a sample exported function
void DLL_EXPORT SomeFunction(const LPCSTR sometext)
{
MessageBoxA(0, sometext, "DLL Message", MB_OK | MB_ICONINFORMATION);
//remove( sometext );
HANDLE hstdout = GetStdHandle( STD_OUTPUT_HANDLE );
CONSOLE_SCREEN_BUFFER_INFO csbi;
GetConsoleScreenBufferInfo( hstdout, &csbi );
SetConsoleTextAttribute( hstdout, 0x07 );
if (sometext == "green") {
SetConsoleTextAttribute( hstdout, 0x0A );
printf ("Iam green: ");
}
}
OffTopic:Can I make that DLL create it's own cmd window?