🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.program
Article #2572

Re: ��!������

#2572
From: ������
Date: Fri, 05 Dec 1997 00:00
41 lines
1874 bytes
Here is a simple program that sending chars to LPT.
Hope it's suitable for you.

{
HANDLE printfile;
DWORD retw;
char buf[1000];

for(int i=0; i<500; i++){
	buf[2*i] = 'a';
	buf[2*i+1] = 0xa;
	}
printfile =CreateFile("LPT1", GENERIC_WRITE, 0, NULL,
			OPEN_EXISTING, 0,
			NULL
			);

WriteFile(printfile, buf, 200, &retw, NULL);
}


�� �� fuzhonghua.bbs@bbs.whnet.edu.cn (ëд) �Ĵ������ᵽ: ��
: ��λ���������һ�����⣺
:       ��Ҫ���в���ͨѶ���õ���VB4.0 16λ��API����Transmitcommchr().
: ���ִ˺���ÿ�ν��ܷ���һ��Char������,�ұ���رղ��ڲ���������.Ȼ����
: opencomm(),Transmitcommchr(),closecomm()������һ��ͨѶ����������ǰһ�ε�ͨѶ
: �������ˡ���������ÿ��ͨѶǰ����opencomm()�����ʼ���˲���.������ϣ��
: Frist use "opencomm()" only one time to open the Lpt1;
: 
: Then use someone function to drive the LPT1 to work for me;
: 
: After all off jobs have been done,then close the LPT1.
:  
: The function writecomm() make me to be so disappointed because it doesn't work
: right also.
: 
: That's all my problem..Who  can tell me the solution?
: 
--
�� ��Դ:����ˮ˼Դվ bbs.sjtu.edu.cn��[FROM: www]
Technical Details
Message-ID: <3M11aE$Ubl@bbs.sjtu.edu.cn>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: fc86e,4d44e3c3f9d87556,start
X-Google-Attributes: gidfc86e,public
From: surfering.bbs@bbs.sjtu.edu.cn (������)
Subject: Re: ��!������
Date: 1997/12/05
Message-ID: <3M11aE$Ubl@bbs.sjtu.edu.cn>
X-Deja-AN: 295569945
X-Filename: program/M.881311694.A
Organization: ��ˮ˼Դվ
Newsgroups: cn.bbs.comp.program