Improve swedish translations and add new translations to swedish.
[reactos.git] / base / applications / mscutils / servman / delete.c
index c17a49d..b3c0a5d 100644 (file)
@@ -17,19 +17,19 @@ DoDeleteService(PMAIN_WND_INFO Info,
     SC_HANDLE hSc;
     BOOL bRet = FALSE;
 
-    hSCManager = OpenSCManager(NULL,
-                               NULL,
-                               SC_MANAGER_ALL_ACCESS);
+    hSCManager = OpenSCManagerW(NULL,
+                                NULL,
+                                SC_MANAGER_ALL_ACCESS);
     if (hSCManager)
     {
-        hSc = OpenService(hSCManager,
-                          Info->pCurrentService->lpServiceName,
-                          DELETE);
+        hSc = OpenServiceW(hSCManager,
+                           Info->pCurrentService->lpServiceName,
+                           DELETE);
         if (hSc)
         {
             if (DeleteService(hSc))
             {
-                LPTSTR lpSuccess;
+                LPWSTR lpSuccess;
 
                 /* report success to user */
                 if (AllocAndLoadString(&lpSuccess,
@@ -38,9 +38,7 @@ DoDeleteService(PMAIN_WND_INFO Info,
                 {
                     DisplayString(lpSuccess);
 
-                    HeapFree(ProcessHeap,
-                             0,
-                             lpSuccess);
+                    LocalFree(lpSuccess);
                 }
 
                 bRet = TRUE;
@@ -76,44 +74,44 @@ DeleteDialogProc(HWND hDlg,
     {
         case WM_INITDIALOG:
         {
-            LPTSTR lpDescription;
+            LPWSTR lpDescription;
 
             Info = (PMAIN_WND_INFO)lParam;
             if (Info != NULL)
             {
-                SetWindowLongPtr(hDlg,
-                                 GWLP_USERDATA,
-                                 (LONG_PTR)Info);
-
-                hIcon = (HICON)LoadImage(hInstance,
-                                         MAKEINTRESOURCE(IDI_SM_ICON),
-                                         IMAGE_ICON,
-                                         16,
-                                         16,
-                                         0);
+                SetWindowLongPtrW(hDlg,
+                                  GWLP_USERDATA,
+                                  (LONG_PTR)Info);
+
+                hIcon = (HICON)LoadImageW(hInstance,
+                                          MAKEINTRESOURCE(IDI_SM_ICON),
+                                          IMAGE_ICON,
+                                          16,
+                                          16,
+                                          0);
                 if (hIcon)
                 {
-                    SendMessage(hDlg,
-                                WM_SETICON,
-                                ICON_SMALL,
-                                (LPARAM)hIcon);
+                    SendMessageW(hDlg,
+                                 WM_SETICON,
+                                 ICON_SMALL,
+                                 (LPARAM)hIcon);
                     DestroyIcon(hIcon);
                 }
 
-                SendDlgItemMessage(hDlg,
-                                   IDC_DEL_NAME,
-                                   WM_SETTEXT,
-                                   0,
-                                   (LPARAM)Info->pCurrentService->lpDisplayName);
+                SendDlgItemMessageW(hDlg,
+                                    IDC_DEL_NAME,
+                                    WM_SETTEXT,
+                                    0,
+                                    (LPARAM)Info->pCurrentService->lpDisplayName);
 
                 lpDescription = GetServiceDescription(Info->pCurrentService->lpServiceName);
                 if (lpDescription)
                 {
-                    SendDlgItemMessage(hDlg,
-                                       IDC_DEL_DESC,
-                                       WM_SETTEXT,
-                                       0,
-                                       (LPARAM)lpDescription);
+                    SendDlgItemMessageW(hDlg,
+                                        IDC_DEL_DESC,
+                                        WM_SETTEXT,
+                                        0,
+                                        (LPARAM)lpDescription);
                     HeapFree(ProcessHeap,
                              0,
                              lpDescription);