🚀 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 ���� Mon, 20 Apr 1998 00:00
vb3.0����bc3.1���dllһ��
#1111
Author: ����
Date: Mon, 20 Apr 1998 00:00
54 lines
1670 bytes
��bc3.1�б�д�ĶԶ˿ڲ�����dll,�����ִ�ж�ͨ��.���Զ˿ڵIJ�����δ
�ﵽԤ��Ч��,��֪��dll�ı�д�͵�������û�д�,�����ָ��.

����.cpp��������:
#include <windows.h>
#include <dos.h>
int FAR PASCAL LibMain(HANDLE hInstance,WORD wDataSeg,WORD wHeapSize,
			LPSTR lpszCmdLine)
{
	if(wHeapSize!=0)
		UnlockData(0);
	return(1);
}

extern "C" int far pascal inpbyte(unsigned int port)
{
	int value;
	value=inp(port);
        	return value;
}

extern "C" void far pascal outpbyte(unsigned int port,unsigned int value)
{
	outp(port,value);
}


.def�����
LIBRARY myio
DESCRIPTION 'TEST'
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE SINGLE
HEAPSIZE 1024
EXPORTS outpbyte
	inpbyte
	outpword
	inpword


��vb3.0�������
Declare Function inpbyte% Lib "d:\zyw\cpp\myio.dll" (ByVal port%)
Declare Sub outpbyte Lib "d:\zyw\cpp\myio.dll" (ByVal port%, ByVal portvalue%)

�����������
dim temp as integer    
dim data as integer
temp = 2500 
outpbyte &H21C, temp
data=inpbyte &H210

--
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
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