This is driving me mad - error A2148: invalid symbol type in expression : lstrcpy
The code looks ok, and lstrcpy works fine in other parts of the code. I even checked in a hex editor for any hidden problems like CrCrLF but no, it looks fine. What could make a invoke lstrcpy, edi, esi choke?
start:
push esi
invoke GetCL, 1, FileName$
.if eax!=1
invoke lstrcpy, edi, esi
invoke lstrcpy, addr FileName$, addr txFileName
.endif
JJ,
It may not matter in this context but you have not presrved EDI but you have used it.
Quote from: jj2007 on July 17, 2008, 01:43:07 PM
What could make a invoke lstrcpy, edi, esi choke?
I dont know, but in such cases it might help to simplify the expression, for example just code
mov eax, lstrcpy
and, if this doesn't give a hint, create a listing and check what type lstrcpy has.
JJ,
I should have asked the question, what content is in both ESI and EDI ?
jj,
Assuming I provide a suitable definition for FileName$ and txFileName, your code assembles without error for me.
Also, GetCL expects a buffer address.
Thanks for all your help. It seems a bit more tricky: When I insert a dummy call to a macro, the warnings disappear. Look for dummy in FIF.asm in the attachment. Apparently it has something to do with the order of definitions.
start:
push esi
.if 0
FindString 0, FS$ ; dummy call to the macro helps - comment out to see the difference
.endif
[attachment deleted by admin]