51
SDK / Re: question 1
« on: June 25, 2024, 15:41:16 »
1)
Depends on what type of extension..
From the IMultiAppInterface interface.
// Create new log
virtual ILogger* CreateLogger() = 0;
// Log to existing log
virtual void LogFmt( UINT nLogID , LogLevel nLevel , const char* strText , ... ) = 0;
virtual void LogFmt( UINT nLogID , LogLevel nLevel , const WCHAR* strText , ... ) = 0;
virtual void Log( UINT nLogID , LogLevel nLevel , const char* strText ) = 0;
virtual void Log( UINT nLogID , LogLevel nLevel , const WCHAR* strText ) = 0;
2) Id is just start from 0 to n , It is so you can have multiple extension in the same dll.
If you only have 1 extension. let it be 0.
Depends on what type of extension..
From the IMultiAppInterface interface.
// Create new log
virtual ILogger* CreateLogger() = 0;
// Log to existing log
virtual void LogFmt( UINT nLogID , LogLevel nLevel , const char* strText , ... ) = 0;
virtual void LogFmt( UINT nLogID , LogLevel nLevel , const WCHAR* strText , ... ) = 0;
virtual void Log( UINT nLogID , LogLevel nLevel , const char* strText ) = 0;
virtual void Log( UINT nLogID , LogLevel nLevel , const WCHAR* strText ) = 0;
Code: [Select]
long MCAppExtensionSample::PreStartInit( IMultiAppInterface* pAppInterface )
{
pAppInterface->LogFmt(0, LogLevel::_DEBUG_, L"Loading... %s", L"Parameter");
}
2) Id is just start from 0 to n , It is so you can have multiple extension in the same dll.
If you only have 1 extension. let it be 0.