From edi at agharta.de Mon Jun 12 09:17:21 2006 From: edi at agharta.de (Edi Weitz) Date: Mon, 12 Jun 2006 11:17:21 +0200 Subject: [rdnzl-devel] New version 0.10.0 (ECL support) Message-ID: ChangeLog: Version 0.10.0 2006-06-12 ECL port (provided by Michael Goffioul) Download: http://weitz.de/files/RDNZL.tar.gz From edi at agharta.de Mon Jun 12 09:21:53 2006 From: edi at agharta.de (Edi Weitz) Date: Mon, 12 Jun 2006 11:21:53 +0200 Subject: [rdnzl-devel] Re: Problem using RDNZL with COM Interop In-Reply-To: <38C0C9E3083ADB42BFFFC6C2A8B012CE036B3E99@WINEX2.imec.be> (Goffioul Michael's message of "Thu, 8 Jun 2006 10:16:49 +0200") References: <38C0C9E3083ADB42BFFFC6C2A8B012CE036B3E99@WINEX2.imec.be> Message-ID: Hi Michael! On Thu, 8 Jun 2006 10:16:49 +0200, "Goffioul Michael" wrote: > I'm trying to use RDNZL im my project (for the GUI) and I faced a > problem related to COM interop (I think). The symptom is the > following: in my assembly for the GUI, I use FolderBrowserDialog to > request a directory from the user; however when the dialog appear, > the directory tree is not present and the dialog only contains 3 > buttons; looking on the web and testing a little, it appears that > it's due to the fact that the main program does not use > single-thread apartment state (STAThreadAttribute), which is > required with some COM components. > > While, it's well explained how to set this attribute in a plain > C#/C++ application, this is less evident in the context of RDNZL as > I don't know where is exactly the "main entry point" for the managed > part of the code. In recent version of VC compiler (VC++-2005), > there's a /CLRTHREADATTRIBUTE flag to specify it, however I couldn't > recompile the RDNZL library with such a compiler, because apparently > lot of things have been deprecated since VC++-2003 regarding managed > code in DLL. > > Would you have any solution for this problem? Thanks. I don't have an immediate fix for this, so I'm forwarding your question to the RDNZL mailing list - maybe someone there knows what to do. Cheers, Edi. From edi at agharta.de Mon Jun 12 09:52:23 2006 From: edi at agharta.de (Edi Weitz) Date: Mon, 12 Jun 2006 11:52:23 +0200 Subject: [rdnzl-devel] Re: RDNZL-cpp for Visual C++ 2005 In-Reply-To: <38C0C9E3083ADB42BFFFC6C2A8B012CE037360FE@WINEX2.imec.be> (Goffioul Michael's message of "Fri, 9 Jun 2006 16:53:31 +0200") References: <38C0C9E3083ADB42BFFFC6C2A8B012CE037360FE@WINEX2.imec.be> Message-ID: The previously reported problem with COM Interop http://common-lisp.net/pipermail/rdnzl-devel/2006-June/000094.html was solved by Michael by recompiling the C++ code (after porting it to a newer version of Visual Studio). If you're interested in using the C++ code with VS 2005, Michael's port is available here: http://weitz.de/files/RDNZL-cpp-0.5-vc8.tar.bz2 Below is his description of what had to be changed. Cheers, Edi. On Fri, 9 Jun 2006 16:53:31 +0200, "Goffioul Michael" wrote: > I don't know if you're interested, but I ported the RDNZL C++ library to > visual c++ 2005 (express edition) (aka msvc8). I did it because I needed > to change the default threading attribute of the DLL to single mode, > which > required re-compilation, and I only had that version of the compiler. > As far as I could test it, it works (I tested it with a project of mine > and > ECL). As of this compiler version, a lot of CLR related stuffs have > changed. > Most of the modifications I had to do were: > - replace *-pointer to managed object to ^-pointer > - replace C-style array of managed objects to cli::array objects > - replace the use of '0' as null pointer to managed object with > 'nullptr' > - replace __gc class attribute with ref > - remove __nogc attribute (according to the doc, it's not needed > anymore) > - replace __pin attribute with pin_ptr objects > - use safe_cast for managed object casting > - create String^ object explicitely from __wchar_t* > - replace "new" on managed type with "gcnew" > - slightly change how GCHandle references are used, because the compiler > counldn't find the op_explicit() member in GCHandle class > - remove the tricks that were required to avoid dead-lock when loading a > mixed assembly > - problably other small things I don't remember