Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
487 B

  1. #include <windows.h>
  2. #include <winsafer.h>
  3. #include <winsaferp.h>
  4. #include <tchar.h>
  5. #include <stdio.h>
  6. int __cdecl wmain(int argc, wchar_t *argv[])
  7. {
  8. if (argc != 2) {
  9. wprintf(L"Invalid syntax. No filename supplied.\n");
  10. return -1;
  11. }
  12. if (IsExecutableFileTypeW(argv[1])) {
  13. wprintf(L"\"%s\" is executable.\n", argv[1]);
  14. return 1;
  15. } else {
  16. wprintf(L"\"%s\" is not executable.\n", argv[1]);
  17. return 0;
  18. }
  19. return 0;
  20. }