Okay, I'll make note of some things in Loader.asm that might help you get going.
;; global main << Why do you need this? You use 'start below.
extern LoadLibraryA ;params: string filename of the dll to load.
extern ExitProcess
bits 64
section .data
debugProcFileName: db 'DebugProc.dll', 0
debugProcRef: dq 0
section .text
start:
;; LoadLibraryA : string -> pointer .
mov rcx, debugProcFileName
call LoadLibraryA
mov [debugProcRef], RAX ;; pointer to function is in RAX
;; call your procedure.
call [debugProcRef]
;; call it again.
call [debugProcRef]
;; ExitProcess : errorcode -> nothing.
mov rcx, 0
call ExitProcess ;; return control to the operating system.
Looking at the DebugProc.asm code, I don't think this will work. I haven't used Windows in quite a long time, but the convention for DLL's was to export a routine called DllMain, maybe try the following changes.
export DebugProc
export DllMain
bits 64
section .text
DllMain:
xor rax, rax ;; clear RAX
cmp rdx, 1 ;; is second parameter to DllMain DLL_PROCESS_ATTACH
jne .DONE ;; if not, the return value is ignored.
;; otherwise, return true
mov rax, 1
.DONE:
ret
DebugProc:
ret
HtH,
~ Bryant