search for: num_services

Displaying 1 result from an estimated 1 matches for "num_services".

Did you mean: dm_services
2006 Jun 21
4
Yet another data structure + pack/unpack question (win32-service)
...9;) resume_handle = [0].pack(''L'') bool = EnumServicesStatusEx( handle_scm, SC_ENUM_PROCESS_INFO, SERVICE_WIN32 | SERVICE_DRIVER, SERVICE_STATE_ALL, service_buf, service_buf.size, bytes_needed, services_returned, resume_handle, group ) if bool num_services = services_returned.unpack(''L'').first index = 0 1.upto(num_services){ |num| info = service_buf[index, enum_service.size-1] service_name = info[0,4].pack(''p'') # boom! index += enum_service.size } end Regards, Dan