home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / include / ntos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.2 KB  |  121 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. /**********************************************************************
  20.  *  ntOS.h - functionality used bt NT Operating System
  21.  *
  22.  **********************************************************************/
  23.  
  24. #ifndef _ntos_h
  25. #define _ntos_h
  26.  
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {            /* Assume C declarations for C++ */
  30. #endif  /* __cplusplus */
  31.  
  32. /* prototypes for info.c */
  33. typedef enum {
  34.     OS_WIN95,
  35.     OS_WINNT,
  36.     OS_WIN32S,
  37.     OS_UNKNOWN
  38. } OS_TYPE;
  39.  
  40. typedef enum {
  41.     PROCESSOR_I386,
  42.     PROCESSOR_ALPHA,
  43.     PROCESSOR_MIPS,
  44.     PROCESSOR_PPC,
  45.     PROCESSOR_UNKNOWN
  46. } PROCESSOR_TYPE;
  47.     
  48. OS_TYPE INFO_GetOperatingSystem (); 
  49. DWORD INFO_GetOperatingSystemMajorVersion (); 
  50. DWORD INFO_GetOperatingSystemMinorVersion (); 
  51. void OS_GetComputerName  (LPTSTR computerName, int nComputerNameLength ); 
  52. PROCESSOR_TYPE OS_GetProcessor (); 
  53.  
  54.  
  55. /* prototypes for path.c */
  56. DWORD WINAPI PATH_RemoveRelative ( char * path );
  57. DWORD WINAPI PATH_ConvertNtSlashesToUnix( LPCTSTR  lpszNtPath, LPSTR lpszUnixPath );
  58.  
  59.  
  60. /* prototypes for registry.c */
  61. BOOL REG_CheckIfKeyExists( HKEY hKey, LPCTSTR registryKey );
  62. BOOL REG_CreateKey( HKEY hKey, LPCTSTR registryKey );
  63. BOOL REG_DeleteKey( HKEY hKey, LPCTSTR registryKey );
  64.              
  65. BOOL
  66. REG_GetRegistryParameter(
  67.     HKEY hKey, 
  68.     LPCTSTR registryKey, 
  69.     LPTSTR QueryValueName,
  70.     LPDWORD ValueType,
  71.     LPBYTE ValueBuffer, 
  72.     LPDWORD ValueBufferSize
  73.     );
  74.              
  75. BOOL
  76. REG_SetRegistryParameter(
  77.     HKEY hKey, 
  78.     LPCTSTR registryKey, 
  79.     LPTSTR valueName,
  80.     DWORD valueType,
  81.     LPCTSTR ValueString, 
  82.     DWORD valueStringLength
  83.     );
  84.  
  85. BOOL
  86. REG_GetSubKeysInfo( 
  87.     HKEY hKey, 
  88.     LPCTSTR registryKey, 
  89.     LPDWORD lpdwNumberOfSubKeys, 
  90.     LPDWORD lpdwMaxSubKeyLength 
  91.     );
  92.  
  93. BOOL
  94. REG_GetSubKey( HKEY hKey, 
  95.     LPCTSTR registryKey, 
  96.     DWORD nSubKeyIndex, 
  97.     LPTSTR registrySubKeyBuffer, 
  98.     DWORD subKeyBufferSize 
  99.     );
  100.  
  101. /* prototypes for service.c */
  102. #define SERVRET_ERROR     0
  103. #define SERVRET_INSTALLED 1
  104. #define SERVRET_STARTING  2
  105. #define SERVRET_STARTED   3
  106. #define SERVRET_STOPPING  4
  107. #define SERVRET_REMOVED   5
  108.  
  109. DWORD SERVICE_GetNTServiceStatus(LPCTSTR serviceName, LPDWORD lpLastError );
  110. DWORD SERVICE_InstallNTService(LPCTSTR serviceName, LPCTSTR serviceExe );
  111. DWORD SERVICE_RemoveNTService(LPCTSTR serviceName);
  112. DWORD SERVICE_StartNTService(LPCTSTR serviceName);
  113. DWORD SERVICE_StopNTService(LPCTSTR serviceName);
  114.  
  115.  
  116. #ifdef __cplusplus
  117. }
  118. #endif  /* __cplusplus */
  119.  
  120. #endif
  121.