OSDN Git Service

Add workarounds for Windows 2000/XP.
authors_kawamoto <s_kawamoto@users.sourceforge.jp>
Sat, 21 Jun 2014 06:01:48 +0000 (15:01 +0900)
committers_kawamoto <s_kawamoto@users.sourceforge.jp>
Sat, 21 Jun 2014 06:01:48 +0000 (15:01 +0900)
FFFTP.vc80ee.vcproj
FFFTP.vc90.vcproj
FFFTP.vcproj
FFFTP_Eng_Release/FFFTP.exe
FFFTP_English.vc80ee.vcproj
FFFTP_English.vc90.vcproj
FFFTP_English.vcproj
Release/FFFTP.exe
config.h
updater.c

index fa0ad87..2621a63 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\apiemulator.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\bookmark.c"\r
                                >\r
                        </File>\r
                        Filter="h;hpp;hxx;hm;inl;fi;fd"\r
                        >\r
                        <File\r
+                               RelativePath=".\apiemulator.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\common.h"\r
                                >\r
                        </File>\r
index 14f062b..586ad13 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\apiemulator.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\bookmark.c"\r
                                >\r
                        </File>\r
                        Filter="h;hpp;hxx;hm;inl;fi;fd"\r
                        >\r
                        <File\r
+                               RelativePath=".\apiemulator.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\common.h"\r
                                >\r
                        </File>\r
index 1dff84a..573f6e4 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\apiemulator.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\bookmark.c"\r
                                >\r
                        </File>\r
                        Filter="h;hpp;hxx;hm;inl;fi;fd"\r
                        >\r
                        <File\r
+                               RelativePath=".\apiemulator.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\common.h"\r
                                >\r
                        </File>\r
index 0ad2903..be17951 100644 (file)
Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
index 4630e61..149d658 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\apiemulator.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\bookmark.c"\r
                                >\r
                        </File>\r
                        Filter="h;hpp;hxx;hm;inl"\r
                        >\r
                        <File\r
+                               RelativePath=".\apiemulator.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\common.h"\r
                                >\r
                        </File>\r
index c63c153..e61401e 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\apiemulator.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\bookmark.c"\r
                                >\r
                        </File>\r
                        Filter="h;hpp;hxx;hm;inl"\r
                        >\r
                        <File\r
+                               RelativePath=".\apiemulator.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\common.h"\r
                                >\r
                        </File>\r
index bba58fc..292b395 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\apiemulator.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\bookmark.c"\r
                                >\r
                        </File>\r
                        Filter="h;hpp;hxx;hm;inl"\r
                        >\r
                        <File\r
+                               RelativePath=".\apiemulator.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\common.h"\r
                                >\r
                        </File>\r
index 7d30b84..56e8997 100644 (file)
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
index fd266f2..b2fe717 100644 (file)
--- a/config.h
+++ b/config.h
@@ -27,4 +27,6 @@
 #include "socketwrapper.h"\r
 // プロセスをDLL Injectionから保護する\r
 #include "protectprocess.h"\r
+// 一部のWin32 APIのエミュレーションを行う\r
+#include "apiemulator.h"\r
 \r
index 943d436..fdd45f4 100644 (file)
--- a/updater.c
+++ b/updater.c
@@ -15,6 +15,7 @@ typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
 #include "socketwrapper.h"\r
 #include "protectprocess.h"\r
 #include "mbswrapper.h"\r
+#include "apiemulator.h"\r
 \r
 typedef struct\r
 {\r
@@ -541,7 +542,10 @@ BOOL RestartUpdateProcessAsAdministrator(LPCTSTR CommandLine, LPCTSTR Keyword)
                                memset(&Info, 0, sizeof(SHELLEXECUTEINFO));\r
                                Info.cbSize = sizeof(SHELLEXECUTEINFO);\r
                                Info.fMask = SEE_MASK_NOCLOSEPROCESS;\r
-                               Info.lpVerb = _T("runas");\r
+                               if(IsUserAnAdmin())\r
+                                       Info.lpVerb = _T("open");\r
+                               else\r
+                                       Info.lpVerb = _T("runas");\r
                                Info.lpFile = Path;\r
                                Info.lpParameters = NewCommandLine;\r
                                Info.nShow = SW_SHOW;\r