home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / edksetup.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  9.4 KB  |  185 lines

  1. // --edksetup.h-----------------------------------------------------------------
  2. // 
  3. // Copyright 1986 - 1998 Microsoft Corporation.  All Rights Reserved.
  4. // -----------------------------------------------------------------------------
  5. #if !defined(_EDKSETUP_H)
  6. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  7. #define _EDkSETUP_H
  8.  
  9. #include <windows.h>
  10.  
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif // __cplusplus
  14.  
  15. #include "msdetect.h"
  16. #include "msregdb.h"
  17. #include "msshared.h"
  18. #include "setupapi.h"
  19.  
  20. //$--HrSendProgManCommand----------------------------------------------------
  21. //  Send one or more commands to the program manager.
  22. // -----------------------------------------------------------------------------
  23. HRESULT HrSendProgManCommand(    // RETURNS: return code
  24.     LPDWORD lpIdInst,               // pointer to instance ID
  25.     LPSTR lpszCommand);             // pointer to command string
  26.  
  27. //$--HrGetProgManGroups------------------------------------------------------
  28. //  Get the names of all the program groups.
  29. // -----------------------------------------------------------------------------
  30. HRESULT HrGetProgManGroups(      // RETURNS: return code
  31.     LPDWORD lpIdInst,               // pointer to instance ID
  32.     LPSTR *lppszGroups);            // pointer to groups string address variable
  33.  
  34. //$--AppendSlash----------------------------------------------------------------
  35. //  This function will append a backslash to a string if one does not
  36. //  already exist.
  37. // -----------------------------------------------------------------------------
  38. void AppendSlash(                       // RETURNS: nothing
  39.     IN OUT LPSTR sz1);                  // string
  40.  
  41. //$--RemoveTrailingSlash--------------------------------------------------------
  42. //  This function will remove a trailing slash from a string if it exists.
  43. //  It will NOT remove trailing slash from "X:\".
  44. // -----------------------------------------------------------------------------
  45. void RemoveTrailingSlash(               // RETURNS: nothing
  46.     IN OUT LPSTR sz1);                  // string
  47.  
  48. //$--ShowMessageBox-------------------------------------------------------------
  49. //  This displays a localizable message built by the message compiler in a
  50. //  message box.
  51. // -----------------------------------------------------------------------------
  52. int ShowMessageBox(             // RETURNS: message box result
  53.     IN LPCVOID lpSource,        // source of message resource (NULL = embedded)
  54.     IN DWORD dwMessageID,       // message ID
  55.     IN LPSTR lpszTitle,         // title
  56.     IN DWORD dwMsgBoxFlags,     // message box flags
  57.     IN DWORD dwLanguageID,      // language ID
  58.     IN ...);                    // arguments required for the message resource
  59.  
  60. //$--ExtractPath----------------------------------------------------------------
  61. //  This routine will give the path portion of a file name.
  62. // -----------------------------------------------------------------------------
  63. void ExtractPath(                       // RETURNS: nothing
  64.     IN  CHAR *pszPathName,              // full path name
  65.     OUT    CHAR *pszPath);                 // path name
  66.  
  67. //$--FEnumFiles-----------------------------------------------------------------
  68. //  This function provides a wrapper for the FindFirstFile() and FindNextFile()
  69. //  functions. Given a search string [Drive:][PATH\\]SearchPattern this 
  70. //  function will place file names (one per call) in pszFileName. When there
  71. //  are no more files that match the search string it will return FALSE. It
  72. //  will filter out the . and .. directories. This function is generally used
  73. //  like this:
  74. //
  75. //      hEnumFile = NULL;
  76. //        while(fEnumFiles(&hEnumFile, szSearchString, szFileName, &fDir))
  77. //      {
  78. //            if(fDir) ProcessDir(szFileName);
  79. //            else     ProcessFile(szFileName);
  80. //        }
  81. //
  82. // -----------------------------------------------------------------------------
  83. BOOL FEnumFiles(                    // RETURNS: TRUE if a file/dir was found
  84.     IN     CHAR   *pszSearchString, // directory & search pattern
  85.     IN OUT HANDLE *phScan,          // a pointer to EnumFiles instance handle 
  86.     OUT    CHAR   *pszFileName,     // current file name
  87.     OUT    BOOL   *pfDir);          // TRUE if a directory was found
  88.  
  89. //$--DwConnectNetworkShare------------------------------------------------------
  90. //  Connect a local drive letter to a network disk resource.
  91. // -----------------------------------------------------------------------------
  92. DWORD DwConnectNetworkShare(            // RETURNS: return code
  93.     IN  LPSTR lpszUNCName,              // UNC path to network share
  94.     OUT LPSTR lpszDriveLetter);         // drive letter
  95.  
  96. //$--FGetServiceDirectory-------------------------------------------------------
  97. //  Given a service name, gives the directory to the executable image.
  98. // -----------------------------------------------------------------------------
  99. BOOL FGetServiceDirectory(              // RETURNS: TRUE/FALSE
  100.     IN  LPSTR lpszServiceName,          // service name
  101.     OUT LPSTR lpszServiceDir);          // service directory
  102.  
  103. //$--FServiceExists-------------------------------------------------------------
  104. //  Ask the Service Control Manager if a particular service exists.
  105. // -----------------------------------------------------------------------------
  106. BOOL FServiceExists(                    // RETURNS: TRUE/FALSE
  107.     IN LPSTR lpszServiceName);          // service
  108.  
  109. //$--FServiceRunning------------------------------------------------------------
  110. //  Ask the Service Control Manager if a particular service is running. If the
  111. //  service is running, this function will attempt to stop it before returning.
  112. // -----------------------------------------------------------------------------
  113. BOOL FServiceRunning(                   // RETURNS: TRUE/FALSE
  114.     IN LPSTR lpszServiceName);          // service
  115.  
  116. //$--FDirEmpty------------------------------------------------------------------
  117. //  Checks to see if a given directory is empty.
  118. // -----------------------------------------------------------------------------
  119. BOOL FDirEmpty(                         // RETURNS: TRUE/FALSE
  120.     IN LPSTR lpszDirName);              // directory name
  121.  
  122. //$--EDKDeleteNode--------------------------------------------------------------
  123. //  This deletes a directory and files and directories contained within.
  124. //  NOTE: This is a recursive function.
  125. // -----------------------------------------------------------------------------
  126. void EDKDeleteNode(                     // RETURNS: nothing
  127.     IN LPSTR lpszDirName);              // directory name
  128.  
  129. //$--FNetworkAvailable----------------------------------------------------------
  130. //  Checks to see that a network is available
  131. // -----------------------------------------------------------------------------
  132. BOOL FNetworkAvailable(                 // RETURNS: TRUE/FALSE
  133.     void);                              // nothing
  134.  
  135. //$--FRegisterEventLog----------------------------------------------------------
  136. //  This function registers an application with the event log.
  137. // -----------------------------------------------------------------------------
  138. BOOL FRegisterEventLog(                 // RETURNS: TRUE/FALSE
  139.     IN LPSTR lpszServer,                // server name
  140.     IN LPSTR lpszApplicationName,       // application name
  141.     IN LPSTR lpszMessageDllName,        // message DLL path name
  142.     IN DWORD dwTypesSupported);         // events supported
  143.  
  144. //$--FDeregisterEventLog--------------------------------------------------------
  145. //  This function deregisters an application with the Event Log.
  146. // -----------------------------------------------------------------------------
  147. BOOL FDeregisterEventLog(               // RETURNS: TRUE/FALSE
  148.     IN LPSTR lpszServer,                // server name
  149.     IN LPSTR lpszApplicationName);      // application Name 
  150.  
  151. //$--EscapeBackSlashes----------------------------------------------------------
  152. //  This function copies a string, but doubles the number of backslashes.
  153. // -----------------------------------------------------------------------------
  154. void EscapeBackSlashes(                 // RETURNS: nothing
  155.     IN  LPSTR lpszSrcStr,               // source string
  156.     OUT LPSTR lpszDestStr);             // destination string
  157.  
  158. //$--FLoadCounters--------------------------------------------------------------
  159. //  Loads the counters by creating a LODCTR.EXE process.    
  160. // -----------------------------------------------------------------------------
  161. BOOL FLoadCounters(                     // RETURNS: TRUE/FALSE
  162.     IN LPSTR lpszFileName);             // INI file name
  163.  
  164. //$--FUnloadCounters------------------------------------------------------------
  165. //  Unloads the counters by creating a UNLODCTR.EXE process.    
  166. // -----------------------------------------------------------------------------
  167. BOOL FUnloadCounters(                   // RETURNS: TRUE/FALSE
  168.     IN LPSTR lpszClassName);            // service class name
  169.  
  170. //$--FGetDomainAccountName------------------------------------------------------
  171. //  This function gets the current user's domain acount name.
  172. // -----------------------------------------------------------------------------
  173. BOOL FGetDomainAccountName(             // RETURNS: TRUE/FALSE
  174.     IN OUT DWORD *lpdwDomainSize,       // domain name buffer size
  175.     IN OUT DWORD *lpdwAccountSize,      // account name buffer size
  176.     OUT LPSTR lpszDomainName,           // domain name
  177.     OUT LPSTR lpszAccountName);         // account name
  178.  
  179. #ifdef __cplusplus
  180. }
  181. #endif
  182.  
  183. #pragma option pop /*P_O_Pop*/
  184. #endif
  185.