🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.program
1 messages
1 total messages Started by ������ Fri, 05 Dec 1997 00:00
Re: ��!������
#2572
Author: ������
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]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads