Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyneu committed Oct 13, 2017
1 parent c8323c7 commit 8256e64
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
Binary file modified Release/tool3.exe
Binary file not shown.
Binary file modified tool3.suo
Binary file not shown.
33 changes: 16 additions & 17 deletions tool3/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,43 +151,42 @@ VOID c(VOID *)
DWORD numberofbyteswritten;
DWORD dwRead;
DWORD totalbytesavailable;
char output_cmd[250001];
int h,c,ferrum=0,tm=500;
char output_cmd[400001];
int h,c,ferrum=0,tm=400;
BYTE w=0;
CString t,bear;
CStringA t,bear;
SETTEXTEX fw;
fw.flags=4;
fw.codepage=1200;
BYTE ptrigger=1;
fw.flags=0;
fw.codepage=CP_THREAD_ACP;
int monte=0;
wchar_t reserve;
char reserve;
while(1)
{
PeekNamedPipe(stdoutRd, NULL, 0, NULL, &totalbytesavailable, 0);

if(totalbytesavailable)
{
ReadFile(stdoutRd, output_cmd, min(250000,totalbytesavailable), &dwRead, NULL);
h = min(250000,totalbytesavailable);
ReadFile(stdoutRd, output_cmd, min(400000,totalbytesavailable), &dwRead, NULL);
h = min(400000,totalbytesavailable);
output_cmd[h]='\0';
if(monte) bear.SetAt(monte-2,reserve);
monte=monte+h;
t=output_cmd;
bear=bear + t;
if(w++ > 44) {bear=bear.Right(monte=4400);w=0;}
reserve=bear[monte-2];
bear.SetAt(monte-2,L'\0');
PostMessage(hc,EM_SETTEXTEX,(WPARAM)&fw,(LPARAM)(LPCWSTR)bear);
SendMessage(hc, WM_VSCROLL, SB_BOTTOM, 0);
bear.SetAt(monte-2,'\0');
SendMessage(hc,EM_SETTEXTEX,(WPARAM)&fw,(LPARAM)(LPCSTR)bear);
PostMessage(hc, WM_VSCROLL, SB_BOTTOM, 0);


c=t.Find(L"Synced");
c=t.Find("Synced");
if(c != -1)
{
tm=2340;
tm=2900;
t=t.Right(h-c-7);
t.Truncate(h-c-11);
swscanf((LPCWSTR)t,L"%d/%d",&p[1],&p[2]);
sscanf(t,"%d/%d",&p[1],&p[2]);
dc->SetPos(100*p[1]/p[2]);
bhr->SetProgressValue(hz,p[1],p[2]);
}
Expand Down Expand Up @@ -234,8 +233,8 @@ void CMainFrame::tr()


SECURITY_ATTRIBUTES sa={sizeof(SECURITY_ATTRIBUTES), NULL, true};
CreatePipe(&stdinRd, &stdinWr, &sa, 250000);
CreatePipe(&stdoutRd,&stdoutWr, &sa,250000);
CreatePipe(&stdinRd, &stdinWr, &sa, 1000);
CreatePipe(&stdoutRd,&stdoutWr, &sa,400000);

STARTUPINFO si;
ZeroMemory(&si,sizeof(si));
Expand Down
3 changes: 3 additions & 0 deletions tool3/tool3.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

0 comments on commit 8256e64

Please sign in to comment.