Identifying VST3 plugins across platforms

I work on the JUCE plugin framework. Recently our users have requested the ability to identify VST3 plugins which are the ‘same’ on multiple platforms. This would allow project files saved on one platform to open successfully on a different platform.

Reading the VST3 docs, I couldn’t find a recommended technique for identifying a plugin consistently on multiple platforms. The PClassInfo::cid seems like the most likely candidate, but if this is generated using the DECLARE_CLASS_IID macro then the resulting cids will have a different byte order depending on whether COM_COMPATIBLE is enabled. By default, this is enabled on Windows and disabled on other platforms, meaning that IIDs in plugins built for Windows will differ from IIDs on other platforms, even when building from identical sources.

What is the recommended way to identify plugin instances which are the ‘same’ across multiple platforms?

A VST3 Plug-in is uniquely identifiable via the unique class ID of its IAudioProcessor implementation. And it’s correct that this is the cid member of the PClassInfo struct.
To set this variable correctly so that it is the same on all platforms you have to use the FUID class and not the DECLARE_CLASS_IID macro as shown with every example in the SDK.

As an example see the again sample in the SDK and especially these files:

  • againcids.h
  • againentry.cpp

Thanks, that’s really helpful.