Loweynet
Revisión | 804aaf37a565845cab19b37f3f17fbf8c0b8436d (tree) |
---|---|
Tiempo | 2014-06-21 15:01:48 |
Autor | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Add workarounds for Windows 2000/XP.
@@ -416,6 +416,10 @@ | ||
416 | 416 | > |
417 | 417 | </File> |
418 | 418 | <File |
419 | + RelativePath=".\apiemulator.c" | |
420 | + > | |
421 | + </File> | |
422 | + <File | |
419 | 423 | RelativePath=".\bookmark.c" |
420 | 424 | > |
421 | 425 | </File> |
@@ -601,6 +605,10 @@ | ||
601 | 605 | Filter="h;hpp;hxx;hm;inl;fi;fd" |
602 | 606 | > |
603 | 607 | <File |
608 | + RelativePath=".\apiemulator.h" | |
609 | + > | |
610 | + </File> | |
611 | + <File | |
604 | 612 | RelativePath=".\common.h" |
605 | 613 | > |
606 | 614 | </File> |
@@ -413,6 +413,10 @@ | ||
413 | 413 | > |
414 | 414 | </File> |
415 | 415 | <File |
416 | + RelativePath=".\apiemulator.c" | |
417 | + > | |
418 | + </File> | |
419 | + <File | |
416 | 420 | RelativePath=".\bookmark.c" |
417 | 421 | > |
418 | 422 | </File> |
@@ -574,6 +578,10 @@ | ||
574 | 578 | Filter="h;hpp;hxx;hm;inl;fi;fd" |
575 | 579 | > |
576 | 580 | <File |
581 | + RelativePath=".\apiemulator.h" | |
582 | + > | |
583 | + </File> | |
584 | + <File | |
577 | 585 | RelativePath=".\common.h" |
578 | 586 | > |
579 | 587 | </File> |
@@ -416,6 +416,10 @@ | ||
416 | 416 | > |
417 | 417 | </File> |
418 | 418 | <File |
419 | + RelativePath=".\apiemulator.c" | |
420 | + > | |
421 | + </File> | |
422 | + <File | |
419 | 423 | RelativePath=".\bookmark.c" |
420 | 424 | > |
421 | 425 | </File> |
@@ -581,6 +585,10 @@ | ||
581 | 585 | Filter="h;hpp;hxx;hm;inl;fi;fd" |
582 | 586 | > |
583 | 587 | <File |
588 | + RelativePath=".\apiemulator.h" | |
589 | + > | |
590 | + </File> | |
591 | + <File | |
584 | 592 | RelativePath=".\common.h" |
585 | 593 | > |
586 | 594 | </File> |
@@ -416,6 +416,10 @@ | ||
416 | 416 | > |
417 | 417 | </File> |
418 | 418 | <File |
419 | + RelativePath=".\apiemulator.c" | |
420 | + > | |
421 | + </File> | |
422 | + <File | |
419 | 423 | RelativePath=".\bookmark.c" |
420 | 424 | > |
421 | 425 | </File> |
@@ -597,6 +601,10 @@ | ||
597 | 601 | Filter="h;hpp;hxx;hm;inl" |
598 | 602 | > |
599 | 603 | <File |
604 | + RelativePath=".\apiemulator.h" | |
605 | + > | |
606 | + </File> | |
607 | + <File | |
600 | 608 | RelativePath=".\common.h" |
601 | 609 | > |
602 | 610 | </File> |
@@ -413,6 +413,10 @@ | ||
413 | 413 | > |
414 | 414 | </File> |
415 | 415 | <File |
416 | + RelativePath=".\apiemulator.c" | |
417 | + > | |
418 | + </File> | |
419 | + <File | |
416 | 420 | RelativePath=".\bookmark.c" |
417 | 421 | > |
418 | 422 | </File> |
@@ -574,6 +578,10 @@ | ||
574 | 578 | Filter="h;hpp;hxx;hm;inl" |
575 | 579 | > |
576 | 580 | <File |
581 | + RelativePath=".\apiemulator.h" | |
582 | + > | |
583 | + </File> | |
584 | + <File | |
577 | 585 | RelativePath=".\common.h" |
578 | 586 | > |
579 | 587 | </File> |
@@ -416,6 +416,10 @@ | ||
416 | 416 | > |
417 | 417 | </File> |
418 | 418 | <File |
419 | + RelativePath=".\apiemulator.c" | |
420 | + > | |
421 | + </File> | |
422 | + <File | |
419 | 423 | RelativePath=".\bookmark.c" |
420 | 424 | > |
421 | 425 | </File> |
@@ -577,6 +581,10 @@ | ||
577 | 581 | Filter="h;hpp;hxx;hm;inl" |
578 | 582 | > |
579 | 583 | <File |
584 | + RelativePath=".\apiemulator.h" | |
585 | + > | |
586 | + </File> | |
587 | + <File | |
580 | 588 | RelativePath=".\common.h" |
581 | 589 | > |
582 | 590 | </File> |
@@ -27,4 +27,6 @@ | ||
27 | 27 | #include "socketwrapper.h" |
28 | 28 | // プロセスをDLL Injectionから保護する |
29 | 29 | #include "protectprocess.h" |
30 | +// 一部のWin32 APIのエミュレーションを行う | |
31 | +#include "apiemulator.h" | |
30 | 32 |
@@ -15,6 +15,7 @@ typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE; | ||
15 | 15 | #include "socketwrapper.h" |
16 | 16 | #include "protectprocess.h" |
17 | 17 | #include "mbswrapper.h" |
18 | +#include "apiemulator.h" | |
18 | 19 | |
19 | 20 | typedef struct |
20 | 21 | { |
@@ -541,7 +542,10 @@ BOOL RestartUpdateProcessAsAdministrator(LPCTSTR CommandLine, LPCTSTR Keyword) | ||
541 | 542 | memset(&Info, 0, sizeof(SHELLEXECUTEINFO)); |
542 | 543 | Info.cbSize = sizeof(SHELLEXECUTEINFO); |
543 | 544 | Info.fMask = SEE_MASK_NOCLOSEPROCESS; |
544 | - Info.lpVerb = _T("runas"); | |
545 | + if(IsUserAnAdmin()) | |
546 | + Info.lpVerb = _T("open"); | |
547 | + else | |
548 | + Info.lpVerb = _T("runas"); | |
545 | 549 | Info.lpFile = Path; |
546 | 550 | Info.lpParameters = NewCommandLine; |
547 | 551 | Info.nShow = SW_SHOW; |