From 39983aec3fa69e9d18b43416ac71c2111ef7db93 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Thu, 27 Apr 2006 18:45:15 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=10043 --- checkin_notes | 11 +++ win_build/installerv2/BOINC.ism | Bin 206336 -> 206336 bytes .../Windows/src/boinccas/CAShutdownBOINC.cpp | 84 +++++++++++++----- .../redist/Windows/x86/boinccas.dll | Bin 81920 -> 81920 bytes .../redist/Windows/x86/boinccas95.dll | Bin 69632 -> 69632 bytes 5 files changed, 74 insertions(+), 21 deletions(-) diff --git a/checkin_notes b/checkin_notes index 2e7662d33c..61e76503c4 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4220,3 +4220,14 @@ Charlie 27 Apr 06 HowToBuildBOINC_XCode.rtf boinc.xcodeproj/ project.pbxproj + +Rom 27 Apr 2006 + - Bug Fix: Create a BOINC Service shutdown custom action for the installer + since the installer technology wants to wait until after it has found + out which files are in use to shutdown the service. + + win_build/installerv2/redist/Windows/src/boinccas/ + CAShutdownBOINC.cpp, .h (Added) + win_build/installerv2/redist/Windows/x86/ + boinccas95.dll + boinccas.dll diff --git a/win_build/installerv2/BOINC.ism b/win_build/installerv2/BOINC.ism index 94df506bc7a2f8c7836a3f46230eab4c6ed48d78..0fdaadede5f383b541ab833e2e2434b6d1d54edc 100644 GIT binary patch delta 725 zcmY*XZAepL6u#$u@8;F*?rKx>GjC2(DN3y@#22<)OobPfj|o^#+i@H~U_#=&{x3m2jSdpRt#ODwys6&bh-IjRzUmQ?&edAeMNVSa|UqF)1-ufc=b>|BI54J^QVc*}TA z4>e)G`9_RMk^P56uk7rx%YLytyq&&*1DVH!4!f(=>#eXW_8O0dL+2wn(3~VlqSvlC zM8zZe9L^3$NRD7N;x&iO{VT~rd1<|)PwDjd+-0@aGv(oLw|+tBPLqHI2B|F%9}5<( ztQGaGm34Ksb*=fKKqM+K!fNzCvf#w=&}bwzFvki~mB-a7$yRrVtFKe43N1u30$*66 zUy^&B9(S+k+*yP+BB?8f?)oC+g!d={=p8({G0p9XSz5%SSfo(wEPo-vCnHZjZszrug!>G&d)7`Qdw zY--~ZOhe0Xl9nvPL>_r$g#*+Oi{3{ClMqtl8uzNh%^bxk=o1d^Lphvcceykdipc#m zltT4Y=wo)!jab#4nngJoeXsbDNMhI6J+yix zIEPqLJByOZ@GE2_4`xs@&0Ii}maz>q%7TtQ|Bez&T#ObV!`~3mO&0T*+>D28YUJ=c z2*zNRtbavGWR?dr6-@Xo1Y@y2z8x-9mbF;gJ(^QJm*m6J70E`56LB()OT-y0tx3Tz G4Zi`%l==ez delta 625 zcmYL_T}V_x6vy|>jQi={k#)6IuXb@C(h9ovVbF&t*n$yMN*@xW%X(oKS9iJI3?XWR zs8?y>4oMHS&^|<%IM6(%KKPaSkPy8|d0!%kRwNJt8yBK;Ue517^FQazyU{8|GLlGdiZF$|r@NQr|8$ zu+|XJq5?$F5H!0*M+6oc*{8D*@|XKWqkTr&ZimVJ=_20_BUq?sz@hAY52)`h!tHx( za1k^FIhI=ln?;u34O?7-7c999MOL)}GkKkO#oP)!_IXa^%E_*7KpT6s0ea}1;&QDA zzXiVse*~+Q!C;Ld<~E=+AWaIZ-GswscjqR|>!Ps=ZF%yu*A7(NFw%)kF@lg#>yd-) z7*dN(s70tTy$c-5y=+5FEs!(TlghR4%oGls<2zAwOA)iZ^E4- JTaPCLe*tL5(YXKs diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp index 3dddb97127..a41f2dbe5a 100644 --- a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp +++ b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp @@ -58,39 +58,81 @@ CAShutdownBOINC::~CAShutdownBOINC() // Description: // ///////////////////////////////////////////////////////////////////// + +// OpenSCManager() +typedef SC_HANDLE (WINAPI *tOSCM)( + LPCSTR lpMachineName, + LPCSTR lpDatabaseName, + DWORD dwDesiredAccess +); + +// OpenService() +typedef SC_HANDLE (WINAPI *tOS)( + SC_HANDLE hSCManager, + LPCSTR lpServiceName, + DWORD dwDesiredAccess +); + +// ControlService() +typedef SC_HANDLE (WINAPI *tCS)( + SC_HANDLE hService, + DWORD dwControl, + LPSERVICE_STATUS lpServiceStatus +); + UINT CAShutdownBOINC::OnExecution() { SC_HANDLE schSCManager = NULL; SC_HANDLE schService = NULL; SERVICE_STATUS ssStatus; UINT uiReturn = ERROR_SUCCESS; + tOSCM pOSCM = NULL; + tOS pOS = NULL; + tCS pCS = NULL; - schSCManager = OpenSCManager( - NULL, // local machine - NULL, // ServicesActive database - GENERIC_READ); // full access rights - if (schSCManager) - { - schService = OpenService( - schSCManager, // SCM database - _T("BOINC"), // service name - GENERIC_READ | GENERIC_EXECUTE); - - if (schService) - { - if (!ControlService(schService, SERVICE_CONTROL_STOP, &ssStatus)) - { - uiReturn = ERROR_INSTALL_FAILURE; - } + HMODULE hAdvapi32 = LoadLibrary(_T("advapi32.dll")); + if (hAdvapi32) { + pOSCM = (tOSCM)GetProcAddress(hAdvapi32, _T("OpenSCManagerA")); + pOS = (tOS)GetProcAddress(hAdvapi32, _T("OpenServiceA")); + pCS = (tCS)GetProcAddress(hAdvapi32, _T("ControlService")); + if (!pOSCM && !pOS && !pCS) { + FreeLibrary(hAdvapi32); + hAdvapi32 = NULL; + pOSCM = NULL; + pOS = NULL; + pCS = NULL; } } - if (schSCManager) - CloseServiceHandle(schSCManager); + if (pOSCM && pOS && pCS) { + schSCManager = pOSCM( + NULL, // local machine + NULL, // ServicesActive database + GENERIC_READ); // full access rights - if (schService) - CloseServiceHandle(schService); + if (schSCManager) + { + schService = pOS( + schSCManager, // SCM database + _T("BOINC"), // service name + GENERIC_READ | GENERIC_EXECUTE); + + if (schService) + { + if (!pCS(schService, SERVICE_CONTROL_STOP, &ssStatus)) + { + uiReturn = ERROR_INSTALL_FAILURE; + } + } + } + + if (schSCManager) + CloseServiceHandle(schSCManager); + + if (schService) + CloseServiceHandle(schService); + } return uiReturn; } diff --git a/win_build/installerv2/redist/Windows/x86/boinccas.dll b/win_build/installerv2/redist/Windows/x86/boinccas.dll index 48eafac29c509d00864b629d4cebe6a3381d9be8..4aa5363e8f61b0db46210b9cb9a02b895369e3ce 100644 GIT binary patch delta 113 zcmZo@U~On%UBJlP_|ktfGo#}H5M#3YL2YFd1tS9kGkpUSeM4gf14}CdGbukaBH{o5 delta 85 zcmZo@U~On%UBJlfC}OvnnbGk8h%wpyp!VdlGa{3Ht_f_Ob}&zkk#RHYi}gZaMcaSf h73E}M00Bk@mg#c^7~e9QZ0{CibY}$8mxUO0bpfiH8ZrO? diff --git a/win_build/installerv2/redist/Windows/x86/boinccas95.dll b/win_build/installerv2/redist/Windows/x86/boinccas95.dll index 0b10f52f31d9d56def89f5efce18f3e300f478f2..da64f847d44131c92a728b7a7aa4509c26af3342 100644 GIT binary patch delta 5106 zcmeH~e^irKn#b>r!Nv~O*Fp+vtO0{WiyBCX`AJ{|#aV1aWdIcw1)WzGl_GR-#gb~U z*nkDEoxv%c1C(}^oR#SX`%J8a+m-hkTap8aS4 z-kkHf&vT#q+#m0~&wbuEu12}5QC{oH-9?hdBe${O56Jy3iy=QOcp)I8_ml?Y^SkpzK4x7+_z#>Zgrw0R5;;4a&7gZ` z74;L+Let;bG0l|_9E@^o{~k*r3%&^QceZ0 zIkb8f#I=QH1syuEBwwcf72CB$EmQo8RV~rdA$E32Y?Ss45stYvYD$Rbj{erMa!t6T z3~qukSrc9>hN4-VWRFGfcrqMD&xG}_rTawx3_>KOzz#-7(R$Vty`E;UucCdloONiM zsgM15X#{O&KV7;MmZqi0Wx=g1cG(*;(#k$u#^@N^@ysh>{uUzmSNvI$j`S(qzS5GK zG)-E%ID8^Tx#%`;>Y1Ewn&aj>aAZ{F890`&i4jF+h)G!x@Y(vnrzGi7yWe{-#+lQV=Y*vTS4C6Iz)3`lku$g{hOh zZ`@8}*fX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