Close smart client

What is the proper way to close the smart client from plugin code?

I have tried using

{
    EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.
        Message(MessageId.SmartClient.ApplicationControlCommand, VideoOS.Platform.Messaging.ApplicationControlCommandData.Close),null,null);
}

from a 6yr old post and this doesn’t work anymore.

I checked this by using the MessageTester sample plugin, for me it works fine.

https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/messagetester/readme.html&tree=tree_1.html

https://github.com/milestonesys

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_messaging_1_1_application_control_command_data.html&tree=tree_search.html?search=applicationcontrolcommanddata

Perhaps you can test with the sample, and if it works you can debug if you are using the message differently.

https://developer.milestonesys.com/s/article/debugging-techniques-for-Smart-Client-plugins

I tested with the newest Smart Client (2023R3).