This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Re]:Segfault when call kernel32 function


To: Cygwin Mailing List <cygwin at sourceware dot cygnus dot com> 
Subject: [Re]:Segfault when call kernel32 function 
From: ShinHyung-Ryu


I had the same problem of calling BuildCommDCB().
(segfaults when BuildCommDCB() hits that call (running under Win98).)

now I find a solution about it.
but I don't know about the difference, using "char coms[]=" and "char *coms=".

see & run below.


#include "stdafx.h"
#include <windows.h>
int main(int argc, char* argv[])
{
	DCB		dcb;
	char coms[]="baud=1200 parity=N data=8 stop=1";
	BuildCommDCB(coms , &dcb);
	printf("%d\n",dcb.BaudRate);
	return 0;
}




==================================================


==================================================
¿ì¸® ÀÎÅͳÝ, Daum
Æò»ý ¾²´Â ¹«·á E-mail ÁÖ¼Ò ÇѸÞÀϳÝ
Áö±¸ÃÌ ÇÑ±Û °Ë»ö¼­ºñ½º Daum FIREBALL
http://www.daum.net

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]