Listing 5: Registrierte Programme ermitteln -- printapps.c struct Library *ApplicationBase; struct ApplicationIFace *IApplication; int main() { if((ApplicationBase = IExec->OpenLibrary(ãapplication.library", 50))) { if((IApplication = (struct ApplicationIFace *)IExec->GetInterface(ApplicationBase, ãapplication", 1, NULL))) { struct MinList *appList; struct ApplicationNode *appNode; if((appList = GetApplicationList())) { IDOS->Printf(ãAktuell registrierte Anwendungen:\n"); for(appNode = (struct ApplicationNode *) appList->mlh_Head; appNode->node.mln_Succ; appNode = (struct ApplicationNode *) appNode->node.mln_Succ) { IDOS->Printf(ã id: %ld %s\n", appNode->appID, appNode->name); } FreeApplicationList(appList); } else IDOS->Printf(ãApplikationsliste konnte nicht ermittelt werden\n"); IExec->DropInterface((struct Interface *)IApplication); } else IDOS->Printf(ãkein application Interface\n"); IExec->CloseLibrary(ApplicationBase); } else IDOS->Printf(ãapplication.library V50 fehlt\n"); return( 0 ); }