Load Plugin at start time c++

I have at this code to the Pluin.cpp file.

CRhinoPlugIn::plugin_load_time CMyPlugInPlugIn::PlugInLoadTime()
	return CRhinoPlugIn::load_plugin_at_startup;

But after opening Rhino, the enabled option in the document properties of my plugin is not checked,How do I solve this problem ?

Hi @suc_kiet,

The enabling or disabling of a plug-ins is a user-controlled operation. But if you plug-in fails to load, for some reason, Rhino can mark the plug-in as “don’t load”, I believe.

– Dale