UE 5.7 problem with CoCreateInstance

Until UE 5.7 i used VPinMAME com control in Unreal Engine using te folowing code.

hr = CLSIDFromProgID(OLESTR(“VPinMAME.Controller”), &ClsID); // Get class ID from program ID
if (FAILED(hr)) {
UE_LOG(LogTemp, Warning, TEXT(“Class couldn’t be found. Maybe it isn’t registered”));
return;
}
else {
UE_LOG(LogTemp, Log, TEXT(“Class found.”));
}

hr = CoCreateInstance(ClsID, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&GPController));

As of UE 5.7 this crashes on load at CoCreateInstance before even opening the editor with:

Unhandled exception at 0x00007FFA7AF47216 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x00007FFAEAFD68DA.

This code worked for years?

Could somebody give me a tip?