Article View: cn.bbs.comp.program
Article #1111vb3.0����bc3.1���dllһ��
From: ����
Date: Mon, 20 Apr 1998 00:00
Date: Mon, 20 Apr 1998 00:00
54 lines
1670 bytes
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]
Technical Details
Message-ID:
<980420.yRBMy$PBBS@bbs.ustc.edu.cn>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: fc86e,6fe7919be301b15c,start X-Google-Attributes: gidfc86e,public From: Zhou_Yuanwei@bbs.ustc.edu.cn (����) Subject: vb3.0����bc3.1���dllһ�� Date: 1998/04/20 Message-ID: <980420.yRBMy$PBBS@bbs.ustc.edu.cn> X-Deja-AN: 346055505 Organization: �й�ƴ�BBSվ Newsgroups: cn.bbs.comp.program