| 110 | } |
| 111 | |
| 112 | int CDriverTable::ParseTableEntry(CString& s, char& mask, int& select, WinSys::DriverInfo& info, int column) { |
| 113 | auto& pdata = info.GetStatusProcess(); |
| 114 | auto& svcex = GetServiceInfoEx(info.GetName()); |
| 115 | auto config = svcex.GetConfiguration(); |
| 116 | switch (column) { |
| 117 | case 0: |
| 118 | s = info.GetName().c_str(); |
| 119 | break; |
| 120 | case 1: |
| 121 | s = info.GetDisplayName().c_str(); |
| 122 | break; |
| 123 | case 2: |
| 124 | s = ServiceStateToString(pdata.CurrentState); |
| 125 | break; |
| 126 | case 3: |
| 127 | s = ServiceTypeToString(pdata.Type); |
| 128 | break; |
| 129 | case 4: |
| 130 | s = config ? ServiceStartTypeToString(*config) : AccessDenied; |
| 131 | break; |
| 132 | case 5: |
| 133 | s = svcex.GetDescription(); |
| 134 | break; |
| 135 | case 6: |
| 136 | s = config ? CString(config->BinaryPathName.c_str()) : AccessDenied; |
| 137 | break; |
| 138 | default: |
| 139 | break; |
| 140 | } |
| 141 | |
| 142 | return s.GetLength(); |
| 143 | } |
| 144 | |
| 145 | PCWSTR CDriverTable::ServiceStateToString(WinSys::ServiceState state) { |
| 146 | switch (state) { |
nothing calls this directly
no test coverage detected