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.

105 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 1997 - 1999 Microsoft Corporation
  3. Module Name:
  4. srfunc.h
  5. Abstract:
  6. --*/
  7. #include "smbmrx.h"
  8. typedef struct {
  9. LPTSTR pszKey;
  10. DWORD dwType;
  11. DWORD dwLength;
  12. PVOID pvValue;
  13. } REGENTRY, *PREGENTRY;
  14. void
  15. ReadRegistryKeyValues(
  16. HKEY hKey,
  17. DWORD Count,
  18. PREGENTRY pValues);
  19. void
  20. WriteRegistryKeyValues(
  21. HKEY hKey,
  22. DWORD Count,
  23. PREGENTRY pValues);
  24. //
  25. // routines for manipulating registry key values
  26. //
  27. BOOL GetRegsz ( HKEY hKey, LPTSTR pszKey, PVOID * ppvValue, DWORD *pdwLength );
  28. BOOL GetRegesz( HKEY hKey, LPTSTR pszKey, PVOID * ppvValue, DWORD *pdwLength );
  29. BOOL GetRegmsz( HKEY hKey, LPTSTR pszKey, PVOID * ppvValue, DWORD *pdwLength );
  30. BOOL GetRegdw ( HKEY hKey, LPTSTR pszKey, PVOID * ppvValue, DWORD *pdwLength );
  31. //
  32. // routines for manipulating registry keys
  33. //
  34. BOOL OpenKey(LPTSTR pszKey, PHKEY phKey);
  35. BOOL CreateKey(LPTSTR pszKey, PHKEY phKey);
  36. BOOL AddValue(HKEY hKey, LPTSTR pszKey, DWORD dwType, DWORD dwLength, PVOID pvValue);
  37. ULONG_PTR RdrInstallCheck( void );
  38. BOOL RdrCompleteSetup( void );
  39. BOOL RdrInitGlobalContext( void );
  40. BOOL RdrUninitGlobalContext( void );
  41. BOOL RdrStart( void );
  42. BOOL RdrStop( void );
  43. BOOL RdrLoad( void );
  44. BOOL RdrUnload( void );
  45. BOOL RdrDoNothing( void );
  46. BOOL RdrDoAction( ULONG_PTR action );
  47. ULONG_PTR RdrGetInitialState(void);
  48. ULONG_PTR RdrGetNextState( ULONG_PTR Action, ULONG_PTR CurrentState );
  49. BOOL RdrSetupServiceEntry( void );
  50. BOOL RdrSetupProviderOrder( void );
  51. ULONG_PTR RdrGetProviderOrderString( LPTSTR *OrderString );
  52. BOOL RdrSetProviderOrderString( LPTSTR OrderString );
  53. BOOL RdrFindProviderInOrder( LPTSTR OrderString, LPTSTR Provider );
  54. typedef BOOL (*ACTIONVECTOR) ( void );
  55. #define RDRSERVICE TEXT("SmbMRx")
  56. #define PROVIDER_NAME RDRSERVICE
  57. #define PROVIDER_PATH TEXT("%SystemRoot%\\System32\\SmbMrxNp.dll")
  58. #define PROVIDER_FILE_PATH TEXT("\\System32\\SmbMrxNp.dll")
  59. #define DRIVER_FILE_PATH TEXT("\\System32\\Drivers\\SmbMrx.sys")
  60. #define PROVIDER_ORDER_KEY TEXT("System\\CurrentControlSet\\Control\\NetworkProvider\\Order")
  61. #define RDRSERVICE_KEY TEXT("System\\CurrentControlSet\\Services\\") RDRSERVICE
  62. #define WKSSERVICE_KEY TEXT("System\\CurrentControlSet\\Services\\LanmanWorkstation")
  63. #define SETUP_COMPLETE 0
  64. #define SETUP_MISSING_FILE 1
  65. #define SETUP_INCOMPLETE 2
  66. #define ACTION_LOAD 0
  67. #define ACTION_UNLOAD 1
  68. #define ACTION_START 2
  69. #define ACTION_STOP 3
  70. #define ACTION_TRANS 4
  71. #define ACTION_ERROR 5
  72. #define ACTION_NONE 6