
I'll probably take a closer look at it today...
THanks
Scott
-------------
Scott Turchin
Global procAddr As Dword Global hLib As Long 'CreateShortCut Declare Function protoCreateShortcut Alias "CREATESHORTCUT"_ (sPath As String, _ ' Path of the file the shortcut refers too. sArguments As String, _ ' Program command line args. sLocation As String, _ ' Destination path for the shortcut. sWorkingDir As String, _ ' Working directory. ByVal nCmdShow As Long) As Long ' Initial window state of program. hLib = LoadLibrary("SHORTCUT.DLL") If hLib Then procAddr = GetProcAddress(hLib, "CreateShortcut") If ProcAddr = %NULL Then MsgBox "Could not find function ""CreateShortcut"" in SHORTCUT.DLL",%MB_ICONSTOP,CCS Exit Function Else Call Dword ProcAddr Using protoCreateShortCut(_ FilePath + WinLogEXE,"", sLocation, FilePath,2)' To Result 'Com port to use Result = FreeLibrary(hLib) End If Else MsgBox "Unable to open DLL, file may be corrupt or missing",48, Mine End If
'Declare function prototype Declare Function protoFreeCCSDLL (Key as ASCIIZ,Param as ASCIIZ) as LONG Function ProcessCreditCards() as LONG Local x as LONG Local hLib as LONG Local ProcAddr as DWORD local lResult as LONG 'Retrieve DLL handle hLib = LoadLibrary("FREECCS.DLL") If IsFalse hLib Then MsgBox "FreeCCS.DLL is missing or damaged, please verify installation", %MB_ICONSTOP,"CCS" Exit Function End If 'Retrieve function address ProcAddr = GetProcAddress(hLib,"FreeCCSDLL") If ProcAddr = %NULL Then MsgBox "Could not find function FreeCCSDLL in FreeCCS.DLL" Exit Function End If Key = "MyKey" Param = "MyParam" 'Call pointer to the function using Function prototype Call DWORD ProcAddr USING protoFreeCCSDLL(Key,Param) TO lResult 'Do some more calls/processing 'Release Library Call FreeLibrary(hLib) Function = lResult End Function
'------------------------------------------------------------------------------ Function ProcessCreditCards() As Long Local x As Long Local hLib As Long Local procAddr As Long Local Param As Asciiz * 255 hLib = LoadLibrary("FREECCS.DLL") If IsFalse hLib Then MsgBox "FreeCCS.DLL is missing or damaged, please verify installation", %MB_ICONSTOP,CCS Exit Function End If procAddr = GetProcAddress(hLib,"FreeCCSDLL") 'Function Name is "FreeCCSDLL" For x = 1 To wCount VARIABLE EXPECTED ERROR: Call Dword Using @FreeCCSDLL("Setup", "ATZ") To Result 'Result = @FREECCSDLL("Port","COM" + Comport) 'Call Dword Using @FreeCCSDLL("Port", "COM" + ComPort) To Result 'Call FreeCCSDLL("Phone", "")' 'Call FreeCCSDLL("SetupTime", "5000")' // 5 seconds FOR Timeouts 'Call FreeCCSDLL("SubmitTime", "30000")' // 30 seconds wait for CONNECT ' 'Call FreeCCSDLL("CreditCard", "1234123412341234")' // numerics only! 'Call FreeCCSDLL("Expires", "0899")' // August 1999 'Call FreeCCSDLL("Amount", "123")' // numerics only! ($1.23) 'Call FreeCCSDLL("Action", "Sell")' // Not Refund/Get/Post/etc. 'Call FreeCCSDLL("Terminal", "HC12345654321")' 'Call FreeCCSDLL("Port", "COM2")' 'Call FreeCCSDLL("Phone", "1-800-555-1212")' 'Call FreeCCSDLL("Submit", Param)' 'Return returns the following: 'CAPTURE <approval number appears here> 'SALE <amount appears here> 'REF NO <transaction number appears here> 'BAL <the day's transaction balance appears here> <the transaction "batch" number appears here> Next Result = FreeLibrary(hLib) End Function
Declare Function FreeCCSDLL(Key As Asciiz, Param As Asciiz) As Long Function ProcessCreditCards() As Long Local x As Long Local hLib As Long Local procAddr As Long Local Param As Asciiz * 255 hLib = LoadLibrary("FREECCS.DLL") If IsFalse hLib Then MsgBox "FreeCCS.DLL is missing or damaged, please verify installation", %MB_ICONSTOP,CCS Exit Function End If procAddr = GetProcAddress(hLib,"FreeCCSDLL") 'Function Name is "FreeCCSDLL" Call Dword Using @FreeCCSDLL("Setup", "ATZ") To Result
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: