Librerías Freeware de

 

Archivos léeme de las librerías para el manejo de los puertos de Entrada/Salida y otras rutinas para Visual Basic 16 y 32 bits (VB6 y anteriores).
Están en inglés, pero...

Actualizado el 26/Feb/97 (13/Jul/03)


 

 
  Vbhelper16.txt

'---------------------------------------------------------------'
' VB-Helper, Version 1.02 '
' Copyright (c) 1994 SoftCircuits Programming '
' Redistributed by Permission. '
' '
' SoftCircuits Programming '
' P.O. Box 16262 '
' Irvine, CA 92713 '
' CompuServe: 72134,263 '
' '
' This program may be used and distributed freely on the '
' condition that it is distributed in full and unchanged, and '
' that no fee is charged for such use and distribution with the '
' exception or reasonable media and shipping charges. '
' '
' You may also incorporate any or all portions of this program, '
' and/or include the VB-Helper DLL, as part of your own '
' programs and distribute such programs without payment of '
' royalties on the condition that such program do not duplicate '
' the overall functionality of VB-Helper and/or any of its demo '
' programs, and that you agree to the following disclaimer. '
' '
' WARNING: Accessing the low-level services of Windows, DOS and '
' the ROM-BIOS using VB-Helper is an extremely powerful '
' technique that, if used incorrectly, can cause possible '
' permanent damage and/or loss of data. You are responsible for '
' determining appropriate use of any and all files included in '
' this package. SoftCircuits will not be held liable for any '
' damages resulting from the use of these files. '
' '
' SOFTCIRCUITS SPECIFICALLY DISCLAIMS ALL WARRANTIES, '
' INCLUDING, WITHOUT LIMITATION, ALL IMPLIED WARRANTIES OF '
' MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND '
' NON-INFRINGEMENT OF THIRD PARTY RIGHTS. '
' '
' UNDER NO CIRCUMSTANCES WILL SOFTCIRCUITS BE LIABLE FOR '
' SPECIAL, INCIDENTAL, CONSEQUENTIAL, INDIRECT, OR ANY OTHER '
' DAMAGES OR CLAIMS ARISING FROM THE USE OF THIS PRODUCT, '
' INCLUDING LOSS OF PROFITS OR ANY OTHER COMMERCIAL DAMAGES, '
' EVEN IF WE HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH '
' DAMAGES. '
' '
' Please contact SoftCircuits Programming if you have any '
' questions concerning these conditions. '
'---------------------------------------------------------------'


Vbhlp32.txt (este archivo sólo tiene las declaraciones de las funciones, lo que aquí pongo está "sacado" de la ayuda. Son las declaraciones de las funciones y la explicación de sus parámetros.
Para sacar esta información, he usado el programa HCW.)

 

 
  VB-Helper DLL (32-bit),
Copyright © 1996 SoftCircuits
Redistributed by Permission



Declare Function vbGetAddress Lib "VBHLP32.DLL" (pData As Any) As Long
Description:
Returns the address of pData

Note that Visual Basic passes a copy of some variables (for example, variable-length strings and user-defined types that contain strings) when calling DLL functions. In these cases the value returned by vbGetAddress is not normally helpful since it will be the address of the copy which is temporary.



Declare Sub vbFillMemory Lib "VBHLP32.DLL" (pDest As Any, ByVal nValue As Byte, ByVal nCount As Long)
Description:
Fills an area of memory with the specified value.
pDest is the address of the memory to be modified,
nValue is the value that each byte will be set to, and
nCount is the number of bytes to fill.



Declare Sub vbCopyMemory Lib "VBHLP32.DLL" (pDest As Any, pSource As Any, ByVal nCount As Long)
Description:
Copies an area of memory to another location. If portions of the source and destination memory overlap, steps are taken to ensure data is copied correctly.
pDest is the address of the memory to be copied to,
pSource is the address of the memory to be copied from, and
nCount is the number of bytes to copy.



Declare Function vbLoByte Lib "VBHLP32.DLL" (ByVal nValue As Integer) As Integer
Description:
Returns the low-order byte of nValue



Declare Function vbHiByte Lib "VBHLP32.DLL" (ByVal nValue As Integer) As Integer
Description:
Returns the high-order byte of nValue



Declare Function vbLoWord Lib "VBHLP32.DLL" (ByVal nValue As Long) As Integer
Description:
Returns the low-order word of nValue



Declare Function vbHiWord Lib "VBHLP32.DLL" (ByVal nValue As Long) As Integer
Description:
Returns the high-order word of nValue



