Article View: cn.bbs.comp.lang.java
Article #22520Re: JNI��һ�����⡪���ļ�д��ʧ��
From: StevenZhao
Date: Sun, 21 Sep 2003 08:51
Date: Sun, 21 Sep 2003 08:51
39 lines
2677 bytes
2677 bytes
ԭ���Ѿ��ҵ�����C��û�йر��ļ����ͼ�����
"StevenZhao" <steven.j.zhao@263.net> д���ʼ�
news:bkgole$153s$1@mail.cn99.com...
> ����Java����֯��ݣ�Ȼ��һ��C�������Щ���д��д��һ���������ļ���C��
��
> �ı��롢���Ӷ�û�����⣬Java�����Ҳ������ȷ�Ĵ���C������������C�����д
��
> �������ļ���ʱ������д����ȥ��д��������£�
>
> if(fwrite(&cdr_record[i],sizeof(struct
> cdr),1,fopen("e:\\cdrtest\\abc.cdr","ab"))!=1)
> printf("file write error\n");
> else
> printf("file write ok\n");
>
> ÿ�ζ����Դ�ӡ��file write ok�������Ǹ��ļ�abc.cdr�ж�Ϊ�ա�
>
> д���ļ��ĺ����ǣ�
> void writeToFile(jbyte* file,jint fgate,jint tgate,jbyte* calling, jbyte*
> called,
> jint sday,jint ssecond, jint dday, jint dsecond, jint causecode,jint
icpif,
> jint delay,jfloat lostpack)��
>
> ����C��main��ֱ�ӵ��������������������д���ļ���
> main()
> {
>
>
writeToFile("e:\\cdrtest\\abc.cdr",10,10,"calling","called",10,10,10,10,10,1
> 0,10,0.3f);
> }
>
> ��̸�λ��������ô���¶��أ�
> �ҵı��컷�� C++ Builder 6 �������й���:bcc32.exe
> ϵͳ�Ļ�����winXP Pro
>
>
>
Technical Details
Message-ID:
<bkjos5$i4m$1@mail.cn99.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newsfeed.news2me.com!canoe.uoregon.edu!logbridge.uoregon.edu!newsgate.cuhk.edu.hk!news.cn99.com!not-for-mailReferences:
<bkgole$153s$1@mail.cn99.com>Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: f6cb0,9e9dc413089a1d9a,start X-Google-Attributes: gidf6cb0,public X-Google-ArrivalTime: 2003-09-21 01:54:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newsfeed.news2me.com!canoe.uoregon.edu!logbridge.uoregon.edu!newsgate.cuhk.edu.hk!news.cn99.com!not-for-mail From: "StevenZhao" <steven.j.zhao@263.net> Newsgroups: cn.bbs.comp.lang.java Subject: Re: JNI��һ�����⡪���ļ�д��ʧ�� Date: Sun, 21 Sep 2003 16:51:12 +0800 Organization: Bentium Ltd. (CN99) Lines: 41 Message-ID: <bkjos5$i4m$1@mail.cn99.com> References: <bkgole$153s$1@mail.cn99.com> NNTP-Posting-Host: 219.236.187.131 X-Trace: mail.cn99.com 1064134373 18582 219.236.187.131 (21 Sep 2003 08:52:53 GMT) X-Complaints-To: usenet@news.cn99.com NNTP-Posting-Date: Sun, 21 Sep 2003 08:52:53 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165