Notes: { com2rebol.c does this: BOOL WINAPI __declspec(dllexport) LibMain(...) while DevCPP does this: BOOL APIENTRY DllMain (...) WINAPI and APIENTRY are both defined by windef.h to be __stdcall, which is the Windows standard calling convention. Delays may be required after some method calls because some COM methods are asynchronous. It's necessary to look up each method (or experiment) to see if a given method is asynchronous, and to find out the correct way to wait until it's finished. Exception handling is (or should be!) implemented for all functions where an exception can occur. - comlib/initialize can be done within %comlib.r automatically, so the try block and bind block can be combined to a single try bind block. This is done by passing the user block in do/args, eg: do/args %COMLib.r [ ; Use the COMLib API functions here ] - but there is a problem! If COMLib.r is not in the same directory as the calling script, then the passed code will be executing with the wrong current directory... The calling code can make sure that it is in the right directory, by composing in: change-dir (clean-path what-dir) before passing to do/args. Possible website is http://xnet.neusteps.com/COMLib - Yeksoon owns neusteps.com - could get domain, eg.: rebol.neusteps.com - FTP access - or rebol.org (owned by Carl Sassenrath) - Sunanda said probably no FTP access [probably because Carl Sassenrath is so hard to contact] - but packages, which are encouraged, have a synchronizer script (repack.r) - you can install a package to any directory you wish - Brett Handley also offered webspace Idea for Exception handling: (I abandoned this idea, because rebol callbacks are async, thus unreliable): - use pfnExceptionCallback instead of Ben's hacked dhShowException (in modified disphelper.c) So com2rebol.c includes original disphelper.h and will define a function to be set as the callback. Note currently I've got the rebol callback passed down into pfnExceptionCallback in dispHelper.c. The com2rebol wrapper also handles exceptions by calling ShowMessage via HR_TRY. I think it's better for com2rebol to set the callback and catch the errors, then pass the error on, with some formatting, back to rebol. - It used to be that after seven times DOing %comlib.r (and freeing comlib afterwards) we would get a "Root block overflow" crash. - isolate (Probably the callback, which is probably fixed in View 1.3.2) }