ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Okay, I'm confused here . . . Here's the Source Code and SCRIPT in Question . . . (Sdk)
Okay, I'm confused here . . . Here's the Source Code and SCRIPT in Question . . . // Sdkandon m. colemanSep 8, 1999, 3:14pm
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01BEF9FC.2626BBA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable // UpdaterDlg.cpp : implementation file // #include "stdafx.h" #include "Updater.h" #include "UpdaterDlg.h" #include "afxinet.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] =3D __FILE__; #endif #define HTTPBUFLEN 1024 char httpbuff[HTTPBUFLEN]; bool GetHttpFile(const char *url, const char *filename); /////////////////////////////////////////////////////////////////////////= //// // CUpdaterDlg dialog CUpdaterDlg::CUpdaterDlg(CWnd* pParent /*=3DNULL*/) : CDialog(CUpdaterDlg::IDD, pParent) { file://{{AFX_DATA_INIT(CUpdaterDlg) // NOTE: the ClassWizard will add member initialization here file://}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in = Win32 m_hIcon =3D AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CUpdaterDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); file://{{AFX_DATA_MAP(CUpdaterDlg) // NOTE: the ClassWizard will add DDX and DDV calls here file://}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CUpdaterDlg, CDialog) file://{{AFX_MSG_MAP(CUpdaterDlg) ON_WM_PAINT() ON_WM_QUERYDRAGICON() file://}}AFX_MSG_MAP END_MESSAGE_MAP() /////////////////////////////////////////////////////////////////////////= //// // CUpdaterDlg message handlers BOOL CUpdaterDlg::OnInitDialog() { CDialog::OnInitDialog(); SetIcon(m_hIcon, TRUE); SetIcon(m_hIcon, FALSE); CFile NewData ("version.new", CFile::modeRead); char pbuf[2000]; UINT nBytesRead =3D NewData.Read( pbuf, 1000 ); CString msg =3D pbuf; int NewVersion; int OldVersion; msg =3D msg.Left(msg.Find("%N")); msg.MakeReverse(); msg =3D msg.Left(msg.Find("VM%")); msg.MakeReverse(); NewVersion =3D atoi (msg); if (1 =3D=3D 1) { CFile OldData ("version.dat", CFile::modeRead); char pbuf2[2000]; UINT nBytesRead =3D OldData.Read( pbuf2, 1000 ); CString msg =3D pbuf2; msg =3D msg.Left(msg.Find("%N")); msg.MakeReverse(); msg =3D msg.Left(msg.Find("VM%")); msg.MakeReverse(); OldVersion =3D atoi (msg); =20 if (NewVersion =3D=3D OldVersion) { OldVersion =3D atoi (msg); msg.Format(" Update Patch %d Detected . . .\r\n\r\n Verifying . . . . = .. . . . . . . . Failure!\r\n Creating Data Table . . . Failure!\r\n\r\n = NO DIFFERENCE IN VERSION!",NewVersion); GetDlgItem(IDC_Status)->SetWindowText(msg); } else if (NewVersion > OldVersion) { msg.Format(" Update Patch %d Detected . . .\r\n\r\n Verifying . . . . = .. . . . . . . . Success!\r\n Creating Data Table . . . Success!\r\n\r\n = Applying Patch for %d to %d",NewVersion,NewVersion,OldVersion); GetDlgItem(IDC_Status)->SetWindowText(msg); msg =3D pbuf; msg =3D msg.Left(msg.Find("1L")); msg.MakeReverse(); msg =3D msg.Left(msg.Find("N%")); msg.MakeReverse(); int FILES =3D atoi (msg); msg =3D pbuf; int FILENUM =3D 1; CString LOCAL; CString EXTERNAL; int VERSION; while (FILENUM !=3D FILES) { CString NUML; CString NUML2; CString NUMF; CString NUMV; NUML.Format("%dL",FILENUM); NUML2.Format("%dL",(FILENUM+1)); NUMF.Format("%dF",FILENUM); NUMV.Format("%dV",FILENUM); =20 msg =3D pbuf; msg =3D msg.Left(msg.Find(NUMF)); NUML.MakeReverse(); msg.MakeReverse(); msg =3D msg.Left(msg.Find(NUML)); NUML.MakeReverse(); msg.MakeReverse(); LOCAL =3D msg; msg =3D pbuf; msg =3D msg.Left(msg.Find(NUMV)); NUMF.MakeReverse(); msg.MakeReverse(); msg =3D msg.Left(msg.Find(NUMF)); NUMF.MakeReverse(); msg.MakeReverse(); EXTERNAL =3D msg; msg =3D pbuf; msg =3D msg.Left(msg.Find(NUML2)); NUMV.MakeReverse(); msg.MakeReverse(); msg =3D msg.Left(msg.Find(NUMV)); NUMV.MakeReverse(); msg.MakeReverse(); =20 VERSION =3D atoi (msg); if (VERSION > OldVersion) { LOCAL.Remove(' '); EXTERNAL.Remove(' '); RedrawWindow(NULL,NULL,RDW_UPDATENOW); if (GetHttpFile(EXTERNAL, LOCAL) =3D=3D TRUE) MessageBox("It Worked!",MB_OK); else { char reply6[255]; sprintf(reply6,"%s\r\n%s",LOCAL,EXTERNAL); MessageBox(reply6,MB_OK); } } msg.Format(" Local : %s\n External : %s\n Update : = %d",LOCAL,EXTERNAL,VERSION); GetDlgItem(IDC_File)->SetWindowText(msg); FILENUM +=3D 1; } char *pFileName =3D "version.dat"; OldData.Close(); CFile::Remove(pFileName); char *pFileName2 =3D "version.new"; NewData.Close(); CFile::Rename(pFileName2, pFileName); } else { OldVersion =3D atoi (msg); msg.Format(" Update Patch \? Detected . . .\r\n\r\n Verifying . . . . = .. . . . . . . . Failure!\r\n Creating Data Table . . . Failure!\r\n\r\n = ERROR : UNKNOWN"); GetDlgItem(IDC_Status)->SetWindowText(msg); } } return TRUE; // return TRUE unless you set the focus to a control } // If you add a minimize button to your dialog, you will need the code = below // to draw the icon. For MFC applications using the document/view = model, // this is automatically done for you by the framework. void CUpdaterDlg::OnPaint()=20 { if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); // Center icon in client rectangle int cxIcon =3D GetSystemMetrics(SM_CXICON); int cyIcon =3D GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x =3D (rect.Width() - cxIcon + 1) / 2; int y =3D (rect.Height() - cyIcon + 1) / 2; // Draw the icon dc.DrawIcon(x, y, m_hIcon); } else { CDialog::OnPaint(); } } // The system calls this to obtain the cursor to display while the user = drags // the minimized window. HCURSOR CUpdaterDlg::OnQueryDragIcon() { return (HCURSOR) m_hIcon; } bool GetHttpFile(const char *url, const char *filename) { bool success =3D FALSE; TRY { CInternetSession mysession; CStdioFile *remotefile =3D mysession.OpenURL(url, = 1,INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_RELOAD); CFile myfile (filename, CFile::modeCreate|CFile::modeWrite); int numbytes; while (numbytes =3D remotefile->Read(httpbuff, HTTPBUFLEN)) { myfile.Write(httpbuff, numbytes); } success =3D TRUE; } CATCH_ALL(e) { success =3D FALSE; } END_CATCH_ALL; return (success); } SCRIPT : %MV 0 %N 9 1L Ultra BOT.exe=20 1F UltraBOT.exe=20 1V 1 2L Updater.exe=20 2F Updater.exe=20 2V 1 3L AW.DLL=20 3F AW.DLL=20 3V 1 4L Audio\DJ.mid=20 4F Audio/DJ.mid=20 4V 1 5L Audio\jeopardy.mid=20 5F Audio/jeopardy.mid=20 5V 1 6L Audio\Error.wav=20 6F Audio/Error.wav=20 6V 1 7L Audio\Logfinish.wav=20 7F Audio/Logfinish.wav=20 7V 1 8L Audio\Logstart.wav=20 8F Audio/Logstart.wav=20 8V 1 9L Audio\Startup.wav=20 9F Audio/Startup.wav=20 9V 1 %TM "Testing" Anyway, it always returns FALSE when it tries to use Fabers little HTTP = Function. If need be, I'll send you the ENTIRE Project - It's VERY small, and my = preliminary .dat structure info. Thanks, Andon Coleman Senior Programmer R&D Nothing, Inc. ------=_NextPart_000_0008_01BEF9FC.2626BBA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>// UpdaterDlg.cpp : implementation=20 file<BR>//</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>#include "stdafx.h"<BR>#include=20 "Updater.h"<BR>#include "UpdaterDlg.h"<BR>#include = "afxinet.h"</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>#ifdef _DEBUG<BR>#define new = DEBUG_NEW<BR>#undef=20 THIS_FILE<BR>static char THIS_FILE[] =3D = __FILE__;<BR>#endif</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>#define HTTPBUFLEN 1024<BR>char=20 httpbuff[HTTPBUFLEN];</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>bool GetHttpFile(const char *url, const = char=20 *filename);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial=20 size=3D2>////////////////////////////////////////////////////////////////= /////////////<BR>//=20 CUpdaterDlg dialog</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>CUpdaterDlg::CUpdaterDlg(CWnd* pParent=20 /*=3DNULL*/)<BR> : CDialog(CUpdaterDlg::IDD, = pParent)<BR>{<BR> <A=20 href=3D"file://{{">file://{{</A>AFX_DATA_INIT(CUpdaterDlg)<BR>  = ;// NOTE:=20 the ClassWizard will add member initialization here<BR> <A=20 href=3D"file://}}">file://}}</A>AFX_DATA_INIT<BR> // Note that = LoadIcon does=20 not require a subsequent DestroyIcon in Win32<BR> m_hIcon =3D=20 AfxGetApp()->LoadIcon(IDR_MAINFRAME);<BR>}</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>void = CUpdaterDlg::DoDataExchange(CDataExchange*=20 pDX)<BR>{<BR> CDialog::DoDataExchange(pDX);<BR> <A=20 href=3D"file://{{">file://{{</A>AFX_DATA_MAP(CUpdaterDlg)<BR> = // NOTE:=20 the ClassWizard will add DDX and DDV calls here<BR> <A=20 href=3D"file://}}">file://}}</A>AFX_DATA_MAP<BR>}</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>BEGIN_MESSAGE_MAP(CUpdaterDlg, = CDialog)<BR> <A=20 href=3D"file://{{">file://{{</A>AFX_MSG_MAP(CUpdaterDlg)<BR> ON_WM_P= AINT()<BR> ON_WM_QUERYDRAGICON()<BR> <A=20 href=3D"file://}}">file://}}</A>AFX_MSG_MAP<BR>END_MESSAGE_MAP()</FONT></= DIV> <DIV> </DIV> <DIV><FONT face=3DArial=20 size=3D2>////////////////////////////////////////////////////////////////= /////////////<BR>//=20 CUpdaterDlg message handlers</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>BOOL = CUpdaterDlg::OnInitDialog()<BR>{</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial = size=3D2> CDialog::OnInitDialog();</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> SetIcon(m_hIcon,=20 TRUE);<BR> SetIcon(m_hIcon, FALSE);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> CFile NewData ("version.new",=20 CFile::modeRead);<BR> char pbuf[2000];<BR> UINT nBytesRead =3D = NewData.Read( pbuf, 1000 );<BR> CString msg =3D pbuf;<BR> int=20 NewVersion;<BR> int OldVersion;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> msg =3D=20 msg.Left(msg.Find("%N"));<BR> msg.MakeReverse();<BR> msg =3D=20 msg.Left(msg.Find("VM%"));<BR> msg.MakeReverse();<BR> NewVersio= n =3D=20 atoi (msg);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> if (1 =3D=3D = 1)<BR> {<BR> CFile=20 OldData ("version.dat", CFile::modeRead);<BR> char=20 pbuf2[2000];<BR> UINT nBytesRead =3D OldData.Read( pbuf2, = 1000=20 );<BR> CString msg =3D pbuf2;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> msg =3D=20 msg.Left(msg.Find("%N"));<BR> msg.MakeReverse();<BR> &nbs= p;msg =3D=20 msg.Left(msg.Find("VM%"));<BR> msg.MakeReverse();<BR> &nb= sp;OldVersion=20 =3D atoi (msg);<BR> <BR> if (NewVersion =3D=3D=20 OldVersion)<BR> {<BR> OldVersion =3D atoi=20 (msg);<BR> msg.Format(" Update Patch %d Detected . . = ..\r\n\r\n=20 Verifying . . . . . . . . . . . . Failure!\r\n Creating Data Table . . . = Failure!\r\n\r\n NO DIFFERENCE IN=20 VERSION!",NewVersion);<BR> GetDlgItem(IDC_Status)->Se= tWindowText(msg);<BR> }</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> else if (NewVersion >=20 OldVersion)<BR> {</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> msg.Format(" Update = Patch %d=20 Detected . . .\r\n\r\n Verifying . . . . . . . . . . . . Success!\r\n = Creating=20 Data Table . . . Success!\r\n\r\n Applying Patch for %d to=20 %d",NewVersion,NewVersion,OldVersion);<BR> GetDlgItem(ID= C_Status)->SetWindowText(msg);<BR> msg=20 =3D pbuf;<BR> msg =3D=20 msg.Left(msg.Find("1L"));<BR> msg.MakeReverse();<BR>&nbs= p; msg=20 =3D = msg.Left(msg.Find("N%"));<BR> msg.MakeReverse();</FONT><= /DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> int FILES =3D atoi=20 (msg);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> msg =3D=20 pbuf;<BR> int FILENUM =3D 1;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> CString=20 LOCAL;<BR> CString EXTERNAL;<BR> int=20 VERSION;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> while (FILENUM !=3D=20 FILES)<BR> {<BR> CString=20 NUML;<BR> CString=20 NUML2;<BR> CString=20 NUMF;<BR> CString NUMV;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial=20 size=3D2> NUML.Format("%dL",FILENUM);<BR> &nb= sp; NUML2.Format("%dL",(FILENUM+1));<BR> &nbs= p;NUMF.Format("%dF",FILENUM);<BR> NUMV.Format("%dV= ",FILENUM);<BR> <BR> msg=20 =3D pbuf;<BR> msg =3D=20 msg.Left(msg.Find(NUMF));<BR> NUML.MakeReverse();<= BR> msg.MakeReverse();<BR> = msg=20 =3D=20 msg.Left(msg.Find(NUML));<BR> NUML.MakeReverse();<= BR> msg.MakeReverse();</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> LOCAL =3D = msg;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> msg =3D=20 pbuf;<BR> msg =3D=20 msg.Left(msg.Find(NUMV));<BR> NUMF.MakeReverse();<= BR> msg.MakeReverse();<BR> = msg=20 =3D=20 msg.Left(msg.Find(NUMF));<BR> NUMF.MakeReverse();<= BR> msg.MakeReverse();</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> EXTERNAL =3D=20 msg;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> msg =3D=20 pbuf;<BR> msg =3D=20 msg.Left(msg.Find(NUML2));<BR> NUMV.MakeReverse();= <BR> msg.MakeReverse();<BR>  = ;msg=20 =3D=20 msg.Left(msg.Find(NUMV));<BR> NUMV.MakeReverse();<= BR> msg.MakeReverse();<BR> = <BR> VERSION=20 =3D atoi (msg);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> if (VERSION = >=20 OldVersion)<BR> {</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial = size=3D2> LOCAL.Remove('=20 ');<BR> EXTERNAL.Remove(' ');</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial=20 size=3D2> RedrawWindow(NULL,NULL,RDW_UPDATEN= OW);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> if=20 (GetHttpFile(EXTERNAL, LOCAL) =3D=3D=20 TRUE)<BR> MessageBox("It=20 Worked!",MB_OK);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial=20 size=3D2> else<BR> &n= bsp;{<BR> char=20 reply6[255];<BR> sprintf(reply6,"%s\r\= n%s",LOCAL,EXTERNAL);<BR> MessageBox(r= eply6,MB_OK);<BR> }<BR> &nb= sp;}</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial = size=3D2><BR> msg.Format("=20 Local : %s\n External : %s\n Update :=20 %d",LOCAL,EXTERNAL,VERSION);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial=20 size=3D2> GetDlgItem(IDC_File)->SetWindowText(m= sg);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2><BR> FILENUM = +=3D=20 1;<BR> }</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> char *pFileName =3D=20 "version.dat";<BR> OldData.Close();<BR>  = ;CFile::Remove(pFileName);<BR> char=20 *pFileName2 =3D=20 "version.new";<BR> NewData.Close();<BR>  = ;CFile::Rename(pFileName2,=20 pFileName);<BR> }</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial=20 size=3D2> else<BR> {<BR> OldVersio= n =3D atoi=20 (msg);<BR> msg.Format(" Update Patch \? Detected . . = ..\r\n\r\n=20 Verifying . . . . . . . . . . . . Failure!\r\n Creating Data Table . . . = Failure!\r\n\r\n ERROR :=20 UNKNOWN");<BR> GetDlgItem(IDC_Status)->SetWindowText(= msg);<BR> }<BR> }<BR> return=20 TRUE; // return TRUE unless you set the focus to a=20 control<BR>}<BR>// If you add a minimize button to your dialog, you will = need=20 the code below<BR>// to draw the icon. For MFC applications = using=20 the document/view model,<BR>// this is automatically done for you = by the=20 framework.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>void CUpdaterDlg::OnPaint() = <BR>{<BR> if=20 (IsIconic())<BR> {<BR> CPaintDC dc(this); // device = context for=20 painting</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial = size=3D2> SendMessage(WM_ICONERASEBKGND, (WPARAM)=20 dc.GetSafeHdc(), 0);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> // Center icon in client=20 rectangle<BR> int cxIcon =3D=20 GetSystemMetrics(SM_CXICON);<BR> int cyIcon =3D=20 GetSystemMetrics(SM_CYICON);<BR> CRect=20 rect;<BR> GetClientRect(&rect);<BR> int x =3D=20 (rect.Width() - cxIcon + 1) / 2;<BR> int y =3D (rect.Height() = - cyIcon=20 + 1) / 2;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> // Draw the=20 icon<BR> dc.DrawIcon(x, y,=20 m_hIcon);<BR> }<BR> else<BR> {<BR> CDialog::OnP= aint();<BR> }<BR>}</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>// The system calls this to obtain the = cursor to=20 display while the user drags<BR>// the minimized = window.<BR>HCURSOR=20 CUpdaterDlg::OnQueryDragIcon()<BR>{<BR> return (HCURSOR)=20 m_hIcon;<BR>}</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>bool GetHttpFile(const char *url, const = char=20 *filename)<BR>{<BR> bool success =3D FALSE;<BR> TRY = {<BR> =20 CInternetSession mysession;<BR> CStdioFile *remotefile =3D=20 mysession.OpenURL(url,=20 1,INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_RELOAD);<BR> CFile = myfile=20 (filename, CFile::modeCreate|CFile::modeWrite);<BR> int=20 numbytes;<BR> while (numbytes =3D remotefile->Read(httpbuff,=20 HTTPBUFLEN))<BR> {<BR> myfile.Write(httpbuff,=20 numbytes);<BR> }<BR> success =3D=20 TRUE;<BR> }<BR> CATCH_ALL(e)<BR> {<BR> success =3D=20 FALSE;<BR> }<BR> END_CATCH_ALL;<BR> return=20 (success);<BR>}<BR></FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>SCRIPT :</FONT></DIV> <DIV><FONT face=3DArial size=3D2><FONT size=3D2> <P>%MV 0</P> <P>%N 9</P> <P>1L Ultra BOT.exe </P> <P>1F UltraBOT.exe </P> <P>1V 1</P> <P>2L Updater.exe </P> <P>2F Updater.exe </P> <P>2V 1</P> <P>3L AW.DLL </P> <P>3F AW.DLL </P> <P>3V 1</P> <P>4L Audio\DJ.mid </P> <P>4F Audio/DJ.mid </P> <P>4V 1</P> <P>5L Audio\jeopardy.mid </P> <P>5F Audio/jeopardy.mid </P> <P>5V 1</P> <P>6L Audio\Error.wav </P> <P>6F Audio/Error.wav </P> <P>6V 1</P> <P>7L Audio\Logfinish.wav </P> <P>7F Audio/Logfinish.wav </P> <P>7V 1</P> <P>8L Audio\Logstart.wav </P> <P>8F Audio/Logstart.wav </P> <P>8V 1</P> <P>9L Audio\Startup.wav </P> <P>9F Audio/Startup.wav </P> <P>9V 1</P> <P>%TM "Testing"</P> <P> </P> <P>Anyway, it always returns FALSE when it tries to use Fabers little = HTTP=20 Function.</P> <P>If need be, I'll send you the ENTIRE Project - It's VERY small,=20 and my preliminary .dat structure info.</P> <P> </P> <P>Thanks,</P> <P>Andon Coleman</P> <P> </P> <P>Senior Programmer</P> <P>R&D</P> <P> </P> <P>Nothing, Inc.</P></FONT></DIV></FONT></BODY></HTML> ------=_NextPart_000_0008_01BEF9FC.2626BBA0-- aaron hillOct 11, 1999, 11:39pm
This is a multi-part message in MIME format.
------=_NextPart_000_0037_01BF1417.FFAA08C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Have you looked into Flex/Bison to doing the parsing for you? Using = these tools you can spend more time on the more important code in your = program. If the project is VC, I could take a look. (I have VC6.) Send it to = serac at lightmail.com. P.S. If you are interested in Flex/Bison, I highly suggest you buy the = O'Reilly & Associates, Inc. book "Lex & Yacc" -- Levine, Mason & Brown = (ISBN 1-56592-000-7). And Delorie (creator of DJGPP) has Flex and Bison = ports for DOS. There is a little bit of work to get VC to automatically = run them. Flex does have support for a C++ lexical analyzer. However, = I've not been able to find a reliable C++ version of the Bison parser. = But remember that all C code runs along side C++, so you could probably = get along with using the C versions of both. [View Quote] Now my only problem is the downloaded update files come out = corrupt, perhaps you could take a look at the project file? (It's only = 24KB Compiled, so it's not large by ANY means). ------=_NextPart_000_0037_01BF1417.FFAA08C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV>Have you looked into Flex/Bison to doing the parsing for=20 you? Using these tools you can spend more time on the more = important code=20 in your program.</DIV> <DIV> </DIV> <DIV>If the project is VC, I could take a look. (I have = VC6.) Send=20 it to <A = href=3D"mailto:serac at lightmail.com">serac at lightmail.com</A>.</DIV> <DIV> </DIV> <DIV>P.S. If you are interested in Flex/Bison, I highly suggest you buy = the=20 O'Reilly & Associates, Inc. book "Lex & Yacc" -- Levine, = Mason=20 & Brown (ISBN 1-56592-000-7). And Delorie (creator of DJGPP) = has Flex=20 and Bison ports for DOS. There is a little bit of work to get VC = to=20 automatically run them. Flex does have support for a C++ lexical=20 analyzer. However, I've not been able to find a reliable C++ = version of=20 the Bison parser. But remember that all C code runs along side = C++, so=20 you could probably get along with using the C versions of = both.</DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: = 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV>Andon M. Coleman <<A=20 href=3D"mailto:gizmo98 at earthlink.net">gizmo98 at earthlink.net</A>> = wrote in=20 message <A = href=3D"news:38016db3.0 at homer">news:38016db3.0 at homer</A>...</DIV> <DIV><FONT face=3DArial> Actually, my problem was in = my=20 "Parsing Code" . . . I simply added some more code to strain the = data to=20 the Left 4 Bytes in the CString (Since through my formatting / testing = I have=20 added many more bytes) . . . And voila, it worked :)</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial> Now my only problem is the = downloaded=20 update files come out corrupt, perhaps you could take a look at the = project=20 file? (It's only 24KB Compiled, so it's not large by ANY=20 means).</FONT></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0037_01BF1417.FFAA08C0-- andon m. colemanOct 13, 1999, 6:02pm
This is a multi-part message in MIME format.
------=_NextPart_000_0013_01BF1594.6BA9DAA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Actually, I fixed every single bug :) For some reason attempting to put my HTTP Get File function into a = Thread of its own was a bad idea . . . So, I moved the ENTIRE Process = into its own thread, now it works great . . . You can move the window = around while its downloading, and the Progress indicators work = perfectly. But thanks for the help originally . . . Andon M. Coleman Senior Programmer R&D Nothing, Inc. [View Quote] If the project is VC, I could take a look. (I have VC6.) Send it to = serac at lightmail.com. P.S. If you are interested in Flex/Bison, I highly suggest you buy the = O'Reilly & Associates, Inc. book "Lex & Yacc" -- Levine, Mason & Brown = (ISBN 1-56592-000-7). And Delorie (creator of DJGPP) has Flex and Bison = ports for DOS. There is a little bit of work to get VC to automatically = run them. Flex does have support for a C++ lexical analyzer. However, = I've not been able to find a reliable C++ version of the Bison parser. = But remember that all C code runs along side C++, so you could probably = get along with using the C versions of both. [View Quote] Now my only problem is the downloaded update files come out = corrupt, perhaps you could take a look at the project file? (It's only = 24KB Compiled, so it's not large by ANY means). ------=_NextPart_000_0013_01BF1594.6BA9DAA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial>Actually, I fixed every single = bug :)</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial> For some reason attempting to = put my=20 HTTP Get File function into a Thread of its own was a bad idea . . . So, = I moved=20 the ENTIRE Process into its own thread, now it works great . . . You can = move=20 the window around while its downloading, and the Progress indicators = work=20 perfectly.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial>But thanks for the help originally . . = ..</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial>Andon M. Coleman</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial>Senior Programmer</FONT></DIV> <DIV><FONT face=3DArial>R&D</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial>Nothing, Inc.</FONT></DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: = 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV>Aaron Hill <<A=20 href=3D"mailto:serac at lightmail.com">serac at lightmail.com</A>> wrote = in message=20 <A href=3D"news:380291fc at homer">news:380291fc at homer</A>...</DIV> <DIV>Have you looked into Flex/Bison to doing the parsing = for=20 you? Using these tools you can spend more time on the more = important=20 code in your program.</DIV> <DIV> </DIV> <DIV>If the project is VC, I could take a look. (I have = VC6.) Send=20 it to <A = href=3D"mailto:serac at lightmail.com">serac at lightmail.com</A>.</DIV> <DIV> </DIV> <DIV>P.S. If you are interested in Flex/Bison, I highly suggest you = buy the=20 O'Reilly & Associates, Inc. book "Lex & Yacc" -- Levine, = Mason=20 & Brown (ISBN 1-56592-000-7). And Delorie (creator of DJGPP) = has=20 Flex and Bison ports for DOS. There is a little bit of work to = get VC to=20 automatically run them. Flex does have support for a C++ lexical = analyzer. However, I've not been able to find a reliable C++ = version of=20 the Bison parser. But remember that all C code runs along side = C++, so=20 you could probably get along with using the C versions of = both.</DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; = MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV>Andon M. Coleman <<A=20 href=3D"mailto:gizmo98 at earthlink.net">gizmo98 at earthlink.net</A>> = wrote in=20 message <A = href=3D"news:38016db3.0 at homer">news:38016db3.0 at homer</A>...</DIV> <DIV><FONT face=3DArial> Actually, my problem was = in my=20 "Parsing Code" . . . I simply added some more code to strain the=20 data to the Left 4 Bytes in the CString (Since through my = formatting /=20 testing I have added many more bytes) . . . And voila, it worked=20 :)</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial> Now my only problem is = the=20 downloaded update files come out corrupt, perhaps you could take a = look at=20 the project file? (It's only 24KB Compiled, so it's not large by ANY = means).</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0013_01BF1594.6BA9DAA0-- |