Changeset 1fc246c in nscp
- Timestamp:
- 09/22/09 21:16:37 (4 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- 55e44d4
- Parents:
- e7dbac9
- Files:
-
- 1 added
- 13 edited
-
AutoBuild.h (modified) (1 diff)
-
Jamroot (modified) (3 diffs)
-
NSC.dist (modified) (1 diff)
-
NSClient++-2005.sln (modified) (2 diffs)
-
changelog (modified) (1 diff)
-
helpers/build-archive/Jamfile (added)
-
helpers/installer/Product.wxs (modified) (5 diffs)
-
helpers/installer_dll/installer_helper.hpp (modified) (1 diff)
-
helpers/installer_dll/main_dll.cpp (modified) (4 diffs)
-
include/strEx.h (modified) (1 diff)
-
modules/CheckWMI/CheckWMI.cpp (modified) (6 diffs)
-
modules/CheckWMI/WMIQuery.cpp (modified) (1 diff)
-
modules/CheckWMI/WMIQuery.h (modified) (1 diff)
-
modules/LUAScript/LUAScript-2005.vcproj (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
AutoBuild.h
re7dbac9 r1fc246c 3 3 // change the FALSE to TRUE for autoincrement of build number 4 4 #define INCREMENT_VERSION TRUE 5 #define FILEVER 0,3,7, 2796 #define PRODUCTVER 0,3,7, 2797 #define STRFILEVER _T("0.3.7. 279")8 #define STRPRODUCTVER _T("0.3.7. 279")9 #define STRPRODUCTDATE _T("2009-09- 06")5 #define FILEVER 0,3,7,347 6 #define PRODUCTVER 0,3,7,347 7 #define STRFILEVER _T("0.3.7.347") 8 #define STRPRODUCTVER _T("0.3.7.347") 9 #define STRPRODUCTDATE _T("2009-09-20") 10 10 #endif // AUTOBUILD_H -
Jamroot
r308b6f5 r1fc246c 30 30 local target-config = nsc.ini ; 31 31 local target-readme = readme.txt ; 32 local target-guide = "Nagios Usage Guide.pdf" ; 33 local target-refman = "NSClient++ Reference Manual.pdf" ; 32 34 local target-changelog = changelog.txt ; 33 35 local target-license = license.txt ; … … 150 152 explicit $(target-config) ; 151 153 152 make $(target-readme) : files/readme.txt : common.copy ;154 make $(target-readme) : docs/readme.txt : common.copy ; 153 155 explicit $(target-readme) ; 156 make $(target-guide) : "docs/Nagios Usage Guide.pdf" : common.copy ; 157 explicit $(target-guide) ; 158 make $(target-refman) : "docs/NSClient++ Reference Manual.pdf" : common.copy ; 159 explicit $(target-refman) ; 154 160 155 161 make $(target-license) : files/license.txt : common.copy ; … … 262 268 explicit all-scripts-targets ; 263 269 264 alias all-root-targets : $(target) $(target-config) $(target-readme) $(target- license) $(target-changelog) $(target-counters) helpers/systray_helper ;270 alias all-root-targets : $(target) $(target-config) $(target-readme) $(target-guide) $(target-refman) $(target-license) $(target-changelog) $(target-counters) helpers/systray_helper ; 265 271 explicit all-root-targets ; 266 272 -
NSC.dist
r358cda1 r1fc246c 276 276 ;host_check=check_ok 277 277 278 [NRPE Handlers]279 ;# COMMAND DEFINITIONS280 ;# Command definitions that this daemon will run.281 ;# Can be either NRPE syntax:282 ;command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10283 ;# Or simplified syntax:284 ;test=c:\test.bat foo $ARG1$ bar285 ;check_disk1=/usr/local/nagios/libexec/check_disk -w 5 -c 10286 ;# Or even loopback (inject) syntax (to run internal commands)287 ;# This is a way to run "NSClient" commands and other internal module commands such as check eventlog etc.288 ;check_cpu=inject checkCPU warn=80 crit=90 5 10 15289 ;check_eventlog=inject CheckEventLog Application warn.require.eventType=error warn.require.eventType=warning critical.require.eventType=error critical.exclude.eventType=info truncate=1024 descriptions290 ;check_disk_c=inject CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M File:WIN=c:\ATI\*.*291 ;# But be careful:292 ; dont_check=inject dont_check This will "loop forever" so be careful with the inject command...293 ;# Check some escapings...294 ; check_escape=inject CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M "File: foo \" WIN=c:\\WINDOWS\\*.*"295 ;# Some real world samples296 ;nrpe_cpu=inject checkCPU warn=80 crit=90 5 10 15297 ;nrpe_ok=scripts\ok.bat298 ;check_multi_line=scripts\multi_line.bat299 ;#300 ;# The sample scripts301 ;#302 ;check_long=scripts\long.bat303 ;check_ok=scripts\ok.bat304 ;check_nok=scripts\xlong.bat305 ;check_vbs=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs306 307 278 ;# REMOTE NRPE PROXY COMMANDS 308 279 ; A list of commands that check other hosts. -
NSClient++-2005.sln
r358cda1 r1fc246c 1696 1696 {743B2362-DF6A-4C28-A6C9-0F970D8E1B66}.Debug|Mixed Platforms.Build.0 = Debug|Win32 1697 1697 {743B2362-DF6A-4C28-A6C9-0F970D8E1B66}.Debug|Win32.ActiveCfg = Debug|Win32 1698 {743B2362-DF6A-4C28-A6C9-0F970D8E1B66}.Debug|Win32.Build.0 = Debug|Win321699 1698 {743B2362-DF6A-4C28-A6C9-0F970D8E1B66}.Debug|x64.ActiveCfg = Debug|x64 1700 1699 {743B2362-DF6A-4C28-A6C9-0F970D8E1B66}.Debug-MemCheck|Any CPU.ActiveCfg = Debug|Win32 … … 1737 1736 {DF1DB6FB-0448-46D6-AE82-9901495E5F1A}.Debug|Mixed Platforms.Build.0 = Debug|x64 1738 1737 {DF1DB6FB-0448-46D6-AE82-9901495E5F1A}.Debug|Win32.ActiveCfg = Debug|Win32 1739 {DF1DB6FB-0448-46D6-AE82-9901495E5F1A}.Debug|Win32.Build.0 = Debug|Win321740 1738 {DF1DB6FB-0448-46D6-AE82-9901495E5F1A}.Debug|x64.ActiveCfg = Debug|x64 1741 1739 {DF1DB6FB-0448-46D6-AE82-9901495E5F1A}.Debug|x64.Build.0 = Debug|x64 -
changelog
re7dbac9 r1fc246c 6 6 * Fixa dependonservice LanManWorkStation (old win) 7 7 * Fix RtlStringFromGUID problem on NT4 8 9 2009-09-20 MickeM 10 * Fixed alias in CheckWMI (now works) 11 + Added columnSyntax to CheckWMI to allow formating of returned data (default is %column%=%value%) 12 + Added columnSeparator to CheckWMI to allow formating of returned data (default is ", ") 13 14 2009-09-13 MickeM 15 * Fixed some more issues with the installer should not "work" on Windows 2008 as well as slightly simpler to configure. 8 16 9 17 2009-09-06 MickeM -
helpers/installer/Product.wxs
r308b6f5 r1fc246c 98 98 IconIndex="0" Description="Start the $(var.App.Title) systemtray agent"/> 99 99 </File> 100 100 101 <File Id="NSClientINI" Name="NSC.ini" LongName="NSC.ini" DiskId="1" Source="$(var.Path.ini)/NSC.ini" Vital="yes"/> 101 102 <?ifdef var.boost ?> … … 113 114 <Component Id="FireWallException" Guid="F6636DB0-A0B9-4dA2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)" /> 114 115 <Component Id="ServiceRegistration" Guid="F6636DB0-A0B9-4dA2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)" /> 116 <Component Id="Documentation" Guid="9B490E67-5472-4267-889C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 117 <File Id="doc.usage.nagios" Name="nagios.pdf" LongName="Nagios Usage Guide.pdf" DiskId="1" Source="$(var.Source)/Nagios Usage Guide.pdf" Vital="no" > 118 <Shortcut Id="Startmenu.doc.nagios" Directory="ProgramMenuDir" Name="nagios" 119 LongName="Nagios Usage Guide" WorkingDirectory="INSTALLDIR" Description="Nagios Usage Guide"/> 120 </File> 121 <File Id="doc.reference" Name="nsclient.pdf" LongName="NSClient++ Reference Manual.pdf" DiskId="1" Source="$(var.Source)/NSClient++ Reference Manual.pdf" Vital="no" > 122 <Shortcut Id="Startmenu.doc.ref" Directory="ProgramMenuDir" Name="refman" 123 LongName="NSClient++ Reference Manual" WorkingDirectory="INSTALLDIR" Description="NSClient++ Reference Manual"/> 124 </File> 125 </Component> 115 126 <Directory Id="INSTALLLOCATION_MODS" Name="modules"> 116 127 <Component Id="NRPEListener" Guid="5A0246F8-5167-45db-B246-$(var.Postfix.GUID)" Win64="$(var.Win64)"> … … 170 181 <Feature Id="ServiceRegistration" Title="Register service" Description="Register the NSClient++ service" Level="1"> 171 182 <ComponentRef Id="ServiceRegistration" /> 183 </Feature> 184 <Feature Id="Documentation" Title="Documentation (pdf)" Description="Documentation for NSClient++ and how to use it from Nagios" Level="1"> 185 <ComponentRef Id="Documentation" /> 172 186 </Feature> 173 187 <Feature Id="Plugins" Title="Plugins" Description="Plugins" Level="1" Absent="disallow"> … … 232 246 </CustomTable> 233 247 234 <!-- 235 <Condition Message='This installation can only run in full UI mode.'> 236 UILevel = 5 237 </Condition> 238 --> 239 <Property Id='ARPCOMMENTS'>NSClient++ is a </Property> 240 <Property Id='ARPCONTACT'>michael@medin.name</Property> 241 <Property Id='ARPHELPLINK'>http://nsclient.org</Property> 242 <Property Id='ARPURLINFOABOUT'>http://nsclient.org</Property> 243 <Property Id='ARPURLUPDATEINFO'>http://nsclient.org</Property> 244 <Property Id='ARPHELPTELEPHONE'>http://nsclient.org</Property> 245 <Property Id='ARPPRODUCTICON'>nsclient.exe</Property> 246 247 <Property Id="CONF_CHECKS_DEFAULT"></Property> 248 <Property Id="CONF_NSCLIENT_DEFAULT"></Property> 249 <Property Id="CONF_NRPE_DEFAULT"></Property> 250 <Property Id="CONF_NSCA_DEFAULT"></Property> 251 <Property Id="CONF_WMI_DEFAULT"></Property> 252 <Property Id="ALLOW_CONFIGURATION" /> 253 254 <!-- CONFIGURE DEFAULT VALUES--> 255 <!-- 256 <Property Id="ALLOWED_HOSTS_DEFAULT">$$EMPTY$$</Property> 257 <Property Id="NSCLIENT_PWD_DEFAULT">$$EMPTY$$</Property> 258 --> 259 260 <!-- CONFIGURE THE INSTALLER --> 261 <Property Id='INSCON_CONFIGURE'>1</Property> 262 <Property Id='MAIN_CONFIGURATION_FILE'>NSC.ini</Property> 263 <Property Id='CUSTOM_CONFIGURATION_FILE'>NSC.ini</Property> 264 265 <Property Id='HELP_LINK'>http://nsclient.org/nscp/</Property> 266 267 <Property Id='SHOW_START_ON_EXIT'>1</Property> 268 <Property Id='START_SERVICE_ON_EXIT'></Property> 269 <Property Id='SHOW_DONATE_ON_EXIT'>1</Property> 270 <Property Id='DONATE_ON_EXIT'></Property> 271 <Property Id='KEEP_WHICH_CONFIG'>NEW</Property> 272 <!-- 273 <Property Id='MAIN_CONFIGURATION_FILE'>NSC.ini</Property> 274 --> 275 <!-- 276 <Property Id='ARPREADME'>path</Property> 277 <Property Id='ARPSIZE'>app size in kilobytes</Property> 278 --> 248 <?include properties.wxs ?> 279 249 280 250 <CustomAction Id='ReadOldConfig' BinaryKey='InstallerHelper' DllEntry='ImportConfig' Impersonate='no' /> 281 <CustomAction Id='ScheduleWriteConfig' BinaryKey='InstallerHelper' DllEntry='ScheduleWriteConfig' Impersonate='no' />282 <CustomAction Id="ExecWriteConfig" BinaryKey="InstallerHelper" DllEntry="ExecWriteConfig" Execute="deferred" Impersonate="no" Return="check" />251 <CustomAction Id='ScheduleWriteConfig' BinaryKey='InstallerHelper' DllEntry='ScheduleWriteConfig' Impersonate='no' /> 252 <CustomAction Id="ExecWriteConfig" BinaryKey="InstallerHelper" DllEntry="ExecWriteConfig" Execute="deferred" Impersonate="no" Return="check" /> 283 253 284 254 <CustomAction Id='NeedUninstall' BinaryKey='InstallerHelper' DllEntry='NeedUninstall' Impersonate='no' /> … … 311 281 <RemoveExistingProducts After='InstallInitialize'/> 312 282 <Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWAPPFOUND</Custom> 313 <Custom Action="ScheduleWriteConfig" After='InstallFiles' />314 <Custom Action="SchedServiceInstall" After="InstallFiles" />283 <Custom Action="ScheduleWriteConfig" After='InstallFiles' /> 284 <Custom Action="SchedServiceInstall" After="InstallFiles" /> 315 285 <Custom Action="SchedServiceUnInstall" Before="RemoveFiles" /> 316 286 <Custom Action="StopAllServices" Before="InstallValidate" /> -
helpers/installer_dll/installer_helper.hpp
re7dbac9 r1fc246c 450 450 } 451 451 } 452 bool is_installed(std::wstring wzComponentId) 453 { 454 INSTALLSTATE isInstalled = INSTALLSTATE_UNKNOWN; 455 INSTALLSTATE isAction = INSTALLSTATE_UNKNOWN; 456 UINT er = ::MsiGetComponentStateW(hInstall_, wzComponentId.c_str(), &isInstalled, &isAction); 457 if (ERROR_SUCCESS != er) { 458 logMessage(_T("State for : ") + wzComponentId + _T(" was unknown due to: ") + error::format::from_system(er)); 459 return WCA_TODO_UNKNOWN; 460 } 461 return (INSTALLSTATE_LOCAL == isInstalled || INSTALLSTATE_SOURCE == isInstalled); 462 } 452 463 /******************************************************************** 453 464 WcaIsInstalling() - determines if a pair of installstates means install -
helpers/installer_dll/main_dll.cpp
r308b6f5 r1fc246c 491 491 492 492 493 //#pragma comment(linker, "/EXPORT:UninstallService=_UninstallService@4")494 /*495 extern "C" UINT __stdcall UninstallService (MSIHANDLE hInstall) {496 msi_helper h(hInstall, _T("UninstallService"));497 try {498 h.logMessage(_T("Remove mode is: ") + h.getPropery(_T("REMOVE")));499 h.logMessage(_T("mime mode is: ") + h.getPropery(_T("REMOVE_MIME")));500 h.setProperty(_T("REMOVE_MIME"), _T("test"));501 502 h.startProgress(10000, 2*10000, _T("Removing service: [2] ([1])..."), _T("Removing service: [2] ([1])... (X)"));503 if (!uninstall(h))504 return ERROR_INSTALL_FAILURE;505 } catch (installer_exception e) {506 h.errorMessage(_T("Failed to install service: ") + e.what());507 return ERROR_INSTALL_FAILURE;508 } catch (...) {509 h.errorMessage(_T("Failed to install service: <UNKNOWN EXCEPTION>"));510 return ERROR_INSTALL_FAILURE;511 }512 return ERROR_SUCCESS;513 }514 */515 516 493 //#pragma comment(linker, "/EXPORT:UpdateConfig=_UpdateConfig@4") 517 494 … … 534 511 { 535 512 std::wstring shortname = h.get_record_formatted_string(hRec, feqShortName); 536 h.logMessage(_T("Starting: ") + shortname); 537 if (!start(h, shortname)) { 538 h.logMessage(_T("service failed to start: ") + shortname); 513 std::wstring component = h.get_record_string(hRec, feqComponent); 514 515 // figure out what we're doing for this exception, treating reinstall the same as install 516 msi_helper::WCA_TODO todoComponent = h.get_component_todo(component); 517 if ((msi_helper::WCA_TODO_REINSTALL == todoComponent ? msi_helper::WCA_TODO_INSTALL : todoComponent) != msi_helper::WCA_TODO_INSTALL) { 518 h.logMessage(_T("Component '") + component + _T("' action state (") + strEx::itos(todoComponent) + _T(") doesn't match request (") + strEx::itos(msi_helper::WCA_TODO_INSTALL) + _T(")")); 519 hRec = h.fetch_record(hView); 520 continue; 521 } 522 try { 523 if (!serviceControll::isStarted(shortname)) { 524 h.updateProgress(_T("Starting service"), shortname); 525 serviceControll::Start(shortname); 526 } 527 } catch (const serviceControll::SCException& e) { 528 h.logMessage(_T("Failed to start service: ") + shortname + _T(": ") + e.error_); 539 529 } 540 530 hRec = h.fetch_record(hView); … … 547 537 if (r > 32) 548 538 return ERROR_SUCCESS; 549 msi_helper h(hInstall, _T("Donate")); 550 h.errorMessage(_T("Failed to start web browser...")); 539 h.errorMessage(_T("Failed to start web browser for donations...")); 551 540 return ERROR_INSTALL_FAILURE; 552 541 } 553 542 } catch (installer_exception e) { 554 h.errorMessage(_T("Failed to start service: ") + e.what());555 return ERROR_INSTALL_FAILURE; 556 } catch (...) { 557 h.errorMessage(_T("Failed to start service: <UNKNOWN EXCEPTION>"));543 h.errorMessage(_T("Failed to process finalizing stuff: ") + e.what()); 544 return ERROR_INSTALL_FAILURE; 545 } catch (...) { 546 h.errorMessage(_T("Failed to process finalizing stuff: <UNKNOWN EXCEPTION>")); 558 547 return ERROR_INSTALL_FAILURE; 559 548 } … … 584 573 { 585 574 std::wstring shortname = h.get_record_formatted_string(hRec, feqShortName); 586 h.logMessage(_T("Stopping: ") + shortname); 587 if (!stop(h, shortname)) { 588 h.logMessage(_T("service failed to stop: ") + shortname); 575 std::wstring component = h.get_record_string(hRec, feqComponent); 576 577 // figure out what we're doing for this exception, treating reinstall the same as install 578 msi_helper::WCA_TODO todoComponent = h.get_component_todo(component); 579 if (todoComponent == msi_helper::WCA_TODO_REINSTALL) 580 todoComponent = msi_helper::WCA_TODO_INSTALL; 581 h.logMessage(_T("Component '") + component + _T("' action state (") + strEx::itos(todoComponent)); 582 if (todoComponent != msi_helper::WCA_TODO_INSTALL && todoComponent != msi_helper::WCA_TODO_UNINSTALL) { 583 h.logMessage(_T("Component '") + component + _T("' action state (") + strEx::itos(todoComponent) + _T(") doesn't match request (IN/UN/RE)")); 584 hRec = h.fetch_record(hView); 585 continue; 586 } 587 try { 588 if (serviceControll::isStarted(shortname)) { 589 h.updateProgress(_T("Stopping service"), shortname); 590 serviceControll::Stop(shortname); 591 } 592 } catch (const serviceControll::SCException& e) { 593 h.logMessage(_T("Failed to stop service: ") + shortname + _T(": ") + e.error_); 589 594 } 590 595 hRec = h.fetch_record(hView); 591 596 } 592 /* 593 val = h.getPropery(_T("DONATE_ON_EXIT")); 594 if (val == _T("1")) { 595 long r = (long)ShellExecute(NULL, _T("open"), _T("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=michael@medin.name&item_name=Fans+of+NSClient%2B%2B&item_number=Installer+Campaign&amount=10%2e00¤cy_code=EUR&return=http%3A//nsclient.org"), NULL, NULL, SW_SHOWNORMAL); 596 if (r > 32) 597 return ERROR_SUCCESS; 598 msi_helper h(hInstall, _T("Donate")); 599 h.errorMessage(_T("Failed to start web browser...")); 600 return ERROR_INSTALL_FAILURE; 601 } 602 */ 603 } catch (installer_exception e) { 604 h.errorMessage(_T("Failed to start service: ") + e.what()); 605 return ERROR_INSTALL_FAILURE; 606 } catch (...) { 607 h.errorMessage(_T("Failed to start service: <UNKNOWN EXCEPTION>")); 597 } catch (installer_exception e) { 598 h.errorMessage(_T("Failed to stop service: ") + e.what()); 599 return ERROR_INSTALL_FAILURE; 600 } catch (...) { 601 h.errorMessage(_T("Failed to stop service: <UNKNOWN EXCEPTION>")); 608 602 return ERROR_INSTALL_FAILURE; 609 603 } -
include/strEx.h
rdcd5462 r1fc246c 65 65 } 66 66 67 inline void append_list(std::wstring &lst, std::wstring &append) { 67 inline void append_list(std::wstring &lst, std::wstring &append, std::wstring sep = _T(", ")) { 68 if (append.empty()) 69 return; 68 70 if (!lst.empty()) 69 lst += _T(", ");71 lst += sep; 70 72 lst += append; 71 73 } -
modules/CheckWMI/CheckWMI.cpp
r3692371 r1fc246c 94 94 std::wstring ns = _T("root\\cimv2"); 95 95 bool bPerfData = true; 96 std::wstring colSyntax; 97 std::wstring colSep; 96 98 97 99 WMIContainer result_query; … … 101 103 MAP_OPTIONS_STR2INT(_T("truncate"), truncate) 102 104 MAP_OPTIONS_STR(_T("namespace"), ns) 103 MAP_OPTIONS_STR(_T("Alias"), alias)105 MAP_OPTIONS_STR(_T("Alias"), result_query.alias) 104 106 MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 105 107 MAP_OPTIONS_NUMERIC_ALL(result_query, _T("")) 106 108 MAP_OPTIONS_SHOWALL(result_query) 107 109 MAP_CHAINED_FILTER(_T("string"),string) 110 MAP_OPTIONS_STR(_T("columnSyntax"),colSyntax) 111 MAP_OPTIONS_STR(_T("columnSeparator"),colSep) 108 112 MAP_CHAINED_FILTER(_T("numeric"),numeric) 109 113 MAP_OPTIONS_SECONDARY_BEGIN(_T(":"), p2) … … 112 116 else if (p2.first == _T("Query")) { 113 117 query = p__.second; 114 alias = p2.second;118 result_query.alias = p2.second; 115 119 } 116 120 MAP_OPTIONS_MISSING_EX(p2, message, _T("Unknown argument: ")) … … 135 139 NSC_DEBUG_MSG_STD(_T("No filters specified so we will match all rows")); 136 140 hit_count = rows.size(); 141 for (WMIQuery::result_type::iterator citRow = rows.begin(); citRow != rows.end(); ++citRow) { 142 WMIQuery::wmi_row vals = *citRow; 143 strEx::append_list(message, vals.render(colSyntax, colSep), colSep); 144 } 137 145 } else { 138 146 bool match = chain.get_inital_state(); … … 141 149 match = chain.match(match, vals); 142 150 if (match) { 143 strEx::append_list(message, vals.render( ));151 strEx::append_list(message, vals.render(colSyntax, colSep), colSep); 144 152 hit_count++; 145 153 } … … 149 157 if (!bPerfData) 150 158 result_query.perfData = false; 159 if (result_query.alias.empty()) 160 result_query.alias = _T("wmi query"); 161 162 NSC_DEBUG_MSG_STD(_T("Message is: ") + message); 151 163 result_query.runCheck(hit_count, returnCode, message, perf); 152 164 if ((truncate > 0) && (message.length() > (truncate-4))) -
modules/CheckWMI/WMIQuery.cpp
r7221dc8 r1fc246c 93 93 } else if (vValue.vt == VT_I4) { 94 94 value.setNumeric(column, vValue.lVal); 95 } else if (vValue.vt == VT_UI1) { 96 value.setNumeric(column, vValue.uintVal); 95 97 } else if (vValue.vt == VT_UINT) { 96 98 value.setNumeric(column, vValue.uintVal); -
modules/CheckWMI/WMIQuery.h
r7221dc8 r1fc246c 134 134 } 135 135 136 std::wstring render( ) {136 std::wstring render(std::wstring syntax = _T(""), std::wstring sep = _T(", ")) { 137 137 std::wstring ret; 138 138 for (list_type::const_iterator it = results.begin(); it != results.end(); ++it) { 139 if (!ret.empty()) ret += _T(", "); 140 ret += (*it).first + _T("=") + (*it).second.string; 139 if (syntax.empty()) { 140 if (!ret.empty()) ret += sep; 141 ret += (*it).first + _T("=") + (*it).second.string; 142 } else { 143 std::wstring sub = syntax; 144 strEx::replace(sub, _T("%column%"), (*it).first); 145 strEx::replace(sub, _T("%value%"), (*it).second.string); 146 strEx::replace(sub, _T("%") + (*it).first + _T("%"), (*it).second.string); 147 if (sub == syntax) 148 continue; 149 strEx::append_list(ret, sub, sep); 150 } 141 151 } 142 152 return ret; -
modules/LUAScript/LUAScript-2005.vcproj
r3692371 r1fc246c 48 48 Name="VCCLCompilerTool" 49 49 Optimization="0" 50 AdditionalIncludeDirectories=" ../include;../../include"50 AdditionalIncludeDirectories=""D:\source\NSCP-stable\lib-source\LUA\src\lua-5.1.2\src\";../include;../../include" 51 51 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;" 52 52 MinimalRebuild="true"
Note: See TracChangeset
for help on using the changeset viewer.








