You could try
oleObject.&Operator := 'WS';
I don't have Windows, so I have not tried this myself.
I tried this suggestion and it compiles without issues (in both
delphi and
objfpc modes)
The original compiles without issues if
{$mode delphi} is enabled.