Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For some strange reason my QUERY_SERVICE_CONFIG struct wasn't getting the full value of lpBinaryPathName, only the first character. Changing it to the class below seemed to fix the problem. There is complete code at <a href="http://www.pinvoke.net/default.aspx/advapi32/QueryServiceConfig.html" rel="nofollow noreferrer">http://www.pinvoke.net/default.aspx/advapi32/QueryServiceConfig.html</a></p> <p><strong>Edit:</strong> Also note this sets the "Path to executable" of the windows service but does not set the "Start parameters" of the windows service.</p> <pre><code>[StructLayout(LayoutKind.Sequential)] public class QUERY_SERVICE_CONFIG { [MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)] public UInt32 dwServiceType; [MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)] public UInt32 dwStartType; [MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)] public UInt32 dwErrorControl; [MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] public String lpBinaryPathName; [MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] public String lpLoadOrderGroup; [MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)] public UInt32 dwTagID; [MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] public String lpDependencies; [MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] public String lpServiceStartName; [MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] public String lpDisplayName; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload