Loweynet
Revision | 95d60f5c65ef1f7b5ef1ebe4c30f8d64ab69a927 (tree) |
---|---|
Time | 2015-11-29 16:22:47 |
Author | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Fix bugs of option dialog.
@@ -973,7 +973,7 @@ BEGIN | ||
973 | 973 | "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,94,196,10 |
974 | 974 | CONTROL "ØfÉQUITR}hðé(&Q)",CONNECT_SENDQUIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,108,173,10 |
975 | 975 | CONTROL "RAŞäðsíÈ¢(&R)",CONNECT_NORAS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,122,173,10 |
976 | - CONTROL "ñPASV[hÉUPnPð§äðs·é(&U)",CONNECT_UPNP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,136,173,10 | |
976 | + CONTROL "ñPASV[hÉUPnP̧äðs·é(&U)",CONNECT_UPNP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,136,173,10 | |
977 | 977 | END |
978 | 978 | |
979 | 979 | rasnotify_dlg DIALOG 0, 0, 158, 46 |
@@ -81,7 +81,7 @@ | ||
81 | 81 | // ソフトウェア自動更新 |
82 | 82 | // リリースバージョンはリリース予定年(10進数4桁)+月(2桁)+日(2桁)+通し番号(0スタート2桁)とする |
83 | 83 | // 2014年7月31日中の30個目のリリースは2014073129 |
84 | -#define RELEASE_VERSION_NUM 2015103001 /* リリースバージョン */ | |
84 | +#define RELEASE_VERSION_NUM 2015112900 /* リリースバージョン */ | |
85 | 85 | |
86 | 86 | |
87 | 87 | // SourceForge.JPによるフォーク |
@@ -1012,6 +1012,7 @@ static INT_PTR CALLBACK MirrorSettingProc(HWND hDlg, UINT message, WPARAM wParam | ||
1012 | 1012 | SetMultiTextToList(hDlg, MIRROR_NODEL_LIST, MirrorNoDel); |
1013 | 1013 | SendDlgItemMessage(hDlg, MIRROR_LOW, BM_SETCHECK, MirrorFnameCnv, 0); |
1014 | 1014 | SendDlgItemMessage(hDlg, MIRROR_UPDEL_NOTIFY, BM_SETCHECK, MirUpDelNotify, 0); |
1015 | + SendDlgItemMessage(hDlg, MIRROR_DOWNDEL_NOTIFY, BM_SETCHECK, MirDownDelNotify, 0); | |
1015 | 1016 | // ミラーリング設定追加 |
1016 | 1017 | SendDlgItemMessage(hDlg, MIRROR_NO_TRANSFER, BM_SETCHECK, MirrorNoTransferContents, 0); |
1017 | 1018 | return(TRUE); |
@@ -1349,8 +1350,7 @@ static INT_PTR CALLBACK ConnectSettingProc(HWND hDlg, UINT message, WPARAM wPara | ||
1349 | 1350 | SendQuit = SendDlgItemMessage(hDlg, CONNECT_SENDQUIT, BM_GETCHECK, 0, 0); |
1350 | 1351 | NoRasControl = SendDlgItemMessage(hDlg, CONNECT_NORAS, BM_GETCHECK, 0, 0); |
1351 | 1352 | // UPnP対応 |
1352 | - if(IsUPnPLoaded() == YES) | |
1353 | - UPnPEnabled = SendDlgItemMessage(hDlg, CONNECT_UPNP, BM_GETCHECK, 0, 0); | |
1353 | + UPnPEnabled = SendDlgItemMessage(hDlg, CONNECT_UPNP, BM_GETCHECK, 0, 0); | |
1354 | 1354 | break; |
1355 | 1355 | |
1356 | 1356 | case PSN_RESET : |
@@ -1362,22 +1362,28 @@ int LoadUPnP() | ||
1362 | 1362 | { |
1363 | 1363 | int Sts; |
1364 | 1364 | Sts = FFFTP_FAIL; |
1365 | - if(CoCreateInstance(&CLSID_UPnPNAT, NULL, CLSCTX_ALL, &IID_IUPnPNAT, (void**)&pUPnPNAT) == S_OK) | |
1365 | + if(IsMainThread()) | |
1366 | 1366 | { |
1367 | - if(pUPnPNAT->lpVtbl->get_StaticPortMappingCollection(pUPnPNAT, &pUPnPMap) == S_OK) | |
1368 | - Sts = FFFTP_SUCCESS; | |
1367 | + if(CoCreateInstance(&CLSID_UPnPNAT, NULL, CLSCTX_ALL, &IID_IUPnPNAT, (void**)&pUPnPNAT) == S_OK) | |
1368 | + { | |
1369 | + if(pUPnPNAT->lpVtbl->get_StaticPortMappingCollection(pUPnPNAT, &pUPnPMap) == S_OK) | |
1370 | + Sts = FFFTP_SUCCESS; | |
1371 | + } | |
1369 | 1372 | } |
1370 | 1373 | return Sts; |
1371 | 1374 | } |
1372 | 1375 | |
1373 | 1376 | void FreeUPnP() |
1374 | 1377 | { |
1375 | - if(pUPnPMap != NULL) | |
1376 | - pUPnPMap->lpVtbl->Release(pUPnPMap); | |
1377 | - pUPnPMap = NULL; | |
1378 | - if(pUPnPNAT != NULL) | |
1379 | - pUPnPNAT->lpVtbl->Release(pUPnPNAT); | |
1380 | - pUPnPNAT = NULL; | |
1378 | + if(IsMainThread()) | |
1379 | + { | |
1380 | + if(pUPnPMap != NULL) | |
1381 | + pUPnPMap->lpVtbl->Release(pUPnPMap); | |
1382 | + pUPnPMap = NULL; | |
1383 | + if(pUPnPNAT != NULL) | |
1384 | + pUPnPNAT->lpVtbl->Release(pUPnPNAT); | |
1385 | + pUPnPNAT = NULL; | |
1386 | + } | |
1381 | 1387 | } |
1382 | 1388 | |
1383 | 1389 | int IsUPnPLoaded() |