The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: ragdog on March 14, 2010, 09:41:00 AM

Title: Macro Syntax
Post by: ragdog on March 14, 2010, 09:41:00 AM
Good Morning

Gives a macro that i can use this syntax in masm32?

hMyDLL = LoadLibrary(DllLocation);

And a other little question what make this bracket?

(hMyDLL != NULL)

Thanks again
Title: Re: Macro Syntax
Post by: Vortex on March 14, 2010, 10:31:11 AM
.386
.model flat,stdcall
option casemap:none

include     \masm32\include\windows.inc
include     \masm32\include\kernel32.inc
include     \masm32\macros\macros.asm

includelib  \masm32\lib\kernel32.lib

.data?

hDll        dd ?

.code

start:

    mov     hDll,rv(LoadLibrary,"user32.dll")
    invoke  FreeLibrary,hDll                 ; hDll = eax
    invoke  ExitProcess,0

END start