270 // Print module name |
270 // Print module name |
271 moduleName = aModule.FileName(); |
271 moduleName = aModule.FileName(); |
272 __TRACEI (KInit, ( _L("Loaded test module[%S]"), &moduleName ) ); |
272 __TRACEI (KInit, ( _L("Loaded test module[%S]"), &moduleName ) ); |
273 } |
273 } |
274 |
274 |
275 // Verify the UID |
275 |
276 TUid KUidTestModule = TUid::Uid ( 0x101FB3E7 ); |
|
277 TUidType requiredUID( KDynamicLibraryUid, KSharedLibraryUid, KUidTestModule ); |
|
278 |
|
279 TUidType moduleUID = aModule.Type(); |
|
280 if ( moduleUID != requiredUID ) |
|
281 { |
|
282 // New instance can't be created |
|
283 RDebug::Print( ( _L("STIF TF: Test module has invalid UID. Aborting loading!") ) ); |
|
284 __TRACEI (KError, ( CStifLogger::EError, _L("Test module has invalid UID. Aborting loading!"))); |
|
285 tmpBuffer.Format(_L("Module [%S] has invalid UID"), &moduleName); |
|
286 ErrorPrint( 1, tmpBuffer ); |
|
287 ModuleContainer().OperationErrorResult() = KErrNotSupported; |
|
288 return KErrNotSupported; |
|
289 } |
|
290 |
|
291 // Get pointer to first exported function |
276 // Get pointer to first exported function |
292 ModuleContainer().OperationText() = _L("1st EXPORTED function"); |
277 ModuleContainer().OperationText() = _L("1st EXPORTED function"); |
293 CTestInterfaceFactory libEntry; |
278 CTestInterfaceFactory libEntry; |
294 libEntry = (CTestInterfaceFactory) aModule.Lookup(1); |
279 libEntry = (CTestInterfaceFactory) aModule.Lookup(1); |
295 if ( libEntry == NULL ) |
280 if ( libEntry == NULL ) |