errormac.asm

来自「这是一个数字图像处理的matlab仿真程序」· 汇编 代码 · 共 44 行

ASM
44
字号
; ##########################################################################
;
;  This macro calls a DLL that displays the corresponding error string for
;  the return value of GetLastError(). This MACRO file and the DLL called
;  DBERROR.DLL must be placed in the SAME directory as the file and the
;  line,
;
;  include errormac.asm
;
;  must be included at the beginning of the file after the system includes
;  & libraries.
;
;  Usage : ShowLastError
;
;  It is to be used directly after the function that produces the error.
;
; ##########################################################################

ShowLastError MACRO

    LOCAL lbl
    LOCAL LibName
    LOCAL ProcName

    pushad

    invoke GetLastError

    jmp lbl
      LibName       db "dberror.dll",0
      ProcName      db "ShowLastError",0
    lbl:

    push eax
    invoke LoadLibrary,ADDR LibName
    invoke GetProcAddress,eax,ADDR ProcName
    call eax

    popad

ENDM

; ##########################################################################

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?