Is there a way to use SMO in C ++ other than managed code?
As you pointed out. This question has already been without a satisfactory answer.
SMO strictly manages the code. The previous version, DMO, can be used in unmanaged code. If you need to use SMO you need to use C ++ / CLI or create a wrapper for COM.
From MSDN Documentation for SMO :
The SMO replaces and replaces SQL-DMO. SMO supports SQL Server 2000, SQL Server 2005, and SQL Server 2008. It supports more SQL Server Management Tasks and many new features in SQL Server. SMO is designed to be more efficient and provide more control.
The DMO library is a COM object model, while SMO is implemented as .NET. Frame assembly. COM components are libraries that provide reusable functionality for applications and in unmanaged application programming. .NET Framework assemblies provide reusability for .NET. Framework for writing managed application code.
During the transition to the .NET Technology Framework, you can have applications written partly in managed code and partly in unmanaged code. The NET Framework allows you to interface with COM components that require a primary interop assembly. The runtime is required for SQL-DMO so that it can be called from a .NET Framework application.
a source to share