Declare Function vbMakeWord Lib "VBHLP32.DLL" (ByVal nLoByte As Integer, ByVal nHiByte As Integer) As Integer
Description:
Combines two byte values into a word value.



Declare Function vbMakeLong Lib "VBHLP32.DLL" (ByVal nLoWord As Integer, ByVal nHiWord As Integer) As Long
Description:
Combines two word values into a long value.



Declare Function vbShiftRight Lib "VBHLP32.DLL" (ByVal nValue As Integer, ByVal nBits As Integer) As Integer
Description:
Shifts the bits in nValue
right the number of times specified by nBits
The left-most bits opened up by the shift are set to 0.



Declare Function vbShiftLeft Lib "VBHLP32.DLL" (ByVal nValue As Integer, ByVal nBits As Integer) As Integer
Description:
Shifts the bits in nValue
left the number of times specified by nBits
The right-most bits opened up by the shift are set to 0.



Declare Function vbShiftRightLong Lib "VBHLP32.DLL" (ByVal nValue As Long, ByVal nBits As Integer) As Long
Description:
Shifts the bits in nValue
right the number of times specified by nBits
The left-most bits opened up by the shift are set to 0.



Declare Function vbShiftLeftLong Lib "VBHLP32.DLL" (ByVal nValue As Long, ByVal nBits As Integer) As Long
Description:
Shifts the bits in nValue
left the number of times specified by nBits
The right-most bits opened up by the shift are set to 0.



Declare Function vbRotateRight Lib "VBHLP32.DLL" (ByVal nValue As Integer, ByVal nBits As Integer) As Integer
Description:
Rotates the bits in nValue
right the number of times specified by nBits
For each rotation, the right-most bit is copied to the left-most bit.



Declare Function vbRotateLeft Lib "VBHLP32.DLL" (ByVal nValue As Integer, ByVal nBits As Integer) As Integer
Description:
Rotates the bits in nValue
left the number of times specified by nBits
For each rotation, the left-most bit is copied to the right-most bit.



Declare Function vbRotateRightLong Lib "VBHLP32.DLL" (ByVal nValue As Long, ByVal nBits As Integer) As Long
Description:
Rotates the bits in nValue
right the number of times specified by nBits
For each rotation, the right-most bit is copied to the left-most bit.



Declare Function vbRotateLeftLong Lib "VBHLP32.DLL" (ByVal nValue As Long, ByVal nBits As Integer) As Long
Description:
Rotates the bits in nValue
left the number of times specified by nBits
For each rotation, the left-most bit is copied to the right-most bit.



Declare Sub vbPackUDT Lib "VBHLP32.DLL" (pUDT As Any, ppResult As Long, ByVal pszFields As String)
Description:
Creates of copy of a user-defined type (UDT) and removes any padding that VB may have added as a result of DWORD alignment.
32-bit versions of Visual Basic will insert bytes into UDT variables as padding to keep 32-bit members aligned on a 32-bit address. This padding can result in more efficient member access on 32-bit processors. However, Visual Basic provides no workaround for those rare instances where you need to interface with API or DLL functions that take UDTs with no padding. In these cases, you can use
vbPackUDT to create a copy of a UDT and remove any padding that VB may have added.
pUDT is the UDT variable to be packed.
vbPackUDT makes a copy of this UDT and places the address of the copy in ppResult.
pszFields is a string that contains one character for each member of the UDT.
Each character indicates the type of each member and must be one of the following characters:
"s" Variable-length string
"b" Byte or String * 1
"i" Integer or Boolean
"l" Long
"f" Single (float)
"d" Double
For UDTs that contain arrays, you must repeat the member type for each item in the array. For fixed-length strings, use "b" for each character in the string.
On return,
ppResult contains the address of the packed data or 0 if one of the field codes was invalid or there was not enough system memory.
Some precautions must be taken when using vbPackUDT
Each time this routine is called, a block of memory is allocated from the system. When the DLL unloads, this memory will automatically be freed. However, if your program might call vbPackUDT more than once before terminating, you should call vbPackUDTFree each time to explicitly release allocated memory. Note, however, that if you need to unpack the UDT after the call, you must not free the memory before calling vbUnpackUDT

In addition, UDTs with variable-length strings require additional precautions. For these UDTs, vbPackUDT will allocate a separate block of memory to hold the actual string data. Therefore, you should avoid copying the packed data of UDTs with variable-length strings as the string members will refer to memory that is located elsewhere and may be temporary. Also, when calling
vbUnpackUDT to unpack a UDT that contains variable-length strings, make sure the string members in the UDT passed to vbUnpackUDT are big enough to hold the string returned.



