| 1131 | } |
| 1132 | |
| 1133 | void testServices() |
| 1134 | { |
| 1135 | FILE* f = fopen(fileTest, "w"); |
| 1136 | if (!f) |
| 1137 | Firebird::system_call_failed::raise(fileTest); |
| 1138 | |
| 1139 | fputs(fileTest, f); |
| 1140 | fclose(f); |
| 1141 | |
| 1142 | ISC_STATUS_ARRAY status; |
| 1143 | |
| 1144 | ClumpletWriter spbAtt(ClumpletWriter::spbList, 1024 * 1024); |
| 1145 | //spbAtt.insertString(isc_spb_sql_role_name, "@@@"); |
| 1146 | testSvc(NULL, spbAtt, attSwitch); |
| 1147 | |
| 1148 | isc_svc_handle svc_handle = 0; |
| 1149 | if (isc_service_attach(status, 0, "@@@", &svc_handle, |
| 1150 | static_cast<USHORT>(spbAtt.getBufferLength()), |
| 1151 | reinterpret_cast<const char*>(spbAtt.getBuffer()))) |
| 1152 | { |
| 1153 | Firebird::status_exception::raise(status); |
| 1154 | } |
| 1155 | |
| 1156 | ClumpletWriter spbStart(ClumpletWriter::SpbStart, 1024 * 1024); |
| 1157 | testSvc(&svc_handle, spbStart, actionSwitch); |
| 1158 | |
| 1159 | isc_service_detach(status, &svc_handle); |
| 1160 | } |
| 1161 | #endif //DEV_BUILD |
| 1162 | |
| 1163 | // short usage from firebird.msg |