If you've worked with property keys, say with Windows Portable Devices, you've probably run across this macro. The Sensor platform would require you to define your own property keys if, say, you want to define a custom sensor data type. This macro isn't currently well documented (we're working to fix that), so it can be a bit confusing to use.
Here's the current macro definition from Propkeydef.h:
#ifdef INITGUID#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }#else#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name#endif // INITGUID
When using this macro, you basically have two options:
Using the macro without including Initguid.h and without referencing a library file will raise the error LNK2001, so if you see that error for your property key declarations, now you know what to do about it.
By the way, the property keys declared in Sensors.h are defined in Sensorsapi.lib. So, you can see that the sensor team chose option 2 when coding the platform.