You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2017/11/06 14:30:09 UTC

svn commit: r1814416 - in /commons/proper/daemon/trunk/src/native/windows: apps/prunmgr/prunmgr.c src/gui.c src/service.c

Author: markt
Date: Mon Nov  6 14:30:09 2017
New Revision: 1814416

URL: http://svn.apache.org/viewvc?rev=1814416&view=rev
Log:
Fix some more ANSI / Unicode warnings (probably introduced by me) spotted when using Visual Studio

Modified:
    commons/proper/daemon/trunk/src/native/windows/apps/prunmgr/prunmgr.c
    commons/proper/daemon/trunk/src/native/windows/src/gui.c
    commons/proper/daemon/trunk/src/native/windows/src/service.c

Modified: commons/proper/daemon/trunk/src/native/windows/apps/prunmgr/prunmgr.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/apps/prunmgr/prunmgr.c?rev=1814416&r1=1814415&r2=1814416&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/apps/prunmgr/prunmgr.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/apps/prunmgr/prunmgr.c Mon Nov  6 14:30:09 2017
@@ -638,25 +638,25 @@ LRESULT CALLBACK __generalProperty(HWND
                     }
                 break;
                 case IDC_PPSGSTART:
-                    apxProgressBox(hDlg, apxLoadResourceW(IDS_HSSTART, 0),
+                    apxProgressBox(hDlg, apxLoadResourceA(IDS_HSSTART, 0),
                                    _currentEntry->lpConfig->lpDisplayName,
                                    __startServiceCallback, NULL);
                     __generalPropertyRefresh(hDlg);
                 break;
                 case IDC_PPSGSTOP:
-                    apxProgressBox(hDlg, apxLoadResourceW(IDS_HSSTOP, 0),
+                    apxProgressBox(hDlg, apxLoadResourceA(IDS_HSSTOP, 0),
                                    _currentEntry->lpConfig->lpDisplayName,
                                    __stopServiceCallback, NULL);
                     __generalPropertyRefresh(hDlg);
                 break;
                 case IDC_PPSGPAUSE:
-                    apxProgressBox(hDlg, apxLoadResourceW(IDS_HSPAUSE, 0),
+                    apxProgressBox(hDlg, apxLoadResourceA(IDS_HSPAUSE, 0),
                                    _currentEntry->lpConfig->lpDisplayName,
                                    __pauseServiceCallback, NULL);
                     __generalPropertyRefresh(hDlg);
                 break;
                 case IDC_PPSGRESTART:
-                    apxProgressBox(hDlg, apxLoadResourceW(IDS_HSRESTART, 0),
+                    apxProgressBox(hDlg, apxLoadResourceA(IDS_HSRESTART, 0),
                                    _currentEntry->lpConfig->lpDisplayName,
                                    __restartServiceCallback, NULL);
                     __generalPropertyRefresh(hDlg);
@@ -1541,25 +1541,25 @@ LRESULT CALLBACK MainWndProc(HWND hWnd,
                 break;
                 case IDM_TM_START:
                     if (!_propertyOpened)
-                        apxProgressBox(hWnd, apxLoadResourceW(IDS_HSSTART, 0),
+                        apxProgressBox(hWnd, apxLoadResourceA(IDS_HSSTART, 0),
                                        _currentEntry->lpConfig->lpDisplayName,
                                        __startServiceCallback, NULL);
                 break;
                 case IDM_TM_STOP:
                     if (!_propertyOpened)
-                        apxProgressBox(hWnd, apxLoadResourceW(IDS_HSSTOP, 0),
+                        apxProgressBox(hWnd, apxLoadResourceA(IDS_HSSTOP, 0),
                                        _currentEntry->lpConfig->lpDisplayName,
                                        __stopServiceCallback, NULL);
                 break;
                 case IDM_TM_PAUSE:
                     if (!_propertyOpened)
-                        apxProgressBox(hWnd, apxLoadResourceW(IDS_HSPAUSE, 0),
+                        apxProgressBox(hWnd, apxLoadResourceA(IDS_HSPAUSE, 0),
                                        _currentEntry->lpConfig->lpDisplayName,
                                        __pauseServiceCallback, NULL);
                 break;
                 case IDM_TM_RESTART:
                     if (!_propertyOpened)
-                        apxProgressBox(hWnd, apxLoadResourceW(IDS_HSRESTART, 0),
+                        apxProgressBox(hWnd, apxLoadResourceA(IDS_HSRESTART, 0),
                                        _currentEntry->lpConfig->lpDisplayName,
                                        __restartServiceCallback, NULL);
                 break;
@@ -1766,7 +1766,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
     CreateThread(NULL, 0, refreshThread, NULL, 0, NULL);
     /* Create main invisible window */
     _gui_store->hMainWnd = CreateWindow(_gui_store->szWndClass,
-                                        apxLoadResourceW(IDS_APPLICATION, 0),
+                                        apxLoadResourceA(IDS_APPLICATION, 0),
                                         0, 0, 0, 0, 0,
                                         NULL, NULL,
                                         _gui_store->hInstance,

Modified: commons/proper/daemon/trunk/src/native/windows/src/gui.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/gui.c?rev=1814416&r1=1814415&r2=1814416&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/gui.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/gui.c Mon Nov  6 14:30:09 2017
@@ -321,7 +321,7 @@ static void __apxShellAbout(HWND hWnd)
              apxLoadResourceW(IDS_APPLICATION, 0));
 
     ShellAbout(hWnd, szApplication,
-               apxLoadResourceW(IDS_APPDESCRIPTION, 1),
+               apxLoadResourceA(IDS_APPDESCRIPTION, 1),
                _st_sys_gui.hIconHg);
 }
 
@@ -345,7 +345,7 @@ static LRESULT CALLBACK __apxAboutDlgPro
             szTxt = (LPSTR)LockResource(hGlob);
             
             SendMessageA(hRich, WM_SETTEXT, 0, (LPARAM)szTxt);
-            SetDlgItemText(hDlg, IDC_ABOUTAPP, apxLoadResourceW(IDS_APPFULLNAME, 0));
+            SetDlgItemText(hDlg, IDC_ABOUTAPP, apxLoadResourceA(IDS_APPFULLNAME, 0));
             ptScroll.x = 0;
             ptScroll.y = 0;
             return TRUE;

Modified: commons/proper/daemon/trunk/src/native/windows/src/service.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/service.c?rev=1814416&r1=1814415&r2=1814416&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/service.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/service.c Mon Nov  6 14:30:09 2017
@@ -268,7 +268,7 @@ __apxStopDependentServices(LPAPXSERVICE
     DWORD dwCount;
 
     LPENUM_SERVICE_STATUSW  lpDependencies = NULL;
-    ENUM_SERVICE_STATUS     ess;
+    ENUM_SERVICE_STATUSW    ess;
     SC_HANDLE               hDepService;
     SERVICE_STATUS_PROCESS  ssp;
 
@@ -294,9 +294,9 @@ __apxStopDependentServices(LPAPXSERVICE
 
         /* Allocate a buffer for the dependencies.
          */
-        lpDependencies = (LPENUM_SERVICE_STATUS) HeapAlloc(GetProcessHeap(),
-                                                           HEAP_ZERO_MEMORY,
-                                                           dwBytesNeeded);
+        lpDependencies = (LPENUM_SERVICE_STATUSW) HeapAlloc(GetProcessHeap(),
+                                                            HEAP_ZERO_MEMORY,
+                                                            dwBytesNeeded);
         if (!lpDependencies)
             return FALSE;