public static int dload( byte[] filename, byte[] init_sym, byte[] mod_sym )
{
bgl_dload_error= NO_ERROR_YET;
try
{
// !!!!! faut-il réellement virer le suffixe ?????
String type_name = suffix( filename );
Type type = Type.GetType( type_name, true, false );
if (!type.IsClass)
{
/***** type is not a class *****/
bgl_dload_error= ("Type [" + type_name + "] is not a class.");
return 1;
}
if( init_sym.Length > 0 ) {
MethodInfo init = type.GetMethod( foreign.newstring( init_sym ) );
init.Invoke( null, null );
}
if( mod_sym.Length > 0 ) {
MethodInfo init = type.GetMethod( foreign.newstring( mod_sym ) );
init.Invoke( null, null );
}
return 0;
}
catch (Exception e)
{
bgl_dload_error= e.Message;
return 1;
}
}