Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: "Gordon Watts (UW Seattle)" To: "Gnu-Win Cygnus Mailing List" Subject: Calling cygwin32_conv_to_full_win32_path from a MSVC app Date: Wed, 12 Jan 2000 11:48:59 -0800 Message-ID: <000301bf5d36$11ce8eb0$c55e5f80@fnal.gov> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Hi, I'm trying to convert from UNIX paths to NT paths inside an app that has been built under MSVC. I was hoping to do this by pulling in the cygwin19.dll and then calling the conversion function. I can see from the mailing list (I used egroups, which had the best message interface that I saw, to do the search) that this has been discussed quite a bit. After an hour of looking I wasn't able to fix the problem. Here is what I'm doing now. Building a console application. #include extern "C" { void dll_noncygin_dllcrt0 (void); void cygwin32_conv_to_full_win32_path (const char *cygwin, char *result); }; int main (void) { char result[1000]; dll_noncygwin_dllcrt0 (); cygwin32_conv_to_full_win32_path ("/d0dist/dist/releases", result); std::cout << result << std::endl; return 0; } I link it against a .lib that I built for the cygwin dll by doing a dumpbin /exports and then parsing that to make up a .def file. The stacksize in the def file is 10K and the heapsize is 2k (hmm, let me make that lots bigger -- at 20K still makes the same error). I'm pretty inexperienced with DLLs, so this could be the problem. At any rate, when I do the call, it crashes with access violation in the dll (inside the cygwin32_conv_to_full_win32_path function). Is there anything obvious I'm doing wrong? Many thanks. Cheers, Gordon. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com