Proxydll console problem

06/18/2016 03:31 MenPirate#1
Hello guys.
I have problem with proxy dll console , the program is success created the console but i cant print or write to it , i searched in google but i cant find anything to solve the problem maybe can anyone help me .
Picture:
[Only registered and activated users can see links. Click Here To Register...]

IDE : Visual studio Enterprise 2015
OS : Windows 7 ultimate 64 bit

Near 60 Views until now and no one help me :(
06/18/2016 21:35 nokia999#2
you didnt show what CommandComm() is doing.
I think u didnt set console as default input / output.

btw do it like everyone here show in sources:

void DOS()
{
int hCrtIn, hCrtOut;
FILE *conIn, *conOut;

AllocConsole(); // show console
hCrtIn = _open_osfhandle((intptr_t)GetStdHandle(STD_INPUT_H ANDLE), _O_TEXT);
hCrtOut = _open_osfhandle((intptr_t)GetStdHandle(STD_OUTPUT_ HANDLE), _O_TEXT);
conIn = _fdopen(hCrtIn, "r");
conOut = _fdopen(hCrtOut, "w");
*stdin = *conIn;
*stdout = *conOut;
}

and in main input thread:

void MainThread(void* lpArg)
{
char key = 0;

while( !showCmdReady)
{
Sleep(50);
}
Sleep(1000);
DOS(); //My CMD-DOS
MainDosTitle(); // set console title
while (1)
{
if (_kbhit())
{
key = _getch();
if (key == 'h')
{
//do something when pressed 'h'
}
}
}
}
06/18/2016 22:48 MenPirate#3
same thing, nothing new btw this's Thiesius source code and i checked ZeroTen source code and i got same problem, this problem happen when i use Visual studio Enterprise 2015 or Windows 7 ultimate 64 bit.
06/18/2016 23:54 meak1#4
Thiesius works i think and im just using visual c++ 2010
but yeah use the func above your post, easy to use
06/19/2016 01:45 MenPirate#5
it's work in visual c++ 2010 without any problem, but i was trying to know why this wont work in visual c++ 2015 there is no logical reason !
06/19/2016 06:41 luki180pl#6
Did you try printf() instead of printf_s()? You can also try cout.
06/19/2016 15:20 nokia999#7
Windows 7 x64 ultimate isnt problem cuz i have it and its work.
Im using visual studio 2012 and 2013 both working with above solution.

so myby its 2015 problem or you need digg deeper in ur code for some bug...
06/19/2016 23:22 MenPirate#8
Quote:
Did you try printf() instead of printf_s()? You can also try cout.
yes, and don't work also .

Quote:
Windows 7 x64 ultimate isnt problem cuz i have it and its work.
Im using visual studio 2012 and 2013 both working with above solution.

so myby its 2015 problem or you need digg deeper in ur code for some bug...
yes, the problem in Visual c++ 2015 i installed 2010 in OS win7 64bit and this work without any problem now , anyway thanks guys for help <3
06/20/2016 08:01 luki180pl#9
You can keep using 2015 and change build tools in project settings to 2010
06/20/2016 20:11 MenPirate#10
Quote:
You can keep using 2015 and change build tools in project settings to 2010
yes but i must install 2010 to do that .
thanks for help :)