Simple Masm32 example:
mov hDll, rv(LoadLibrary, chr$("MbMicroDll")) ; rv is the retval macro, it returns eax
.if eax
mov ptrInstr, rv(GetProcAddress, hDll, chr$("InstrDLL"))
.if eax
push 2+4 ; mode 2 = ignore case of first letter, 4 = whole word
push chr$("test") ; the pattern
push chr$("This is a Test") ; the source
push 1 ; the start pos
call ptrInstr
MsgBox 0, eax, chr$("The match is here:"), MB_OK
.else
invoke MessageBox, 0, chr$("InstrDLL not found"), 0, MB_OK
.endif
invoke FreeLibrary, hDll
.else
invoke MessageBox, 0, chr$("DLL not found"), 0, MB_OK
.endif