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.

40 lines
1.6 KiB

  1. #define NPTF_VALIDATE 0x00000001 // => validate the URL
  2. #define NPTF_ALLOWWEBFOLDERS 0x00000002 // => allow binding to Web Folder locations
  3. #define NPTF_SILENT 0x00000004 // => silent binding - no errors
  4. class CNetworkPlace
  5. {
  6. public:
  7. CNetworkPlace();
  8. ~CNetworkPlace();
  9. // INetworkPlace
  10. HRESULT SetTarget(HWND hwnd, LPCWSTR pszTarget, DWORD dwFlags);
  11. HRESULT SetLoginInfo(LPCWSTR pszUser, LPCWSTR pszPassword);
  12. HRESULT SetName(HWND hwnd, LPCWSTR pszName);
  13. HRESULT SetDescription(LPCWSTR pszDescription);
  14. HRESULT GetTarget(LPWSTR pszBuffer, int cchBuffer)
  15. { StrCpyN(pszBuffer, _szTarget, cchBuffer); return S_OK; }
  16. HRESULT GetName(LPWSTR pszBuffer, int cchBuffer);
  17. HRESULT GetIDList(HWND hwnd, LPITEMIDLIST *ppidl);
  18. HRESULT GetObject(HWND hwnd, REFIID riid, void **ppv);
  19. HRESULT CreatePlace(HWND hwnd, BOOL fOpen);
  20. private:
  21. void _InvalidateCache();
  22. HRESULT _IDListFromTarget(HWND hwnd);
  23. HRESULT _TryWebFolders(HWND hwnd);
  24. BOOL _IsPlaceTaken(LPCTSTR pszName, LPTSTR pszPath);
  25. HRESULT _GetTargetPath(LPCITEMIDLIST pidl, LPTSTR pszPath, int cchPath);
  26. LPITEMIDLIST _pidl;
  27. TCHAR _szTarget[INTERNET_MAX_URL_LENGTH];
  28. TCHAR _szName[MAX_PATH];
  29. TCHAR _szDescription[MAX_PATH];
  30. BOOL _fSupportWebFolders; // apply hacks
  31. BOOL _fIsWebFolder; // special case certain operations for Web Folders (office compat)
  32. BOOL _fDeleteWebFolder; // if this is set then we must delete the Web Folder
  33. };