gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r5957 - GNUnet/src/util/win


From: gnunet
Subject: [GNUnet-SVN] r5957 - GNUnet/src/util/win
Date: Tue, 18 Dec 2007 11:58:16 -0700 (MST)

Author: durner
Date: 2007-12-18 11:58:15 -0700 (Tue, 18 Dec 2007)
New Revision: 5957

Modified:
   GNUnet/src/util/win/win.cc
Log:
fixes

Modified: GNUnet/src/util/win/win.cc
===================================================================
--- GNUnet/src/util/win/win.cc  2007-12-18 17:28:47 UTC (rev 5956)
+++ GNUnet/src/util/win/win.cc  2007-12-18 18:58:15 UTC (rev 5957)
@@ -238,9 +238,9 @@
        sprintf(user, ".\\%s", username);
   }
 
-  hService = GNCreateService(hManager, "GNUnet", "GNUnet", 0,
-    SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, szEXE,
-    NULL, NULL, NULL, user, username);
+  hService = GNCreateService(hManager, (LPCTSTR) "GNUnet", (LPCTSTR) "GNUnet", 
0,
+    SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, 
(LPCTSTR) szEXE,
+    NULL, NULL, NULL, (LPCTSTR) user, (LPCTSTR) username);
   
   if (user)
     free(user);
@@ -272,7 +272,7 @@
   if (! hManager)
     return 2;
 
-  if (! (hService = GNOpenService(hManager, "GNUnet", DELETE)))
+  if (! (hService = GNOpenService(hManager, (LPCTSTR) "GNUnet", DELETE)))
     if (GetLastError() != ERROR_SERVICE_DOES_NOT_EXIST)
       return 3;
      else
@@ -490,7 +490,7 @@
                                                                                
STATUS_SUCCESS)
        return 3;
        
-  _GetAccountSid(NULL, pszName, &pSID);
+  _GetAccountSid(NULL, (LPTSTR) pszName, &pSID);
   
   if (_SetPrivilegeOnAccount(hPolicy, pSID, L"SeServiceLogonRight", TRUE) != 
STATUS_SUCCESS)
        return 4;
@@ -554,8 +554,8 @@
   /**
    * STEP 1: Get SID of the account name specified.
    */
-  fAPISuccess = GNLookupAccountName(NULL, lpszAccountName,
-        pUserSID, &cbUserSID, szDomain, &cbDomain, &snuType);
+  fAPISuccess = GNLookupAccountName(NULL, (LPCTSTR) lpszAccountName,
+        pUserSID, &cbUserSID, (LPTSTR) szDomain, &cbDomain, &snuType);
   
   /* API should have failed with insufficient buffer. */
   if (fAPISuccess)
@@ -574,8 +574,8 @@
      goto end;
   }
   
-  fAPISuccess = GNLookupAccountName(NULL, lpszAccountName,
-        pUserSID, &cbUserSID, szDomain, &cbDomain, &snuType);
+  fAPISuccess = GNLookupAccountName(NULL, (LPCTSTR) lpszAccountName,
+        pUserSID, &cbUserSID, (LPTSTR) szDomain, &cbDomain, &snuType);
   if (!fAPISuccess) {
      goto end;
   }
@@ -583,7 +583,7 @@
   /**
    *  STEP 2: Get security descriptor (SD) of the file specified.
    */
-  fAPISuccess = GNGetFileSecurity(lpszFileName,
+  fAPISuccess = GNGetFileSecurity((LPCTSTR) lpszFileName,
         secInfo, pFileSD, 0, &cbFileSD);
   
   /* API should have failed with insufficient buffer. */
@@ -599,7 +599,7 @@
      goto end;
   }
   
-  fAPISuccess = GNGetFileSecurity(lpszFileName,
+  fAPISuccess = GNGetFileSecurity((LPCTSTR) lpszFileName,
         secInfo, pFileSD, cbFileSD, &cbFileSD);
   if (!fAPISuccess) {
      goto end;
@@ -769,7 +769,7 @@
   /**
    * STEP 18: Set permissions
    */
-  if (GNSetNamedSecurityInfo(lpszFileName, SE_FILE_OBJECT,
+  if (GNSetNamedSecurityInfo((LPTSTR) lpszFileName, SE_FILE_OBJECT,
     DACL_SECURITY_INFORMATION, NULL, NULL, pNewACL, NULL) != ERROR_SUCCESS) {
        goto end;
   }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]