Index: include/libroar/roardl.h
===================================================================
--- include/libroar/roardl.h	(revision 5818)
+++ include/libroar/roardl.h	(revision 5819)
@@ -51,4 +51,7 @@
 #define ROAR_DL_HANDLE_APPLICATION      ((struct roar_dl_lhandle*)(void*)3)
 #define ROAR_DL_HANDLE_LIB              ((struct roar_dl_lhandle*)(void*)4)
+
+#define LIBROAR_DL_APPNAME              "libroar " ROAR_VSTR_ROARAUDIO
+#define LIBROAR_DL_ABIVERSION           "1.0beta9"
 
 #define ROAR_DL_FN_DSTR                 0 /* VIO and DSTR drivers */
@@ -432,7 +435,7 @@
 }
 
-int libroar_dl_service_get_api_real(struct roar_dl_librarypara * para, const char * appname, const char * appabi, const char * servicename, const char * serviceabi, int universal, struct roar_dl_service_api * api);
-#define libroar_dl_service_get_api(para,appname,appabi,servicename,serviceabi,universal,api) libroar_dl_service_get_api_real((para),(appname),(appabi),(servicename),(serviceabi),(universal),(struct roar_dl_service_api *)(api))
-#define roar_dl_service_get_api(para,servicename,serviceabi,api) libroar_dl_service_get_api((para), (para)->appname, (para)->abiversion, (servicename), (serviceabi), 1, (api))
+int libroar_dl_service_get_api_real(struct roar_dl_librarypara * para, const char * appname, const char * appabi, const char * servicename, const char * serviceabi, int universal, struct roar_dl_service_api * api, int retry);
+#define libroar_dl_service_get_api(para,appname,appabi,servicename,serviceabi,universal,api) libroar_dl_service_get_api_real((para),(appname),(appabi),(servicename),(serviceabi),(universal),(struct roar_dl_service_api *)(api), 1)
+#define roar_dl_service_get_api(para,servicename,serviceabi,api) libroar_dl_service_get_api((para), (para) == NULL ? NULL : ((struct roar_dl_librarypara *)(para))->appname, (para) == NULL ? NULL : ((struct roar_dl_librarypara *)(para))->abiversion, (servicename), (serviceabi), 1, (api))
 
 int libroar_dl_service_free_api_real(struct roar_dl_service_api * api);
Index: libroar/roardl.c
===================================================================
--- libroar/roardl.c	(revision 5818)
+++ libroar/roardl.c	(revision 5819)
@@ -1028,5 +1028,45 @@
 }
 
-int libroar_dl_service_get_api_real(struct roar_dl_librarypara * para, const char * appname, const char * appabi, const char * servicename, const char * serviceabi, int universal, struct roar_dl_service_api * api) {
+static inline int __load_plugin_any_get_api(struct roar_dl_librarypara * para, const char * appname, const char * appabi, const char * servicename, const char * serviceabi, int universal, struct roar_dl_service_api * api) {
+ struct roar_dl_lhandle * lhandle = NULL;
+ struct roar_dl_librarypara * mypara = NULL;
+ char name[80];
+ int err;
+ int ret;
+
+ mypara = roar_dl_para_new(NULL, NULL, LIBROAR_DL_APPNAME, LIBROAR_DL_ABIVERSION);
+ if ( mypara == NULL )
+  return -1;
+
+ if ( serviceabi != NULL ) {
+  snprintf(name, sizeof(name), "service-%s-%s", servicename, serviceabi);
+  lhandle = roar_dl_open(name, ROAR_DL_FLAG_PLUGIN, 1, mypara);
+ }
+
+ if ( lhandle == NULL ) {
+  snprintf(name, sizeof(name), "service-%s", servicename);
+  lhandle = roar_dl_open(name, ROAR_DL_FLAG_PLUGIN, 1, mypara);
+ }
+
+ err = roar_error;
+ roar_dl_para_unref(mypara);
+ roar_error = err;
+
+ if ( lhandle == NULL )
+  return -1;
+
+ roar_dl_appsched_trigger(lhandle, ROAR_DL_APPSCHED_INIT);
+
+ ret = libroar_dl_service_get_api_real(para, appname, appabi, servicename, serviceabi, universal, api, 0);
+
+ err = roar_error;
+ roar_dl_appsched_trigger(lhandle, ROAR_DL_APPSCHED_FREE);
+ roar_dl_unref(lhandle);
+ roar_error = err;
+
+ return ret;
+}
+
+int libroar_dl_service_get_api_real(struct roar_dl_librarypara * para, const char * appname, const char * appabi, const char * servicename, const char * serviceabi, int universal, struct roar_dl_service_api * api, int retry) {
  const struct roar_dl_service * s;
  struct __fnregs * c = NULL;
@@ -1034,7 +1074,16 @@
  int err;
 
- if ( para == NULL || servicename == NULL || serviceabi == NULL || api == NULL ) {
+ if ( servicename == NULL || serviceabi == NULL || api == NULL ) {
   roar_err_set(ROAR_ERROR_FAULT);
   return -1;
+ }
+
+ if ( para != NULL ) {
+  if ( roar_dl_para_ref(para) == -1 )
+   return -1;
+ } else {
+  para = roar_dl_para_new(NULL, NULL, NULL, NULL);
+  if ( para == NULL )
+   return -1;
  }
 
@@ -1082,4 +1131,5 @@
    err = roar_error;
    roar_dl_unref(c->lhandle);
+   roar_dl_para_unref(para);
    api->lhandle = NULL;
    roar_error = err;
@@ -1087,7 +1137,16 @@
   }
 
+  roar_dl_para_unref(para);
   return 0;
  }
 
+ if ( retry ) {
+  if ( __load_plugin_any_get_api(para, appname, appabi, servicename, serviceabi, universal, api) == 0 ) {
+   roar_dl_para_unref(para);
+   return 0;
+  }
+ }
+
+ roar_dl_para_unref(para);
  roar_err_set(ROAR_ERROR_NOENT);
  return -1;
