            .386
            .model flat, stdcall
            option   casemap: none   ; Case sensitive

            include  F:\masm32\include\kernel32.inc

         includelib  F:\masm32\lib\kernel32.lib

.data
LibName       db "Pgm06.dll",0
ProcName      db "FunctionEntry",0
hLib          dd 0

.code
Main:
      INVOKE     LoadLibrary, addr LibName
      .if eax
            mov     hLib, eax
         INVOKE     GetProcAddress, eax, addr ProcName
         .if eax
              call     eax
         .else

         .endif
         INVOKE     FreeLibrary, hLib
      .else

      .endif
      INVOKE     ExitProcess, 0
end Main
