Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Dave Korn" To: Subject: RE: MSVC-dll under cygwin Date: Thu, 2 Dec 2004 17:34:57 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" In-Reply-To: <002701c4d88f$3e12d100$0200a8c0@mindcooler> Message-ID: X-OriginalArrivalTime: 02 Dec 2004 17:34:57.0421 (UTC) FILETIME=[3DF1F3D0:01C4D895] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id iB2HaauQ001857 > -----Original Message----- > From: cygwin-owner On Behalf Of Mikael Åsberg > Sent: 02 December 2004 16:52 > Okay, now I have tested the code and something is still not > right. The DLL > contains functions for working with the Windows registry and > my problem > is that if I call, for example, the function > create_registry_key(), the > string > parameter denoting the name of the key is garbled if called > from a program > compiled under Cygwin. > The exact signature of that DLL-function is: > HKEY create_registry_key(const HKEY parent_key, const > std::string& name); > > This doesn't happen if I test the DLL with a > > program compiled under MSVC. Any idea what might be wrong? Well, the odds are that MSVC's C++ STL and Gcc's C++ STL use different structures to represent a string. Unless you've gone through the headers and verified that the two structures are exactly alike, and also that the vtbls and all the supporting machinery are exactly alike, you can't expect it to work. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/