djberg96/win32-service — pull request #18 by ferventcoder (2014-07-01 23:21:52+00:00)
Title: Protect against misconfigured services

Previously, the Win32::Service.services method would raise an exception if any
service was misconfigured. On Windows in VMware fusion, the tsusbhub
(driver) service is installed by default, so this bug is always triggered
though the same issue could occur in other Windows OS's.

The issue occurs when a service, e.g. tsusbhub, has a Description entry in
the registry of the form:

@[path]dllname,-strID

where strID is the localized description identifier, but the resource with
that identifier is absent from the dll.

This commit updates the `get_config2_info` to allow
ERROR_RESOURCE_TYPE_NOT_FOUND (1813) to join ERROR_FILE_NOT_FOUND
as one of the error type that returns instead of raising an error.