Calling cygwin32_conv_to_full_win32_path from a MSVC app
Gordon Watts (UW Seattle)
gwatts@fnal.gov
Wed Jan 12 11:55:00 GMT 2000
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@sourceware.cygnus.com
More information about the Cygwin
mailing list