///////////////////////////////////////////////////////////////////////////// // ObjectARX EntryPoint extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt) { AcRxDynamicLinker *pLinker = acrxDynamicLinker; switch (msg) { case AcRx::kInitAppMsg: // Comment out the following line if your // application should be locked into memory pLinker->unlockApplication(pkt); pLinker->registerAppMDIAware(pkt); // check if the arx app is loaded or not. // if not, load it as UI so that we won't have // proxy if this dll is unloaded by OS if (!isModuleLoaded("AsdkSmileyDb.dbx")) { if (!pLinker->loadModule("AsdkSmileyDb.dbx", false, true)) return AcRx::kRetError; } // bump the reference count pLinker->loadModule("AsdkSmileyDb.dbx", false, false); InitApplication(); break; case AcRx::kUnloadAppMsg: pLinker->unloadModule("AsdkSmileyDb.dbx"); UnloadApplication(); break; } return AcRx::kRetOK; }
///////////////////////////////////////////////////////////////////////////// // ObjectARX EntryPoint extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt) { switch (msg) { case AcRx::kInitAppMsg: // Comment out the following line if your // application should be locked into memory acrxDynamicLinker->unlockApplication(pkt); acrxDynamicLinker->registerAppMDIAware(pkt); InitApplication(); break; case AcRx::kUnloadAppMsg: UnloadApplication(); break; // add or remove items to/from document status // bar here because all databases are active at this point. case AcRx::kLoadDwgMsg: //CreateDocumentWorkspace(curDoc()); break; case AcRx::kUnloadDwgMsg: //DestroyDocumentWorkspace(curDoc()); break; } return AcRx::kRetOK; }
virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) { AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ; // TODO: Add your code here UnloadApplication() ; if(bWatchSelectDone == TRUE) { acedRemoveWatchWinMsg(WatchSelect); acutPrintf(_T("\nHook has been removed!\n")); } return (retCode) ; }
///////////////////////////////////////////////////////////////////////////// // ObjectARX EntryPoint extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt) { switch (msg) { case AcRx::kInitAppMsg: // Comment out the following line if your // application should be locked into memory acrxDynamicLinker->unlockApplication(pkt); acrxDynamicLinker->registerAppMDIAware(pkt); InitApplication(); break; case AcRx::kUnloadAppMsg: UnloadApplication(); break; } return AcRx::kRetOK; }
///////////////////////////////////////////////////////////////////////////// // ObjectARX EntryPoint extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt) { switch (msg) { case AcRx::kInitAppMsg: //----- We need the HLR engine loaded if ( !acrxLoadModule ("AsdkHlrApi.dbx", 0) ) return (AcRx::kRetError) ; // Comment out the following line if your // application should be locked into memory acrxDynamicLinker->unlockApplication(pkt); acrxDynamicLinker->registerAppMDIAware(pkt); InitApplication(); break; case AcRx::kUnloadAppMsg: UnloadApplication(); break; } return AcRx::kRetOK; }
///////////////////////////////////////////////////////////////////////////// // ObjectARX EntryPoint extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt) { switch (msg) { case AcRx::kLoadDwgMsg: OnkLoadDwgMsg(); break; case AcRx::kInitAppMsg: // Comment out the following line if your // application should be locked into memory acrxDynamicLinker->unlockApplication(pkt); acrxDynamicLinker->registerAppMDIAware(pkt); AcRxObject *pSvc ; if ( !(pSvc =acrxServiceDictionary->at (ASDKEMPLOYEEDETAILS_DBXSERVICE)) ) { // Try to load the module, if it is not yet present if ( !acrxDynamicLinker->loadModule ("AsdkEmployeeDetails.dbx", 0) ) { acutPrintf ("Unable to load AsdkEmployeeDetails.dbx. Unloading this application...\n") ; return (AcRx::kRetError) ; } } if ( !(pSvc =acrxServiceDictionary->at (ASDKEMPLOYEE_DBXSERVICE)) ) { // Try to load the module, if it is not yet present if ( !acrxDynamicLinker->loadModule ("AsdkEmployee.dbx", 0) ) { acutPrintf ("Unable to load AsdkEmployee.dbx. Unloading this application...\n") ; return (AcRx::kRetError) ; } } InitApplication(); break; case AcRx::kUnloadAppMsg: UnloadApplication(); break; } return AcRx::kRetOK; }