How to add a custom C++ method to Engine scripting API?
-
I'm building a compiled VST3 plugin with HISE and need to call a Windows API function (CreateMutexA) from HiseScript to detect whether a specific host DAW is running. I'm building HISE from source in Visual Studio 2022.
I tried adding the method to ScriptingApi.cpp and ScriptingApi.h following the existing getName() pattern, but including windows.h at the top of ScriptingApi.cpp causes a Rectangle macro conflict that breaks compilation.
What is the correct way to either (1) include windows.h safely in ScriptingApi.cpp, or (2) add a custom Engine method that calls a Windows API function?