Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Attribute VB_Name = "basMKxCVx32"
- #If Win32 Then
- Public Declare Sub HMemCpy Lib "kernel32" Alias _
- "RtlMoveMemory" (Destination As Any, Source As Any, _
- ByVal Length As Long)
- #Else
- Declare Sub HMemCpy Lib "kernel" (hpvDest As Any, _
- hpvSource As Any, ByVal cbCopy As Long)
- #End If
- ' the realization of the functions of CVx/MKx$ with the aid of the turning to
- ' to the functions Of shindoshs API. HmemCpy or RtlMoveMemory
- ' (copying the given number of bytes of one region
- ' memory into another)
- '
- ' NOTE. The transfer of line variable in terms of the value
- ' (ByVal) means that to the function Of yuMemChpy is transferred
- ' the address not of describer, but line itself
- ' Funchtion of ccVD(x$) ace To double Of yuMemChpy rate #, ByVal x$, 8 CHCVcD = the rate # Of end Of funchtion
- Public Function CVD(x$) As Double
- HMemCpy Temp#, ByVal x$, 8
- CVD = Temp#
- End Function
- Public Function CVI(x$) As Integer
- HMemCpy Temp%, ByVal x$, 2
- CVI = Temp%
- End Function
- Public Function CVL(x$) As Long
- HMemCpy Temp&, ByVal x$, 4
- CVL = Temp&
- End Function
- Public Function CVS(x$) As Single
- HMemCpy Temp!, ByVal x$, 4
- CVS = Temp!
- End Function
- Public Function MKD$(x#)
- Dim Temp As String * 8
- HMemCpy ByVal Temp, x#, 8
- MKD$ = Temp
- End Function
- Public Function MKI$(x%)
- Dim Temp As String * 2
- HMemCpy ByVal Temp, x%, 2
- MKI$ = Temp
- End Function
- Public Function MKL$(x&)
- Dim Temp As String * 4
- HMemCpy ByVal Temp, x&, 4
- MKL$ = Temp
- End Function
- Public Function MKS$(x!)
- Dim Temp As String * 4
- HMemCpy ByVal Temp, x!, 4
- MKS$ = Temp
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement