📄 cyphermathinterface.bas
字号:
Attribute VB_Name = "CypherMathInterface"
'===============================================================================
' FILE NAME:
' ---------
' CypherMathInterface.bas
'
' DESCRIPTION:
' -----------
' This file contains the public interface to the CyperMath math engine. It
' includes constants that may be returned by CypherMath functions to their
' external calling routines.
'
' It also includes function declarations for all CypherMath functions.
'
' You should add this module to any Visual Basic application that will
' require use of the CypherMathWin32 DLL.
'
'
' REVISION HISTORY:
' ----------------
' Rev 1.0 23 November, 1998 - Initial release.
'
' COPYRIGHT NOTICE:
' ----------------
' Copyright (c) 1998, EPS/Solutions.
'
' CONTACT INFORMATION:
' -------------------
' EPS/Solutions
' PO Box 862
' Broomall, PA. 19008-0862 (USA)
' Web site: www.cyphercalc.com/math
' Email: support@cyphercalc.com
'
' END USER LICENSE AGREEMENT AND WARRANTY:
' ---------------------------------------
'
' LIMITED USE LICENSE: EPS/Solutions ("Licenser") grants you
' ("Licensee") the right to use the purchased program products
' and accompanying material ("Products") within your organization
' (corporation, partnership, self, or other entity), and to
' incorporate the Products into your applications. There are no
' recurring royalty fees associated with your use of the Products
' after purchase. You may not deliver, transfer, re-sell, or
' supply the C source code (.c, .h, or .lib files), or Basic
' source code (.bas files), documentation, algorithms, or created
' derivative works to any person or entity other than within your
' own organization, without the express written consent of the
' Licenser. You must hold the source code, documentation, and
' algorithms associated with the Products in confidence and treat
' the same as proprietary to your organization. You may only
' deliver the object or executable code of the Products with your
' applications to your customers and not the Products' source code.
' If your customers require access to the Products' source code,
' you or your customers must purchase additional copies of the
' Products' source code from Licenser.
'
' LIMITED WARRANTY: Licenser warrants to the original licensee
' only, that, for a period of ninety (90) days from the date of
' purchase, the Products shall perform materially in accordance
' with the accompanying written or electronic documentation. Any
' alterations or modifications made to the Products without the
' express written consent of the Licenser shall void this warranty
' and obligations of the Licenser both express and implied.
'
' NO OTHER WARRANTIES: LICENSER HEREBY DISCLAIMS ALL OTHER
' WARRANTIES WITH RESPECT TO THE PRODUCTS, EITHER EXPRESS OR IMPLIED,
' INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABIL-
' ITY, NON-INFRINGMENT OF THIRD PARTY RIGHTS, AND FITNESS FOR A
' PARTICULAR PURPOSE.
'
' EXCLUSIVE REMEDY: The original Licensee's exclusive remedy for
' breach of this warranty shall be, at the option of the Licenser,
' either (a) to correct or provide palliative solution to the program
' product that does not meet the stated warranty, or (b) to refund
' the purchase price paid for the non-compliant program product. In
' no event shall Licenser be liable for any refund in excess of the
' purchase price paid for the program product.
'
' LIMITATION ON DAMAGES: IN NO EVENT SHALL LICENSER BE LIABLE FOR ANY
' CONSEQUENTIAL OR INCIDENTAL DAMAGES WHATSOEVER ARISING OUT OF THE
' USE OR INABILITY TO USE THE PRODUCTS, DESPITE LICENSER'S KNOWLEDGE
' OF THE POSSIBILITY OF SUCH DAMAGES.
'
' APPLICABLE LAW: This agreement is governed by the internal
' substantive laws of the state of Pennsylvania. The jurisdiction and
' venue for any action at law or in equity arising out of this
' agreement or occasioned by an alleged breach thereof shall lie
' exclusively in the courts of Delaware County, Pennsylvania, USA.
'
' EXPORT LAW: The export of the Products, or any part of the Products,
' outside the United States may be restricted by the Bureau of Export
' Administration (BXA) in the U.S. Department of Commerce, as described
' in the Export Administration Regulations (EAR), 15 C.F.R. Parts 730-774.
'
'===============================================================================
'Declare CypherMathWin32 functions. The path show for the CypherMathWin32.dll file is for test
'purposes only. If you installed the CypherMathWin32 package to a directory other than
'"C:\Program Files\CypherMathWin32\", you'll need to change the path here. Also, in your
'final product, you would change this path to your application directory, or the "Windows\System"
'directory, depending on which directory you install CypherMathWin32.dll to on your end-user's
'computer:
Declare Function EPS_CreateBuffer Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal Size As Integer) As Long
Declare Function EPS_CloseBuffer Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal BufferHandle As Long) As Long
Declare Sub EPS_SetBufferWord Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal BufferHandle As Long, ByVal Index As Integer, ByVal Order As Integer, ByVal Val As Long)
Declare Function EPS_GetBufferWord Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal BufferHandle As Long, ByVal Index As Integer, ByVal Order As Integer) As Long
Declare Sub EPS_WordShiftRight Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrOutbuf As Long, ByVal lptrInbuf As Long, ByVal n As Integer, ByVal buflen As Integer)
Declare Sub EPS_WordShiftLeft Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrOutbuf As Long, ByVal lptrInbuf As Long, ByVal n As Integer, ByVal buflen As Integer)
Declare Function EPS_TestBuffer Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrBuf As Long, ByVal buflen As Integer) As Integer
Declare Function EPS_Subtract Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal lptrXop As Long, ByVal buflen As Integer) As Long
Declare Function EPS_SubtractFT Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal lptrXop As Long, ByVal buflen As Integer) As Long
Declare Sub EPS_Multiply Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal lptrXop As Long, ByVal buflen As Integer)
Declare Function EPS_Divide Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrXop As Long, ByVal lptrYop As Long, ByVal lptrQop As Long, ByVal lptrRop As Long, ByVal buflen As Integer) As Integer
Declare Sub EPS_CopyBuffer Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal buflen As Integer)
Declare Function EPS_Compare Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal buflen As Integer) As Integer
Declare Function EPS_CompareFT Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal buflen As Integer) As Integer
Declare Sub EPS_ClearBuffer Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrBuf As Long, ByVal buflen As Integer)
Declare Function EPS_Add Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal lptrXop As Long, ByVal buflen As Integer) As Long
Declare Sub EPS_Xor Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal lptrXop As Long, ByVal buflen As Integer)
Declare Sub EPS_And Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal lptrXop As Long, ByVal buflen As Integer)
Declare Sub EPS_Or Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal lptrXop As Long, ByVal buflen As Integer)
Declare Sub EPS_Complement Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrXop As Long, ByVal buflen As Integer)
Declare Function EPS_MontSquare Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAprime As Long, ByVal lptrXop As Long, ByVal lptrMod As Long, ByVal n0prime As Long, ByVal buflen As Integer) As Integer
Declare Function EPS_MontSquareFT Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAprime As Long, ByVal lptrXop As Long, ByVal lptrMod As Long, ByVal n0prime As Long, ByVal buflen As Integer) As Integer
Declare Sub EPS_Square Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrXop As Long, ByVal buflen As Integer)
Declare Function EPS_MontRep Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrAprime As Long, ByVal lptrMod As Long, ByVal buflen As Integer) As Integer
Declare Function EPS_NormalRep Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAprime As Long, ByVal lptrAop As Long, ByVal lptrMod As Long, ByVal n0prime As Long, ByVal buflen As Integer) As Integer
Declare Function EPS_MontPro Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAprime As Long, ByVal lptrBprime As Long, ByVal lptrXop As Long, ByVal lptrMod As Long, ByVal n0prime As Long, ByVal buflen As Integer) As Integer
Declare Function EPS_MontProFT Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAprime As Long, ByVal lptrBprime As Long, ByVal lptrXop As Long, ByVal lptrMod As Long, ByVal n0prime As Long, ByVal buflen As Integer) As Integer
Declare Function EPS_FindN0Prime Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal n0 As Long, ByRef n0prime As Long) As Integer
Declare Function EPS_ModInverse Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal ptrAop As Long, ByVal ptrNop As Long, ByVal ptrAinvOp As Long, ByVal buflen As Integer) As Integer
Declare Sub EPS_UnityBuffer Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrBuf As Long, ByVal buflen As Integer)
Declare Function EPS_MontExp Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrMop As Long, ByVal lptrEop As Long, ByVal lptrCprime As Long, ByVal lptrMod As Long, ByVal n0prime As Long, ByVal elen As Integer, ByVal buflen As Integer) As Integer
Declare Function EPS_MontExpFT Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrMop As Long, ByVal lptrEop As Long, ByVal lptrCprime As Long, ByVal lptrMod As Long, ByVal n0prime As Long, ByVal elen As Integer, ByVal buflen As Integer) As Integer
Declare Function EPS_Exponentiate Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrMop As Long, ByVal lptrEop As Long, ByVal lptrXop As Long, ByVal elen As Integer, ByVal buflen As Integer) As Integer
Declare Function EPS_ExponentiateEven Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrMop As Long, ByVal lptrEop As Long, ByVal lptrXop As Long, ByVal lptrMod As Long, ByVal elen As Integer, ByVal buflen As Integer) As Integer
Declare Function EPS_GCD Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" (ByVal lptrAop As Long, ByVal lptrBop As Long, ByVal lptrXop As Long, ByVal lptrYop As Long, ByVal lptrDop As Long, ByVal buflen As Integer) As Integer
Declare Function EPS_GetMathEngineVersion Lib "C:\Program Files\CypherMathWin32\CypherMathWin32.dll" () As Long
'CypherMathWin32 global DLL constants. These constants may be returned by CypherMath
'routines to their external calling routines:
Public Const EPS_kgEQZERO = 1
Public Const EPS_kgLTZERO = 2
Public Const EPS_kgGTZERO = 4
Public Const EPS_kgNEZERO = 6
Public Const EPS_kgLTEQZERO = 3
Public Const EPS_kgGTEQZERO = 5
Public Const EPS_kgEQ = 1
Public Const EPS_kgLT = 2
Public Const EPS_kgGT = 4
Public Const EPS_kgNE = 6
Public Const EPS_kgLTEQ = 3
Public Const EPS_kgGTEQ = 5
Public Const EPS_kgOK = 1
Public Const EPS_kgDIVIDEBYZERO = 2
Public Const EPS_kgNOINVERSE = 3
Public Const EPS_kgFAILURE = 99
'CypherMathWin32 word order constants. These constants specify which 16 bits of a 32 bit
'word are being addressed:
Public Const EPS_kgLOWORD = 1
Public Const EPS_kgHIWORD = 2
Public Const EPS_kgFULLWORD = 3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -