-
crash on close
In my windows program I use this code, when using it it crashes on close:
Code:
char URL[20];
sprintf(URL, "http://newyork.yankees.mlb.com/NASApp/mlb/nyy/homepage/nyy_homepage.jsp"); //test url
char FileName[15] = "yankees.txt";
URLDownloadToFile(NULL, URL, FileName, 0, NULL);
FILE *myfile;
char big[5000];
FILE *in;
in = fopen(FileName,"r");
while (!feof(in))
{
if ( fgets(big,sizeof(big),in) != NULL)
{
AppendToEdit(big, Test);
}
}
fclose(in);
-
The string you are copying to URL is WAY too long. Define URL as charURL[200], insread of 20. You are getting a memory overwrite error, most likely.
Z.
-
damn what a stupid thing to get an error on, originally I had a different url in there that was under 20...well thanks!!!! :cool: :D :D