mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-20 19:49:03 +02:00
headers: fail Build on missing native exports and assert MI/COM layouts (#2739)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -39,6 +39,10 @@ type Query struct {
|
||||
// NewQuery opens a query for [NewQueryCollector]. The caller must Close it
|
||||
// after the collectors in it.
|
||||
func NewQuery() (*Query, error) {
|
||||
if err := Load(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var handle pdhQueryHandle
|
||||
|
||||
if ret := OpenQuery(0, 0, &handle); ret != ErrorSuccess {
|
||||
|
||||
Reference in New Issue
Block a user