• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Loweynet


Commit MetaInfo

Revisão9b756a48d7a13d5080350823d8117f217535cd62 (tree)
Hora2012-02-11 23:19:36
Autors_kawamoto <s_kawamoto@user...>
Commiters_kawamoto

Mensagem de Log

Fix codes for debugging.
Recompile executable files.

Mudança Sumário

Diff

Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
Binary files a/FFFTP_Eng_Release_64/FFFTP.exe and b/FFFTP_Eng_Release_64/FFFTP.exe differ
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
Binary files a/Release_64/FFFTP.exe and b/Release_64/FFFTP.exe differ
--- a/main.c
+++ b/main.c
@@ -258,66 +258,68 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi
258258
259259 // プロセス保護
260260 #ifdef ENABLE_PROCESS_PROTECTION
261- DWORD ProtectLevel;
262- char* pCommand;
263- char Option[FMAX_PATH+1];
264- ProtectLevel = PROCESS_PROTECTION_NONE;
265- pCommand = lpszCmdLine;
266- while(pCommand = GetToken(pCommand, Option))
267261 {
268- if(strcmp(Option, "--protect") == 0)
262+ DWORD ProtectLevel;
263+ char* pCommand;
264+ char Option[FMAX_PATH+1];
265+ ProtectLevel = PROCESS_PROTECTION_NONE;
266+ pCommand = lpszCmdLine;
267+ while(pCommand = GetToken(pCommand, Option))
269268 {
270- ProtectLevel = PROCESS_PROTECTION_DEFAULT;
271- break;
272- }
273- else if(strcmp(Option, "--protect-high") == 0)
274- {
275- ProtectLevel = PROCESS_PROTECTION_HIGH;
276- break;
277- }
278- else if(strcmp(Option, "--protect-medium") == 0)
279- {
280- ProtectLevel = PROCESS_PROTECTION_MEDIUM;
281- break;
269+ if(strcmp(Option, "--protect") == 0)
270+ {
271+ ProtectLevel = PROCESS_PROTECTION_DEFAULT;
272+ break;
273+ }
274+ else if(strcmp(Option, "--protect-high") == 0)
275+ {
276+ ProtectLevel = PROCESS_PROTECTION_HIGH;
277+ break;
278+ }
279+ else if(strcmp(Option, "--protect-medium") == 0)
280+ {
281+ ProtectLevel = PROCESS_PROTECTION_MEDIUM;
282+ break;
283+ }
284+ else if(strcmp(Option, "--protect-low") == 0)
285+ {
286+ ProtectLevel = PROCESS_PROTECTION_LOW;
287+ break;
288+ }
282289 }
283- else if(strcmp(Option, "--protect-low") == 0)
290+ if(ProtectLevel != PROCESS_PROTECTION_NONE)
284291 {
285- ProtectLevel = PROCESS_PROTECTION_LOW;
286- break;
287- }
288- }
289- if(ProtectLevel != PROCESS_PROTECTION_NONE)
290- {
291- SetProcessProtectionLevel(ProtectLevel);
292- if(!InitializeLoadLibraryHook())
293- {
294- MessageBox(NULL, MSGJPN321, "FFFTP", MB_OK | MB_ICONERROR);
295- return 0;
296- }
292+ SetProcessProtectionLevel(ProtectLevel);
293+ if(!InitializeLoadLibraryHook())
294+ {
295+ MessageBox(NULL, MSGJPN321, "FFFTP", MB_OK | MB_ICONERROR);
296+ return 0;
297+ }
297298 #ifndef _DEBUG
298- if(IsDebuggerPresent())
299- {
300- MessageBox(NULL, MSGJPN322, "FFFTP", MB_OK | MB_ICONERROR);
301- return 0;
302- }
299+ if(IsDebuggerPresent())
300+ {
301+ MessageBox(NULL, MSGJPN322, "FFFTP", MB_OK | MB_ICONERROR);
302+ return 0;
303+ }
303304 #endif
304- if(!UnloadUntrustedModule())
305- {
306- MessageBox(NULL, MSGJPN323, "FFFTP", MB_OK | MB_ICONERROR);
307- return 0;
308- }
305+ if(!UnloadUntrustedModule())
306+ {
307+ MessageBox(NULL, MSGJPN323, "FFFTP", MB_OK | MB_ICONERROR);
308+ return 0;
309+ }
309310 #ifndef _DEBUG
310- if(RestartProtectedProcess(" --restart"))
311- return 0;
311+ if(RestartProtectedProcess(" --restart"))
312+ return 0;
312313 #endif
313- if(!EnableLoadLibraryHook(TRUE))
314- {
315- MessageBox(NULL, MSGJPN324, "FFFTP", MB_OK | MB_ICONERROR);
316- return 0;
314+ if(!EnableLoadLibraryHook(TRUE))
315+ {
316+ MessageBox(NULL, MSGJPN324, "FFFTP", MB_OK | MB_ICONERROR);
317+ return 0;
318+ }
317319 }
320+ else
321+ InitializeLoadLibraryHook();
318322 }
319- else
320- InitializeLoadLibraryHook();
321323 #endif
322324
323325 // マルチコアCPUの特定環境下でファイル通信中にクラッシュするバグ対策
Binary files a/putty/Release/PuTTY.dll and b/putty/Release/PuTTY.dll differ
Binary files a/putty/x64/Release/PuTTY.dll and b/putty/x64/Release/PuTTY.dll differ
--- a/socketwrapper.c
+++ b/socketwrapper.c
@@ -1046,8 +1046,16 @@ BOOL LoadPuTTY()
10461046 RegisterTrustedModuleSHA1Hash("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00");
10471047 #endif
10481048 // デバッグ用
1049-// g_hPuTTY = LoadLibrary("putty.dll");
1050- g_hPuTTY = LoadLibrary("C:\\SourceForge\\ffftp\\putty\\Debug\\PuTTY.dll");
1049+#ifdef _DEBUG
1050+ {
1051+ char Path[MAX_PATH];
1052+ GetModuleFileName(NULL, Path, MAX_PATH);
1053+ strcpy(strrchr(Path, '\\'), "\\..\\putty\\Debug\\PuTTY.dll");
1054+ g_hPuTTY = LoadLibrary(Path);
1055+ }
1056+#else
1057+ g_hPuTTY = LoadLibrary("putty.dll");
1058+#endif
10511059 if(!g_hPuTTY
10521060 || !(p_SFTP_Create = (_SFTP_Create)GetProcAddress(g_hPuTTY, "SFTP_Create"))
10531061 || !(p_SFTP_Destroy = (_SFTP_Destroy)GetProcAddress(g_hPuTTY, "SFTP_Destroy"))