View Full Version : سوال در باره پورت موازی
محمد حسن
سه شنبه 06 مرداد 1388, 21:56 عصر
سلام
میخوام بدونم چطوری میتونم LPt Port رو در دلفی بدست بگیرم
و کامپوننت اون چیه . اگر اون رو دارید برام بگذارین
خداحافظ.
MSHService
چهارشنبه 07 مرداد 1388, 01:55 صبح
سلام
من از Port.dll قدیما برای Step Motor استفاده می کردم!
تو کتاب PC Interface همه چی در باره اش نوشته. الان ندارمش.
موفق باشید.
yashar666
چهارشنبه 07 مرداد 1388, 14:37 عصر
input32.dll
http://www.dlldump.com/cgi-bin/testwrap/downloadcounts.cgi?rt=count&path=dllfiles/I/INPOUT32.DLL
skflower
چهارشنبه 07 مرداد 1388, 14:44 عصر
input32.dll
http://www.dlldump.com/cgi-bin/testwrap/downloadcounts.cgi?rt=count&path=dllfiles/I/INPOUT32.DLL
سلام دوست عزیز. من این dll رو دارم. از تو همین سایت هم لینکشو پیدا کردم. امّا کار باهاشو بلد نیستم. اگه تاپیکی سراغ دارید یا مطلبی دارید لطفاً کمکم کنید. هرچی جستجو میکنم چیزی دستگیرم نمیشه.
با تشکر
MSHService
پنج شنبه 08 مرداد 1388, 08:50 صبح
سلام
اینم Port.dll و اینم توضیحاتش از http://www.powerbasic.com/support/pbforums/showthread.php?t=29923
Functions for Read and Write the Ports
======================================
- ReadPort()
- WritePort()
Functions for the serial Port
=============================
OpenComm()
CloseComm()
ReadByte()
SendByte()
DSR()
CTS()
RI()
DCD()
RTS()
TXD()
DTR()
TIMEOUT()
Functions for the soundcard:
============================
IS_SOUND_CARD()
SOUND_CAP_IN()
SOUND_CAP_OUT()
SOUND_IN()
SOUND_OUT()
SOUND_GET_RATE()
SOUND_SET_RATE()
SOUND_GET_BYTES()
SOUND_SET_BYTES()
Functions for the Timer IC PIC
==============================
DELAY_TIME()
TIME_INIT()
TIME_READ()
TIME_INIT_US
TIMER_READ_US
REAL_TIME()
This is the documentation:
PBIO32.DLL Reference (current name PORT.DLL)
All function names must be stated in capital letters. Some functions do not work under Windows NT. The DLL may be located in the System directory, the Windows directory or the Applications directory.
Port Commands
(Cannot be used under Windows NT)
INPORT
Parameter: address (0–65535)
Reads a port.
The returned value is the content (byte) of the indicated port address.
Declaration in Delphi:
Function INPORT(PortAddr: Word): byte; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function INPORT Lib "Port" (ByVal p%) As Integer
OUTPORT
Parameter: address (0–65535)
Outputs to a port.
Returned value: none.
Declaration in Delphi:
Procedure OUTPORT(PortAddr: Word; Data: byte); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function INPORT Lib "Port" (ByVal p%) As Integer
Serial Interface
OPENCOM
Parameter: character string as a zero-terminated string
Opens the serial interface.
Returned value: ‘0’ in the event of an error.
Declaration in Delphi:
Function OPENCOM(S: PCHAR):Integer; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub OPENCOM Lib "Port" (ByVal A$)
Declare Function OPENCOM Lib "Port" (ByVal A$) As Integer
Note: the character string is passed directly to Windows. The following call can be used under Windows 95/98/NT:
OPENCOM “COM2: baud=19200 data=8 parity=N stop=1”
The following call also works under Windows 95/98:
OPENCOM “COM2,19200,N,8,1”
CLOSECOM
Parameter: none.
Closes the serial interface.
Returned value: none.
Declaration in Delphi:
Procedure CLOSECOM; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub CLOSECOM Lib "Port" ()
READBYTE
Parameter: none.
Reads a byte from the serial interface. This interface must have been previously opened using OpenCom.
Returned value: ‘–1’ in the event of an error, otherwise the received byte
Declaration in Delphi:
Function READBYTE: WORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function READBYTE Lib "Port" () As Integer
SENDBYTE
Parameter: one byte (0–255)
Sends a byte via the serial interface. This interface must have been previously opened using OpenCom.
Declaration in Delphi:
Procedure SENDBYTE(Value: WORD); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub SENDBYTE Lib "Port" (ByVal B%)
DSR
Parameter: none.
Polls the serial port line DSR. This interface must have been previously opened using OpenCom.
Returned value: line state (1/0)
Declaration in Delphi:
Function DSR: WORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function DSR Lib "Port" () As Integer
CTS
Parameter: none.
Polls the serial port line CTS. This interface must have been previously opened using OpenCom.
Returned value: line state (1/0)
Declaration in Delphi:
Function CTS: WORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function CTS Lib "Port" () As Integer
RI
Parameter: none.
Polls the serial port line RI. This interface must have been previously opened using OpenCom.
Returned value: line state (1/0)
Declaration in Delphi:
Function RI: WORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function RI Lib "Port" () As Integer
DCD
Parameter: none.
Polls the serial port line DCD. This interface must have been previously opened using OpenCom.
Returned value: line state (1/0)
Declaration in Delphi:
Function DCD: WORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function DCD Lib "Port" () As Integer
RTS
Parameter: value (0–1)
Sets the serial port line RTS. This interface must have been previously opened using OpenCom.
Declaration in Delphi:
Procedure RTS(Value: WORD); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub RI Lib "Port" (ByVal Value%)
TXD
Parameter: value (1/0)
Sets the serial port line TxD. This interface must have been previously opened using OpenCom.
Declaration in Delphi:
Procedure TXD(Value: WORD); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub TXD Lib "Port" (ByVal Value%)
DTR
Parameter: value (1/0)
Sets the serial port line DTR. This interface must have been previously opened using OpenCom.
Declaration in Delphi:
Procedure DTR(Value: WORD); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub DTR Lib "Port" (ByVal Value%)
TIMEOUT
Parameter: time interval in milliseconds
Sets the timeout for the serial interface. This interface must have been previously opened using OpenCom.
If no character is received within this interval, READBYTE is terminated and ‘–1’ is returned.
Declaration in Delphi:
Procedure TIMEOUT(Value: WORD); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub TIMEOUT Lib "Port" (ByVal Value%)
Sound Card
SOUNDIS
Parameter: none.
Determines whether a sound card is present.
Returned value: ‘0’ or ‘–1’, or ‘True’ or ‘False’
Declaration in Delphi:
Function SOUNDIS: Boolean; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function SOUNDIS Lib "Port" () As Integer
SOUNDCAPIN
Parameter: none.
The sound card input properties are output in a MessageBox.
Returned value: none.
Declaration in Delphi:
Procedure SOUNDCAPIN; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub SOUNDCAPIN Lib "Port" ()
SOUNDCAPOUT
Parameter: none.
The sound card output properties are output in a MessageBox.
Returned value: none.
Declaration in Delphi:
Procedure SOUNDCAPOUT; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub SOUNDCAPOUT Lib "Port" ()
SOUNDIN
Parameters: storage location and memory size (in bytes)
Starts sound recording and stores the data in the buffer memory specified by the parameters.
Returned value: none.
Declaration in Delphi:
Procedure SOUNDIN(Buffer: Pchar; Size: DWORD); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub SOUNDIN Lib "Port" (ByVal A$, ByVal Gr As Long)
SOUNDOUT
Parameters: storage location and memory size (in bytes)
Starts sound playback of the data in the buffer memory specified by the parameters
Returned value: none.
Declaration in Delphi:
Procedure SOUNDOUT(Buffer: Pchar; Size: DWORD); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub SOUNDOUT Lib "Port" (ByVal A$, ByVal Gr As Long)
SOUNDGETRATE
Parameter: none.
Queries the sample rate setting.
Returned value: sample rate in samples/s (for example, 11025).
Declaration in Delphi:
Function SOUNDGETRATE: WORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function SOUNDGETRATE Lib "Port" () As Integer
SOUNDSETRATE
Parameter: sample rate in samples/s
Sets the sample rate.
Returned value: previous sample rate in samples/s. (for example, 11025).
Declaration in Delphi:
Function SOUNDSETRATE(Rate: DWORD): DWORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function SOUNDSETRATE Lib "Port" (ByVal Rate As Long) As Long
SOUNGETBYTES
Parameter: none.
Queries the number of bytes per sample.
Returned value: ‘1’ or ‘2’. One byte corresponds to 8 bits/sample; two bytes corresponds to 16 bits/sample.
Declaration in Delphi:
Function SOUNDGETBYTES: WORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function SOUNDSETRATE Lib "Port" () As Integer
SOUNDSETBYTES
Parameter: 1 / 2
Sets the number of bytes per sample.
Returned value: ‘1’ or ‘2’. One byte corresponds to 8 bits/sample; two bytes corresponds to 16 bits/sample.
Declaration in Delphi:
Function SOUNDGETBYTES: WORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function SOUNDSETRATE Lib "Port" () As Integer
Joystick
JOYX
Parameter: none.
Requests the X position.
Returned value: position a numerical value.
Declaration in Delphi:
Function JOYX: DWORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function JOYX Lib "Port" () As Long
JOYY
Parameter: none.
Requests the Y position.
Returned value: position as a numerical value.
Declaration in Delphi:
Function JOYY: DWORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function JOYY Lib "Port" () As Long
JOYZ
Parameter: none.
Requests the Z position.
Returned value: position as a numerical value.
Declaration in Delphi:
Function JOYZ: DWORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function JOYZ Lib "Port" () As Long
JOYR
Parameter: none.
Requests the R position.
Returned value: position as a numerical value.
Declaration in Delphi:
Function JOYR: DWORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function JOYR Lib "Port" () As Long
JOYU
Parameter: none.
Requests the U position.
Returned value: position as a numerical value.
Declaration in Delphi:
Function JOYU: DWORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function JOYU Lib "Port" () As Long
JOYV
Parameter: none.
Requests the V position.
Returned value: position as a numerical value.
Declaration in Delphi:
Function JOYV: DWORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function JOYV Lib "Port" () As Long
JOYBUTTON
Parameter: none.
Button polling.
Returned value: button as a numerical value.
Declaration in Delphi:
Function JOYBUTTON: DWORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function JOYBUTTON Lib "Port" () As Long
JOYSTICK
Parameter: seven variables for receiving the values
Complete polling in a single call.
Returned value: none.
Declaration in Delphi:
Procedure JOYSTICK(VAR X,Y,Z,R,U,V,B: DWORD); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub JOYSTICK Lib "Port" (ByVal X As Long, ByVal Y As Long ...)
Timing Routines
DELAY
Parameter: time in milliseconds
Delay in the milliseconds range.
Returned value: none.
Declaration in Delphi:
Procedure DELAY(ms: WORD); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub DELAY Lib "Port" (ByVal ms%)
TIMEINIT
Parameter: none.
Sets the milliseconds timing counter to zero.
Returned value: none.
Declaration in Delphi:
Procedure TIMEINIT; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub TIMEINIT Lib "Port" ()
TIMEREAD
Parameter: none.
Reads out the milliseconds timer. The result the number of milliseconds that have elapsed since TIMEINT was last called.
Returned value: milliseconds as a numerical value
Declaration in Delphi:
Function TIMEREAD: DWORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function TIMEREAD Lib "Port" () As Long
TIMEINITUS
Parameter: none.
Sets the microseconds timing counter to zero.
Returned value: none.
Declaration in Delphi:
Procedure TIMEINITUS; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub TIMEINITUS Lib "Port" ()
TIMEREADUS
Parameter: none.
Reads out the microseconds timer. The result the number of microseconds that have elapsed since TIMEINTUS was last called.
Returned value: microseconds as a numerical value
Declaration in Delphi:
Function TIMEREADUS: DWORD; stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Function TIMEREADUS Lib "Port" () As Long
REALTIME
Parameter: ‘0’ or ‘1’.
Sets the highest priority. This call is useful with time-critical outputs. It should be activated only briefly, since it causes other programs to run more slowly.
Returned value: none.
Declaration in Delphi:
Procedure REALTIME(d: WORD); stdcall; external ‘port.dll‘;
Declaration in VB and VBA:
Declare Sub TIMEREADUS Lib "Port" (ByVal d%)
asyasyasy
سه شنبه 20 مرداد 1388, 18:07 عصر
سلام
بزرگوار ویندوز ایکس پی اجازه نوشتن رو پورت ها رو نمیده
اینو باید چکار کرد
بای
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.