Declare Sub vbUnpackUDT Lib "VBHLP32.DLL" (pUDT As Any, ppResult As Long)
Description:
Unpacks a user-defined type (UDT) packed by vbPackUDT

pUDT is the UDT to receive the data. This UDT must be of the same type that was passed to vbPackUDT when the data was packed.
ppResult must be a value obtained from the call to vbPackUDT

For UDTs that contain variable-length strings, you must ensure that string members are big enough to hold the string being returned. Normally, this simply means that you should not reduce the size of variable-length string members between the call to vbPackUDT and vbUnpackUDT



Declare Function vbPackUDTGetSize Lib "VBHLP32.DLL" (ppResult As Long) As Long
Description:
Returns the size of a user-defined type (UDT) packed by vbPackUDT

ppResult must be a value obtained from the call to vbPackUDT
If ppResult is not a valid packed UDT value, this function returns 0.
Note: You should not make any assumptions about the actual size of the memory block allocated by vbPackUDT which will be bigger than the value returned by vbPackUDTGetSize



Declare Sub vbPackUDTFree Lib "VBHLP32.DLL" (ppResult As Long)
Description:
Frees the memory allocated for a user-defined type (UDT) packed by vbPackUDT
ppResult must be a value obtained from the call to vbPackUDT
If this function is successful, ppResult is set to 0.
Each time you call vbPackUDT, a block of memory is allocated from the system. When the DLL unloads, this memory will automatically be freed. However, if your program might call vbPackUDT more than once before terminating, you should call vbPackUDTFree each time to explicitly release allocated memory. Note, however, that if you need to unpack the UDT after the call, you must not free the memory before calling vbUnpackUDT



Declare Sub vbShowAboutBox Lib "VBHLP32.DLL" ()
Description:
Opens a dialog box that displays version and copyright information for VBHLP32.DLL.



Declare Function vbGetHelperVersion Lib "VBHLP32.DLL" () As Integer
Description:
Returns the VB-Helper DLL version. The high byte contains the major version, and the low byte contains the minor version. For example, a return value of &H20A would indicate version 2.10.



About SoftCircuits
SoftCircuits Programming
P.O. Box 16262
Irvine, CA 92623
For the latest information about SoftCircuits, visit us on the World Wide Web at http://www.softcircuits.com.
SoftCircuits is a trademark and SoftCircuits Programming is a registered trademark of SoftCircuits.

Revision History
This section is set aside for tracking program revisions.
Version 2.00
Comments
Original 32-bit Version. Note: A similar 16-bit DLL with the same name received very little distribution. If your application is 32-bit running under a 32-bit operating system and you call into this DLL, you can safely assume that it is version 2.00 or higher.

 

 

 
  WIN95IO.DLL, Version 1.00
Copyright (c) 1996 SoftCircuits Programming
Redistributed by Permission.

Provided by:
SoftCircuits Programming
P.O. Box 16262
Irvine, CA 92623
CompuServe: 72134,263
http://www.softcircuits.com

Overview
========
WIN95IO.DLL is a 32-bit DLL that provides access to port input/output (I/O) under Windows 95. It was written for use with 32-bit Visual Basic since Visual Basic does not have I/O instructions. Note that, due to the Win32 architecture, the DLL may not always behave exactly as expected. Read on for additional information.

While DOS and Windows 3.x applications may perform port I/O freely, Win32 operating systems assume that port I/O is handled by device drivers. As discussed in Microsoft KB article Q112298, attempting to use the port I/O functions from within an application for Windows NT running in user mode causes a privileged instruction exception to occur. Although Windows 95 takes a similar approach, port access under Windows 95 does NOT cause a protection fault. Thus the reason for writing this DLL.

Although port access under Windows 95 does not cause a protection fault, it may not always perform as expected. For example, if a DOS application is accessing the same port, or a device driver has control of the same port then a port read or write may be ignored. Further, if you write a 32-bit application that uses this DLL, care must be taken to prevent it from running under NT.

SoftCircuits provides this software "as is" with no warranty of any kind. We have attempted to provide software that may be useful and described the situations where we believe it is not be useful. SoftCircuits makes no additional claims beyond this including claims that this documentation is accurate. Use this software and documentation at your own risk.

Declarations:
============
Declare Sub vbOut Lib "WIN95IO.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
Declare Sub vbOutw Lib "WIN95IO.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
Declare Function vbInp Lib "WIN95IO.DLL" (ByVal nPort As Integer) As Integer
Declare Function vbInpw Lib "WIN95IO.DLL" (ByVal nPort As Integer) As Integer

ir al índice