delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/01/12/14:53:20

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
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)" <gwatts AT fnal DOT gov>
To: "Gnu-Win Cygnus Mailing List" <cygwin AT sourceware DOT cygnus DOT com>
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
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 <iostream>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019