Leaked source code of windows server 2003
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.

73 lines
2.5 KiB

  1. #define REGSTR_SHELLFOLDERS TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders")
  2. #define REGSTR_CURRENTVERSION TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion")
  3. #define RUNKEY TEXT("Run")
  4. #define RUNONCEKEY TEXT("RunOnce")
  5. #define RUNSERVICESKEY TEXT("RunServices")
  6. #define RUNSERVICESONCEKEY TEXT("RunServicesOnce")
  7. #define HELPIDSIZE 10
  8. #define MAXRUNSTR 300
  9. #define MAXENVPATHLEN 300
  10. #define INPTYPE_FOLDER 0x0007
  11. #define INPTYPE_INIFILE 0x0038
  12. #define INPTYPE_REGISTRY 0x03C0
  13. #define RESET_FLAG 0xFFFF
  14. #define FOLDER 101
  15. #define INIFILE 102
  16. #define REGISTRY 103
  17. #define WININISTR "WIN.INI, Run/Load="
  18. #define REGRUNSTR "REGISTRY: Run"
  19. #define REGRUNSERVICESSTR "REGISTRY: RunServices"
  20. #define REGRUNONCESTR "REGISTRY: RunOnce"
  21. #define REGRUNSERVICESONCESTR "REGISTRY: RunServicesOnce"
  22. typedef struct tnode
  23. {
  24. HANDLE hDirHandle;
  25. struct tnode *lpSrchDirNext;
  26. } HSEARCHDIR, *LPHSEARCHDIR;
  27. typedef struct
  28. {
  29. DWORD dwWalkFlags;
  30. DWORD dwCurrentFlag;
  31. LPHSEARCHDIR lpSrchDirListHead;
  32. LPHSEARCHDIR lpSrchDirListTail;
  33. LPTSTR lpszIniString;
  34. LPTSTR lpszNextFile;
  35. LPTSTR lpszFolder;
  36. } WALKHEADER, *LPWALKHEADER;
  37. INT GetFileHandle(LPLINKINFO lpLnkInfo, LPWALKHEADER lpWalk, LPTSTR lpPath, size_t pathBufSize);
  38. ERR GetLnkInfo(LPWALKHEADER lpWalk, LPLINKINFO lpLnkInfo, LPTSTR lpPath);
  39. ERR ResolveLnk(LPCTSTR pszShortcutFile, LPTSTR lpszLnkPath, LPWIN32_FIND_DATA lpwfdExeData, LPTSTR tszArgs);
  40. ERR AddToList(HANDLE hDir, LPWALKHEADER lpWalk);
  41. ERR RemoveFromList(LPWALKHEADER lpWalk);
  42. ERR GetExeVersion(LPLINKINFO lpLnkInfo);
  43. void SetLnkInfo(LPLINKINFO lpLinkInfo);
  44. BOOL CheckFileExists(LPTSTR szFullName, LPVOID ftLAD);
  45. INT GetInputType(LPWALKHEADER lpWalk);
  46. ERR GetFolder(LPTSTR lpszFolder, size_t folderBufSize, LPWALKHEADER lpWalk);
  47. ERR GetIniString(LPWALKHEADER lpWalk, LPLINKINFO lpLnkInfo);
  48. ERR GetRegistryString(LPWALKHEADER lpWalk, LPLINKINFO lpLnkInfo);
  49. ERR GetNextFileFromString(LPWALKHEADER lpWalk, LPLINKINFO lpLnkInfo);
  50. BOOL GetFileLAD(LPLINKINFO lpLnkInfo);
  51. BOOL InSkipList(LPTSTR lpszFileName);
  52. void GetDrivePath(LPTSTR lpszExePath, LPTSTR lpszDrPath, size_t drPathSize);
  53. DWORD ReverseDWord(DWORD dwIn);
  54. #ifdef _DEBUG
  55. #define FAILMEMA TRUE
  56. #define FAILMEMF TRUE
  57. HGLOBAL MyGlobalAlloc(BOOL FAILMEM, DWORD dwBytes);
  58. HGLOBAL MyGlobalFree(HGLOBAL hGlobal, BOOL FAILMEM);
  59. INT g_MemAlloced = 0;
  60. #endif