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.

96 lines
2.9 KiB

  1. /*****************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1990 **/
  4. /*****************************************************************/
  5. /*
  6. MiscAPIs.cxx
  7. Miscallaneous APIs
  8. FILE HISTORY:
  9. jonn 14-Jan-1991 Split from winprof.cxx
  10. rustanl 12-Apr-1991 Added UI_UNCPathCompare and
  11. UI_UNCPathValidate
  12. jonn 22-May-1991 Added MyNetUseAdd (was in winprof.cxx)
  13. anirudhs 12-Feb-1996 Deleted non-WIN32 definitions
  14. */
  15. #ifndef _STRING_HXX_
  16. #error SZ("Must include string.hxx first")
  17. #endif // _STRING_HXX_
  18. #ifndef _MISCAPIS_HXX_
  19. #define _MISCAPIS_HXX_
  20. /* Determines if the service is in a usable state for network calls.
  21. * If the LM Workstation service is happy happy then NERR_Success
  22. * will be returned. Else WN_NO_NETWORK or WN_FUNCTION_BUSY will be returned.
  23. */
  24. APIERR CheckLMService( void ) ;
  25. /*
  26. * The following manifest is the value of sResourceName_Type to be used
  27. * by LM21 programs calling PROFILE::Change or PROFILE::Remove.
  28. * USE_RES_DEFAULT does not conflict with any real USE_RES_* values
  29. * in $(COMMON)\h\use.h
  30. */
  31. #define USE_RES_DEFAULT 0x00
  32. enum REMOTENAMETYPE
  33. {
  34. REMOTENAMETYPE_INVALID,
  35. REMOTENAMETYPE_WORKGROUP,
  36. REMOTENAMETYPE_SERVER,
  37. REMOTENAMETYPE_SHARE,
  38. REMOTENAMETYPE_PATH
  39. };
  40. /*******************************************************************
  41. NAME: ParseRemoteName
  42. SYNOPSIS: Canonicalizes a remote resource name and determines
  43. its type
  44. ARGUMENTS:
  45. RemoteName - Remote resource name to be parsed
  46. CanonName - Buffer for canonicalized name, assumed to be
  47. MAX_PATH characters long
  48. CanonNameSize - Size, in bytes, of output buffer
  49. PathStart - Set to the offset, in characters, of the start
  50. of the "\share" portion (in the REMOTENAMETYPE_SHARE case)
  51. or the "\path" portion (in the REMOTENAMETYPE_PATH case)
  52. of the name within CanonName. Not set in other cases.
  53. RETURNS:
  54. If nlsRemote is like Then returns
  55. -------------------- ------------
  56. workgroup REMOTENAMETYPE_WORKGROUP
  57. \\server REMOTENAMETYPE_SERVER
  58. \\server\share REMOTENAMETYPE_SHARE
  59. \\server\share\path REMOTENAMETYPE_PATH
  60. (other) REMOTENAMETYPE_INVALID
  61. NOTES:
  62. HISTORY:
  63. AnirudhS 21-Apr-1995 Ported from Win95 sources - used netlib
  64. functions rather than ad hoc parsing, introduced comments
  65. ********************************************************************/
  66. REMOTENAMETYPE ParseRemoteName(
  67. IN LPWSTR RemoteName,
  68. OUT LPWSTR CanonName,
  69. IN DWORD CanonNameSize,
  70. OUT PULONG PathStart
  71. );
  72. #endif // _MISCAPIS_HXX_