For simplicity, here is my upload_files function (this isnt exactly it, but there isnt any problem with it, so here are just the basics):
Code:
DWORD WINAPI upload_files(HWND hWndDlg) {
if(error in upload anywhere) {
error(GetParent(hWndDlg), error); // my own custom error function that uses the first argument to center the error dialog box in the program
return 0;
}
return 1;
}
Once again for simplicity, here is the basics to my WndProc (the window procedure to the program):
Code:
LRESULT CALLBACK WndProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam) {
switch(HIWORD(Message)) {
case WM_COMMAND:
switch(LOWORD(Message)) {
case WM_UPLOAD:
DialogBox(hInst, "PROGRESSDLG", hWnd, DlgProg);
break;
}
return true;
}
}
For simplicity, once again, here is the DlgProg function:
Code:
INT_PTR CALLBACK DlgProg(HWND hWndDlg, UINT Message, WPARAM wParam, LPARAM lParam) {
switch(Message) {
case WM_INITDIALOG:
// create progress bar
DWORD dwID;
HANDLE hThread=CreateThread(NULL, 0, upload_files, hWndDlg, 0, &dwID);
CloseHandle(hThread);
return true;
}
}
Do you need any more code? I think thats about all that has to do with the upload portion. Thanks for the help.
And for now, I tested that security descriptor code and I havent had a problem yet. I'm going to keep trying to see if I can get it to stop like it did before, but I think that was the trick.
Thanks for your help.