OSDN Git Service

Fix the commit.
authors_kawamoto <s_kawamoto@users.sourceforge.jp>
Sat, 21 Jun 2014 11:45:30 +0000 (20:45 +0900)
committers_kawamoto <s_kawamoto@users.sourceforge.jp>
Sat, 21 Jun 2014 11:45:30 +0000 (20:45 +0900)
FFFTP_Eng_Release/FFFTP.exe
Release/FFFTP.exe
apiemulator.c [new file with mode: 0644]
apiemulator.h [new file with mode: 0644]

index be17951..2f56fcc 100644 (file)
Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
index 56e8997..0c0c1f1 100644 (file)
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
diff --git a/apiemulator.c b/apiemulator.c
new file mode 100644 (file)
index 0000000..9a1ff0a
--- /dev/null
@@ -0,0 +1,28 @@
+// apiemulator.c\r
+// Copyright (C) 2014 Suguru Kawamoto\r
+// APIエミュレータ\r
+\r
+#include <windows.h>\r
+\r
+#define DO_NOT_REPLACE\r
+#include "apiemulator.h"\r
+\r
+BOOL IsUserAnAdminAlternative()\r
+{\r
+       BOOL bResult;\r
+       SID_IDENTIFIER_AUTHORITY sia = SECURITY_NT_AUTHORITY;\r
+       PSID pSID;\r
+       BOOL b;\r
+       bResult = FALSE;\r
+       if(AllocateAndInitializeSid(&sia, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &pSID))\r
+       {\r
+               if(CheckTokenMembership(NULL, pSID, &b))\r
+               {\r
+                       if(b)\r
+                               bResult = TRUE;\r
+               }\r
+               FreeSid(pSID);\r
+       }\r
+       return bResult;\r
+}\r
+\r
diff --git a/apiemulator.h b/apiemulator.h
new file mode 100644 (file)
index 0000000..236c1b0
--- /dev/null
@@ -0,0 +1,19 @@
+// apiemulator.h\r
+// Copyright (C) 2014 Suguru Kawamoto\r
+// APIエミュレータ\r
+\r
+#ifndef __APIEMULATOR_H__\r
+#define __APIEMULATOR_H__\r
+\r
+#include <windows.h>\r
+\r
+#ifndef DO_NOT_REPLACE\r
+\r
+#define IsUserAnAdmin IsUserAnAdminAlternative\r
+\r
+#endif\r
+\r
+BOOL IsUserAnAdminAlternative();\r
+\r
+#endif\r
+\r