Jump to content

RxUnlock: Difference between revisions

From EDM2
Created page with "==Description== ==Download== ==License== ==Files== * RXUNLOCK.DLL ==Functions== * RxUnlockLoadFuncs * RxUnlockDropFuncs * RxUnlockDebug * RxUnlockFiles * RxReplaceModule *..."
 
No edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
Rexx library functions: executable modules unlock, CRC32, MD5 with CD-ROM option, file compare, CPU detection, Random.


==Download==
;Files
* RXUNLOCK.DLL
 
==Functions==
===RxUnlockLoadFuncs===
Adds function to REXX.
 
===RxUnlockDropFuncs===
Removes functions from REXX (do not use).
 
===RxBldLevel===
RxBldLevel( filename )
May return
* '"string"'
* 'no signature'
* Numerical error code, like 110(error_Open_Failed)
 
===RxCpuId===
RxCpuId( Subfunction )
* Subfunction '0' returns Family/Model/Stepping and a Vendor string
*:example results:
Intel PIII:  '681 GenuineIntel'
AMD K6:      '561 AuthenticAMD'
(first 486): '400 Unknown'
(386):      '300 Unknown'
* other subfunctions currently return ''


==License==
===RxCRC32===
RxCRC32( filename [, progressbar] )
Like RxMD5, 8 hexadecimal digits on success


==Files==
===RxExecutableType===
* RXUNLOCK.DLL
RxExecutableType( FileName )
Returns 'NE'/'LX'/'PE'/'MZ'/etc... from executable header of FileName, else an error message starting with 'Error: '.
 
===RxFileCompare===
RxFileCompare( filename1, filename2 )
Returns 1 if files are equal and not error occurred, else 0.
 
This function does not compare extended attribute data.
 
===RxMD5===
RxMD5( filename [, progressbar] )
* filename may indicate a CDROM drive ('H:')
* progressbar is optional, value '1' enables it, default is disabled
May return:
** 32 hexadecimal digits (success)
** 'ERROR: read error'
** 'ERROR: not CDROM'
** 'ERROR: can not open'
 
===RxRandom===
RxRandom ( Range )
The result is a random number within the range 0 <= X < Range.
 
The quality of this function is for selecting pieces of music, not for cryptographic use!
 
===RxRandomize===
Initializes the built-in random number generator with a random value obtained from the system timer.
 
===RxReplaceModule===
RxReplaceModule( SourceName, TargetName)
;Remarks
* May not contain wild cards
* In opposite to REPMOD.EXE it does NOT search .EXE files or load .DLL files to get the fully qualified name. specify the full name yourself.
* Internal work is about.
** If TargetName exists, unlock it and remove any read-only attribute.
** Copy SourceName TargetName.
 
===RxStemSearch3===
RxStemSearch3( searchstring, sourcestemname, targetstemname)
;Remarks
* Use is not recommended, since it is slower than doing the query in native REXX code.
 
===RxUnlockDebug===
Enables display if internal function calls and results.
 
;Parameters
RxUnlockDebug( debug )
Debug is 0 or 1.


==Functions==
===RxUnlockFiles===
* RxUnlockLoadFuncs
RxUnlockFiles( filespec [, filespec ..] )
* RxUnlockDropFuncs
Filespec may contain wild cards.
* RxUnlockDebug
* RxUnlockFiles
* RxReplaceModule
* RxBldLevel
* RxMD5
* RxCRC32
* RxFileCompare
* RxCpuId
* RxStemSearch3
* RxRandomize
* RxRandom
* RxExecutableType


==Author==
==Author==
Line 28: Line 90:


==Links==
==Links==
*[http://kannegieser.net/veit/programm/rxunlock.arj rxunlock.arj] (2005-07-07)
*[http://kannegieser.net/veit/quelle/rxunlock_src.arj rxunlock_src.arj]
[[Category:REXX Function Library]]

Latest revision as of 00:20, 15 November 2020

Rexx library functions: executable modules unlock, CRC32, MD5 with CD-ROM option, file compare, CPU detection, Random.

Files
  • RXUNLOCK.DLL

Functions

RxUnlockLoadFuncs

Adds function to REXX.

RxUnlockDropFuncs

Removes functions from REXX (do not use).

RxBldLevel

RxBldLevel( filename )

May return

  • '"string"'
  • 'no signature'
  • Numerical error code, like 110(error_Open_Failed)

RxCpuId

RxCpuId( Subfunction )
  • Subfunction '0' returns Family/Model/Stepping and a Vendor string
    example results:
Intel PIII:  '681 GenuineIntel'
AMD K6:      '561 AuthenticAMD'
(first 486): '400 Unknown'
(386):       '300 Unknown'
  • other subfunctions currently return

RxCRC32

RxCRC32( filename [, progressbar] )

Like RxMD5, 8 hexadecimal digits on success

RxExecutableType

RxExecutableType( FileName )

Returns 'NE'/'LX'/'PE'/'MZ'/etc... from executable header of FileName, else an error message starting with 'Error: '.

RxFileCompare

RxFileCompare( filename1, filename2 )

Returns 1 if files are equal and not error occurred, else 0.

This function does not compare extended attribute data.

RxMD5

RxMD5( filename [, progressbar] )
  • filename may indicate a CDROM drive ('H:')
  • progressbar is optional, value '1' enables it, default is disabled

May return:

    • 32 hexadecimal digits (success)
    • 'ERROR: read error'
    • 'ERROR: not CDROM'
    • 'ERROR: can not open'

RxRandom

RxRandom ( Range )

The result is a random number within the range 0 <= X < Range.

The quality of this function is for selecting pieces of music, not for cryptographic use!

RxRandomize

Initializes the built-in random number generator with a random value obtained from the system timer.

RxReplaceModule

RxReplaceModule( SourceName, TargetName)
Remarks
  • May not contain wild cards
  • In opposite to REPMOD.EXE it does NOT search .EXE files or load .DLL files to get the fully qualified name. specify the full name yourself.
  • Internal work is about.
    • If TargetName exists, unlock it and remove any read-only attribute.
    • Copy SourceName TargetName.

RxStemSearch3

RxStemSearch3( searchstring, sourcestemname, targetstemname)
Remarks
  • Use is not recommended, since it is slower than doing the query in native REXX code.

RxUnlockDebug

Enables display if internal function calls and results.

Parameters
RxUnlockDebug( debug )

Debug is 0 or 1.

RxUnlockFiles

RxUnlockFiles( filespec [, filespec ..] )

Filespec may contain wild cards.

Author

  • Veit Kannegieser

Links