| 1332 | *****************************************************/ |
| 1333 | extern "C" |
| 1334 | void __declspec(dllexport) __cdecl get(HWND hwndParent, |
| 1335 | int string_size, |
| 1336 | TCHAR *variables, |
| 1337 | stack_t **stacktop, |
| 1338 | extra_parameters *extra |
| 1339 | ) |
| 1340 | { |
| 1341 | HANDLE hThread; |
| 1342 | DWORD dwThreadId; |
| 1343 | MSG msg; |
| 1344 | TCHAR szUsername[64]=TEXT(""), // proxy params |
| 1345 | szPassword[64]=TEXT(""); |
| 1346 | |
| 1347 | |
| 1348 | EXDLL_INIT(); |
| 1349 | |
| 1350 | // for repeating /nounload plug-un calls - global vars clean up |
| 1351 | silent = popup = resume = nocancel = noproxy = nocookies = false; |
| 1352 | g_ignorecertissues = false; |
| 1353 | myFtpCommand = NULL; |
| 1354 | openType = INTERNET_OPEN_TYPE_PRECONFIG; |
| 1355 | status = ST_CONNECTING; |
| 1356 | *szCaption = *szCancel = *szUserAgent = *szBasic = *szAuth = 0; |
| 1357 | |
| 1358 | url = (TCHAR*)LocalAlloc(LPTR, string_size * sizeof(TCHAR)); |
| 1359 | if(szPost) |
| 1360 | { |
| 1361 | popstring(url); |
| 1362 | #ifdef UNICODE |
| 1363 | WideCharToMultiByte(CP_ACP, 0, url, -1, szPost, string_size, NULL, NULL); |
| 1364 | #else |
| 1365 | lstrcpy(szPost, url); |
| 1366 | #endif |
| 1367 | fSize = (DWORD)lstrlenA(szPost); |
| 1368 | } |
| 1369 | // global silent option |
| 1370 | if(extra->exec_flags->silent != 0) |
| 1371 | silent = true; |
| 1372 | // we must take this from stack, or push url back |
| 1373 | while(!popstring(url) && *url == TEXT('/')) |
| 1374 | { |
| 1375 | if(lstrcmpi(url, TEXT("/silent")) == 0) |
| 1376 | silent = true; |
| 1377 | else if(lstrcmpi(url, TEXT("/weaksecurity")) == 0) |
| 1378 | g_ignorecertissues = true; |
| 1379 | else if(lstrcmpi(url, TEXT("/caption")) == 0) |
| 1380 | popstring(szCaption); |
| 1381 | else if(lstrcmpi(url, TEXT("/username")) == 0) |
| 1382 | popstring(szUsername); |
| 1383 | else if(lstrcmpi(url, TEXT("/password")) == 0) |
| 1384 | popstring(szPassword); |
| 1385 | else if(lstrcmpi(url, TEXT("/nocancel")) == 0) |
| 1386 | nocancel = true; |
| 1387 | else if(lstrcmpi(url, TEXT("/nocookies")) == 0) |
| 1388 | nocookies = true; |
| 1389 | else if(lstrcmpi(url, TEXT("/noproxy")) == 0) |
| 1390 | openType = INTERNET_OPEN_TYPE_DIRECT; |
| 1391 | else if(lstrcmpi(url, TEXT("/popup")) == 0) |
no test coverage detected