MCPcopy Create free account
hub / github.com/cinience/RedisStudio / LoadPlugin

Method LoadPlugin

DuiLib/Core/UIManager.cpp:299–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299bool CPaintManagerUI::LoadPlugin(LPCTSTR pstrModuleName)
300{
301 ASSERT( !::IsBadStringPtr(pstrModuleName,-1) || pstrModuleName == NULL );
302 if( pstrModuleName == NULL ) return false;
303 HMODULE hModule = ::LoadLibrary(pstrModuleName);
304 if( hModule != NULL ) {
305 LPCREATECONTROL lpCreateControl = (LPCREATECONTROL)::GetProcAddress(hModule, "CreateControl");
306 if( lpCreateControl != NULL ) {
307 if( m_aPlugins.Find(lpCreateControl) >= 0 ) return true;
308 m_aPlugins.Add(lpCreateControl);
309 return true;
310 }
311 }
312 return false;
313}
314
315CStdPtrArray* CPaintManagerUI::GetPlugins()
316{

Callers

nothing calls this directly

Calls 2

FindMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected