Segfault when call kernel32 function

Jamie Guinan guinan@bluebutton.com
Sun Jan 9 14:20:00 GMT 2000


I tried it both 1 and 2 and still got the same error.  If you have a
minute, maybe you could try a little test program with BuildCommDCB() 
and see if it breaks or if its just me.  I'd appreciate knowing one 
way or the other.

Thanks,
-Jamie

On Thu, 6 Jan 2000, Mumit Khan wrote:

> I believe the bug is in Windows itself. Even though the prototype
> says that you can supply the first parameter as LPCSTR (ie., 
> `const char *'), Windows kernel will try to play with the string
> it in place (possibly reformatting it, or something of that sort).
> 
> Solution:
> 
> 1. Use -fwritable-strings option when compiling. Bad.
> 
> 2. Use a static or allocated buffer and pass that instead.
>    
>    static char mode_str[] = "9600,...";
>    BuildCommDCB (mode_str, &dcb);
> 
> Regards,
> Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list