Heres my declaration and useage:


*******declaration file:

public SSTRINGBASE

.data
align 4

SSTRING STRUC [DWORD]
hdl dd 0
len dd 0
sta dd 0
lst dd 0
rw1 dd 0
rw2 dd 0
new dd offset ns
mvs dd offset ms
srw dd offset rws
SSTRING ENDS

SSTRINGBASE SSTRING<>

******useage file:

extern SSTRINGBASE:dword

.code
start:
align 4
.
.
call PLCALL ptr SSTRINGBASE.new;*****linker complains of undefined symbol?
.
.
*******special note, this works:

call PLCALL ptr SSTRINGBASE


I've looked thru code I've written using external structures before. Any idea what I am missing? Thanks.
Posted on 2002-07-17 05:19:11 by ThoughtCriminal
Replace extern on :

extern SSTRINGBASE:SSTRING
Posted on 2002-07-17 10:20:06 by Nexo
I've got to suggestions
1) you will need brackets as in
call (PLCALL ptr SSTRINGBASE).new
2) PLCALL must have a "new" member. I suggest you replace PLCALL with SSTRING or typedef it. Unless PLCALL and SSTRING are the same then you'll get unexpected results(if PLCALL has a "new" member).
call (SSTRING ptr ).new
or mov eax,SSTRINGBASE
call (SSTRING ptr ).new

****call PLCALL ptr SSTRINGBASE****
I'm sure you'll find if you substituted anything else for PLCALL the above line would still work. but as you found try referencing a structure member and everything falls apart
Posted on 2002-07-17 15:57:22 by MArtial_Code
I haven't tried yet, but I think Nexo hit it on the head.

MArtial_Code-

Here is how I get PLCALL

LCALL typedef proto
PLCALL typedef ptr LCALL

It's for calling to a label.

Thanks for the help.
Posted on 2002-07-17 21:57:47 by ThoughtCriminal