English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] ocamlopt and Windows DLL
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-05-28 (14:55)
From: Dmitry Bely <dbely@m...>
Subject: Re: [Caml-list] ocamlopt and Windows DLL
1. Just another problem with ocamlopt and DLL: if unhandled exception occuirs
in my COM method, ocaml code terminanes inside callbackN_exn() with
"Fatal error: uncaught exception" instead of returning the appropriate
result indicating the exception (as byte compiled code does):

[--- cut ---]
HRESULT STDMETHODCALLTYPE camlidl_config_IConfig_load_callback(
	struct IConfig * this,
	/* in */ char *file)
  value _varg[2] = { 0, 0, };
  value _vres;
  static value _vlabel = 0;
  HRESULT _res;
  Begin_roots_block(_varg, 2)
    _varg[0] = ((struct camlidl_intf *) this)->caml_object;
    _varg[1] = copy_string(file);
    if (_vlabel == 0) _vlabel = camlidl_lookup_method("load");
  _vres = callbackN_exn(Lookup(_varg[0], _vlabel), 2, _varg);
          ^^^^ in case of exception dies inside
  if (Is_exception_result(_vres))
    return camlidl_result_exception("config.IConfig::load", Extract_exception(_vres));
  _res = S_OK;
  return _res;
[--- cut ---]

Is this the expected behavior or just a bug?

2. (camlidl related question) I cannot create method returning the string
value. I've tried 

[--- cut ---]
interface ITest: IUnknown
    HRESULT getString( [out] int* len, [out,length_is(*len)] char* val  );
[--- cut ---]

but camlidl says

[--- cut ---]
test.idl, function ITest::getString: Out parameter `val' must be a pointer
[--- cut ---]

Looks like just another camlidl bug. I even tried 
HRESULT getString( [out,length_is(32)] char* val  );
-- exactly the same result.

BTW, whom should I inform about camlidl problems/bugs? Is there any
bug-tracking database or so?

Hope to hear from you soon,

To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr