> Hi Joe, > > Another minor problem. load-everything loads all vocabs on all > platforms, so game-input.backend.dinput ends up being loaded. This > fails because it attempts to make COM calls at parse time. Is it > possible to delay the COM initialization until first use? Doing this > at parse time might be problematic for other reasons, for example if > you save an image and restore it, your COM stuff might not work > anymore.
I found the problem, Slava: COM-INTERFACE: uses string>guid to parse the GUID literal, which tries to call out to the Windows API's CLSIDFromString function. I rewrote string>guid and guid>string in straight Factor, and the windows libraries load fine on OS X now. The "windows.com" tests even pass! That's awesome--the same framework could be used to support XPCOM or CFPlugin on other platforms. As to your concerns about the COM stuff not surviving an image load, invoking a COM method just involves peeking in the alien's vtbl and calling the right function pointer. The IInterface::Method word definitions should survive just fine. The com library's internal state is all Factor objects and should be OK too. On the other hand, windows.com.wrapper wouldn't fare so well right now--the alien- callbacks would need to all be remade and reassembled into their respective vtbls. I'll put some time into making it more resilient. -Joe ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
