Bob,
I learned from your latest newsletter the availability of #DEBUG DISPLAY ON. I found it a great feature and tried to use it right away with a program that calls a DLL. Soon enough I got the popups but the error made no sense to me. Here is a little code that reproduces the same error:
The DLL:
The program that calls the DLL:
It looks like the line
CALL DWORD procAddr USING FAL_SecuredSMTP(Pop3Host, sUSER, password)
generates a harmless exception. Why?
Thanks,
Peter Redei
I learned from your latest newsletter the availability of #DEBUG DISPLAY ON. I found it a great feature and tried to use it right away with a program that calls a DLL. Soon enough I got the popups but the error made no sense to me. Here is a little code that reproduces the same error:
The DLL:
Code:
#COMPILE DLL #DIM ALL GLOBAL secPop3Host AS STRING GLOBAL secUser AS STRING GLOBAL secPassword AS STRING SUB SecuredSMTP ALIAS "SecuredSMTP"(Pop3Host AS ASCIIZ, sUSER AS ASCIIZ, _ password AS ASCIIZ) EXPORT secPop3Host = Pop3Host secUser = sUSER secPassword = password END SUB
Code:
#DEBUG DISPLAY ON #COMPILE EXE #DIM ALL #INCLUDE "win32api.inc" GLOBAL hRemailLib AS DWORD DECLARE SUB FAL_SecuredSMTP(Pop3Host AS ASCIIZ, USER AS ASCIIZ, password AS ASCIIZ) FUNCTION PBMAIN () AS LONG LoadRemailLib SecuredSMTP "", "", "" UnloadRemailLib END FUNCTION SUB SecuredSMTP(Pop3Host AS ASCIIZ, sUSER AS ASCIIZ, password AS ASCIIZ) LOCAL procAddr AS DWORD IF hRemailLib <> 0 THEN procAddr = GetProcAddress(hRemailLib, "SecuredSMTP") CALL DWORD procAddr USING FAL_SecuredSMTP(Pop3Host, sUSER, password) END IF END SUB SUB LoadRemailLib() IF hRemailLib = 0 THEN hRemailLib = LoadLibrary("debsecure.dll") END IF END SUB SUB UnloadRemailLib() IF hRemailLib <> 0 THEN FreeLibrary hRemailLib hRemailLib = 0 END IF END SUB
CALL DWORD procAddr USING FAL_SecuredSMTP(Pop3Host, sUSER, password)
generates a harmless exception. Why?
Thanks,
Peter Redei
Comment