Another idea:
This might work. Partial code for simplicity. In the code below, you first get a handle to the already registered Style. I guess then, you can dispose and re-assign the pointer with the one you loaded from the file. I believe the exception only show when you try to apply the style, not when you load it. Forgive me if I am wrong.
var
StyleName: String;
Style : TStyleManager.TStyleServicesHandle;
FileName : String;
begin
StyleName := 'Obsidian'; // or another style name
FileName := 'obsidian.vsf'; // or any other valid style file name
Style := TStyleManager.Style[ StyleName];
if Assigned( Style) then // style already registered
begin
TStyleManager.TrySetStyle( StyleName);
// insert other processing here
end
else // style not registered
begin
if TStyleManager.IsValidStyle( FileName) then
begin
Style := TStyleManager.LoadFromFile( FileName);
if Assigned( Style) then
begin
// insert other processing here, such as
// TStyleManager.SetStyle( Style);
end;
end;
end;
end;