__declspec(force_export)

Specifies that a function or variable must not be dead-stripped.

Syntax
__declspec(force_export) 
  function-declaration ;
  
__declspec(force_export) 
  variable-declaration ;
  
Remarks

When the linker determines that a function or static variable is not referred to by the rest of the program, the linker removes the object from the final executable image. The linker does not remove a static variable or function declared with this specification even if this object is not referred to.