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.

58 lines
2.4 KiB

  1. #ifndef _COOKIMP_H_
  2. #define _COOKIMP_H_
  3. #define NS_NAVI3 0x00030000
  4. #define NS_NAVI4 0x00040000
  5. #define NS_NAVI5 0x00050000 // NS_NAVI5 is a guess
  6. BOOL FindNetscapeCookieFile( IN DWORD dwNSVer, OUT LPTSTR szFilename, /* in-out */ LPDWORD lpnBufSize);
  7. // functions to identify active NS version
  8. BOOL GetActiveNetscapeVersion( LPDWORD lpVersion);
  9. BOOL GetExecuteableFromExtension( IN LPCTSTR szExtension, OUT LPTSTR szFilepath,
  10. LPDWORD pcFilenameSize, OUT LPTSTR* pFilenameSubstring);
  11. // writes version of Netscape to registry for future reference
  12. BOOL SetNetscapeImportVersion( IN DWORD dwNSVersion);
  13. BOOL GetNetscapeImportVersion( OUT DWORD* pNSVersion);
  14. // dumps the contents of a file out to memory
  15. BOOL ReadFileToBuffer( IN LPCTSTR szFilename, LPBYTE* ppBuf, LPDWORD lpcbBufSize);
  16. /*
  17. Current behavior for cookie importing:
  18. on first entry:
  19. Check if netscape is default browser, identify version and save in registry.
  20. on every entry:
  21. check if version is saved in registry, destructively merge
  22. */
  23. /*
  24. Something of a justification for behavior:
  25. There are a couple ways to determine the version of cookie file to be imported from. For all
  26. intents ane purposes, what is being determined is whether the version to import from is less than
  27. or greater than/equal to four.
  28. The version of the the executeable associated with htm files is what we use. If the executeable
  29. associated with htm files is not netscape, then presumeably the user isn't using netscape and we
  30. don't want the cookies anyhow.
  31. An alternative was to use the last installed version of netscape installed which is indicated
  32. in the CurrentVersion\\AppPaths reg key. This key gets ripped away though, if the user uninstalls
  33. one version and uses an older version. Also, we can't expect the user to be using the last
  34. installed version of netscape.
  35. Once IE is installed and ran, it may be associated with htm files while we still want to import
  36. cookies from the once active version of netscape. Because of this the version of netscape found
  37. to be used during DllInstall(true,HKLM is) saved in the registry. This works on
  38. uninstallation/reinstallation since we can always expect DllInstall(true,HKLM) to be ran again
  39. before reentry into any DllInstall(true,HKCU) where the cookies are imported for each user.
  40. */
  41. #endif