I have a macro defined right below my include files and libraries. here is the macro:
print macro lpszText:VARARG
local txt
.data
txt db lpszText,13,10,0
.code
invoke StdOut,addr txt
ENDM
I am calling it like this:
print "testing the macro ..."
Why do i get the following errors:
error A2006: undefined symbol : StdOut
print(5): Macro Called From Main Line Code
Also, I am looking at other applications source code, and i see a lot of variables prefixed with 'sz' and 'lp' - what do they mean?
Regards.
p0wder,
In order to use StdOut you need to declare the following two lines before the macro:
include masm32.inc
includelib masm32.lib
If you are using hard coded paths, then use:
include \masm32\include\masm32.inc
includelib \masm32\lib\masm32.lib
hth,
Casper
Not that it's related to your problem, but "sz" means "String: Zero terminated" and "lp" means "Long Pointer".
[edit] See Hungarian Notation (http://en.wikipedia.org/wiki/Hungarian_notation) [/edit]
Ossa
"sz" and "lp" are from the C language. They mean about the same thing in MASM. Since lots of people know C and only a few know ASM, they are typically used in ASM (but not a requirement.) Use whatever identifier you feel comfortable with. I like to prefix a letter or two to every handle indicating what it is; i.e., nCount = number of counts, bFlag = boolean (yes/no) flag, sz/lpString = zero-terminated string, hBuffer = handle to buffer, etc. The differences in which all these are used is explained in the masm32\help\asmintro.hlp file.