attachServiceManager method
Attach to a service manager. Provide an earlier obtained IStatus interface as a status indicator, service name, and optional service parameter buffer. Use an instance of IXpbBuilder to allocate and populate the buffer with all required parameters (like user name and password, page size, etc.).
Implementation
IService attachServiceManager(IStatus status, String service,
[int spbLength = 0, Pointer<Uint8>? spb]) {
final serviceUtf = service.toNativeUtf8(allocator: mem);
try {
spb ??= nullptr;
final res =
_attachServiceManager(self, status.self, serviceUtf, spbLength, spb);
status.checkStatus();
return IService(res);
} finally {
mem.free(serviceUtf);
}
}