From 78bad1436ea141bd0464682ff8a729a80ee6cf79 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 2 Nov 2020 13:52:47 +0100 Subject: [PATCH] api: statically compile devpkey constants I don't like this solution, but I don't see much other choice. It's not in uuid.lib or anywhere like that. Signed-off-by: Jason A. Donenfeld --- api/adapter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/api/adapter.c b/api/adapter.c index d996d99..ca0b823 100644 --- a/api/adapter.c +++ b/api/adapter.c @@ -25,6 +25,8 @@ #include #include #include +#include /* Keep these two at bottom in this order, so that we only generate extra GUIDs for devpkey. The other keys we'll get from uuid.lib like usual. */ +#include #pragma warning(disable : 4221) /* nonstandard: address of automatic in initializer */ @@ -1291,10 +1293,6 @@ CreateAdapter( goto cleanupTcpipInterfaceRegKey; } - /* TODO: This GUIDs is in devpkey.h, but we can't link to it? Which dll? */ - static const DEVPROPKEY DEVPKEY_Device_ProblemStatus = { - { 0x4340a6c5, 0x93fa, 0x4706, { 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7 } }, 12 - }; DEVPROPTYPE PropertyType; for (int Tries = 0; Tries < 1000; ++Tries) {