Ignore:
Timestamp:
Dec 18, 2011, 10:28:22 PM (14 years ago)
Author:
dmik
Message:

Merge branch gcc-kmk to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 bin
        2 Makefile.inc
         1env.cmd
         2LocalConfig.kmk
    • Property svn:mergeinfo set to
      /branches/gcc-kmkmergedeligible
  • trunk/src/advapi32/service.cpp

    r5976 r21916  
    1010 *
    1111 *
    12  * TODO: Not done; starting services; control handlers and many other things 
     12 * TODO: Not done; starting services; control handlers and many other things
    1313 * TODO: Service status handles are the same as service handles
    1414 *
     
    2626#include <misc.h>
    2727#include <unicode.h>
    28 #include <win\winreg.h>
    29 #include <win\winsvc.h>
     28#include <win/winreg.h>
     29#include <win/winsvc.h>
    3030#include <heapstring.h>
    3131#define USE_ODIN_REGISTRY_APIS
     
    7171//TODO: Faster way to checking this
    7272//*****************************************************************************
    73 BOOL CheckServiceHandle(SC_HANDLE hService) 
     73BOOL CheckServiceHandle(SC_HANDLE hService)
    7474{
    7575 HKEY keyThisService;
     
    147147           fdwDesiredAccess));
    148148
    149   if(lpszMachineName) 
     149  if(lpszMachineName)
    150150        lpszMachineNameA = HEAP_strdupWtoA(GetProcessHeap(), 0, lpszMachineName);
    151151  if(lpszDatabaseName)
     
    154154  hService = OpenSCManagerA(lpszMachineNameA, lpszDataBaseNameA, fdwDesiredAccess);
    155155
    156   if(lpszMachineNameA) 
     156  if(lpszMachineNameA)
    157157        HeapFree(GetProcessHeap(), 0, lpszMachineNameA);
    158158  if(lpszDataBaseNameA)
     
    190190        return FALSE;
    191191  }
    192  
     192
    193193  if(lpszServiceName == NULL) {
    194194        SetLastError(ERROR_INVALID_PARAMETER);
     
    442442 * Result    :
    443443 * Remark    :
    444  * Status    : 
     444 * Status    :
    445445 *
    446446 * Author    : SvL
     
    494494 * Result    :
    495495 * Remark    :
    496  * Status    : 
     496 * Status    :
    497497 *
    498498 * Author    : SvL
     
    574574 * Result    :
    575575 * Remark    :
    576  * Status    : 
     576 * Status    :
    577577 *
    578578 * Author    : SvL
     
    621621 * Result    :
    622622 * Remark    :
    623  * Status    : 
     623 * Status    :
    624624 *
    625625 * Author    : SvL
     
    665665 * Result    :
    666666 * Remark    :
    667  * Status    : 
     667 * Status    :
    668668 *
    669669 * Author    : SvL
     
    719719  RegSetValueExA(keyThisService, REG_SERVICE_STARTTYPE, 0, REG_DWORD, (LPBYTE)&dwStartType, sizeof(DWORD));
    720720  RegSetValueExA(keyThisService, REG_SERVICE_ERRORCONTROL, 0, REG_DWORD, (LPBYTE)&dwErrorControl, sizeof(DWORD));
    721   if(lpDisplayName) 
     721  if(lpDisplayName)
    722722        RegSetValueExA(keyThisService, REG_SERVICE_DISPLAYNAME, 0, REG_SZ, (LPBYTE)lpDisplayName, strlen(lpDisplayName)+1);
    723   if(lpLoadOrderGroup) 
     723  if(lpLoadOrderGroup)
    724724        RegSetValueExA(keyThisService, REG_SERVICE_LOADORDERGROUP, 0, REG_SZ, (LPBYTE)lpDisplayName, strlen(lpLoadOrderGroup)+1);
    725725  if(lpDependencies) {
     
    736736
    737737  //Pointer to a variable that receives a tag value that is unique in the group specified in the
    738   //lpLoadOrderGroup parameter. Specify NULL if you are not changing the existing tag. 
     738  //lpLoadOrderGroup parameter. Specify NULL if you are not changing the existing tag.
    739739  DWORD tag = 1; //TODO!!
    740740  RegSetValueExA(keyThisService, REG_SERVICE_TAG, 0, REG_DWORD, (LPBYTE)&tag, sizeof(DWORD));
     
    773773 * Result    :
    774774 * Remark    :
    775  * Status    : 
     775 * Status    :
    776776 *
    777777 * Author    : SvL
     
    855855 * Result    :
    856856 * Remark    :
    857  * Status    : 
     857 * Status    :
    858858 *
    859859 * Author    : SvL
     
    893893 * Result    :
    894894 * Remark    :
    895  * Status    : 
     895 * Status    :
    896896 *
    897897 * Author    : SvL
     
    929929 * Result    :
    930930 * Remark    :
    931  * Status    : 
     931 * Status    :
    932932 *
    933933 * Author    : SvL
     
    962962 * Result    :
    963963 * Remark    :
    964  * Status    : 
     964 * Status    :
    965965 *
    966966 * Author    : SvL
     
    10211021 * Result    :
    10221022 * Remark    :
    1023  * Status    : 
     1023 * Status    :
    10241024 *
    10251025 * Author    : SvL
     
    13591359        while(*cmd != ' ' && *cmd != 0) cmd++; //skip non-space chars
    13601360        while(*cmd == ' ' && *cmd != 0) cmd++; //skip spaces
    1361         nrargs++;       
     1361        nrargs++;
    13621362  }
    13631363  return nrargs;
     
    13731373 * Result    :
    13741374 * Remark    :
    1375  * Status    : 
     1375 * Status    :
    13761376 *
    13771377 * Author    : SvL
     
    14131413 * Result    :
    14141414 * Remark    :
    1415  * Status    : 
     1415 * Status    :
    14161416 *
    14171417 * Author    : SvL
     
    14531453 * Result    :
    14541454 * Remark    :
    1455  * Status    : 
     1455 * Status    :
    14561456 *
    14571457 * Author    : SvL
     
    14671467           lpHandlerProc));
    14681468
    1469   //Doesn't work for services of type 
     1469  //Doesn't work for services of type
    14701470  if(lpszServiceName == NULL) {
    14711471        SetLastError(ERROR_INVALID_NAME);
     
    14941494 * Result    :
    14951495 * Remark    :
    1496  * Status    : 
     1496 * Status    :
    14971497 *
    14981498 * Author    : SvL
     
    15031503{
    15041504 SC_HANDLE hSCMgr, hService;
    1505  
     1505
    15061506  dprintf(("ADVAPI32: RegisterServiceCtrlHandlerW(%s,%08xh) not implemented (FAKED)",
    15071507           lpszServiceName,
    15081508           lpHandlerProc));
    15091509
    1510   //Doesn't work for services of type 
     1510  //Doesn't work for services of type
    15111511  if(lpszServiceName == NULL) {
    15121512        SetLastError(ERROR_INVALID_NAME);
     
    15421542 * Result    :
    15431543 * Remark    :
    1544  * Status    : 
     1544 * Status    :
    15451545 *
    15461546 * Author    : SvL
     
    15971597 * Result    :
    15981598 * Remark    : Called from ServiceMain function (registered with RegisterServiceCtrlHandler)
    1599  * Status    : 
     1599 * Status    :
    16001600 *
    16011601 * Author    : SvL
     
    16371637 * Result    :
    16381638 * Remark    :
    1639  * Status    : 
     1639 * Status    :
    16401640 *
    16411641 * Author    : SvL
     
    16851685  keytype = REG_DWORD;
    16861686  RegQueryValueExA((HKEY)schService, REG_SERVICE_WAITHINT, 0, &keytype, (LPBYTE)&lpssServiceStatus->dwWaitHint, &size);
    1687  
     1687
    16881688  SetLastError(0);
    16891689  return TRUE;
Note: See TracChangeset for help on using the changeset viewer.