ResEd is chopping off auto-export filename

Started by Shantanu Gadgil, December 04, 2007, 05:06:00 PM

Previous topic - Next topic

Shantanu Gadgil

Hi,
ResEd is chopping off the filename at 9 characters:

e.g.:
If I specify the filename "res123456789", it saves the auto-export file name as "res123456"

I tracked the save and auto export operation till:
.if nmeexp.fAuto
    invoke SendMessage,hProject,PRO_EXPORTNAMES,1,hOut
.endif

in the function "SaveProject"

but was completely lost as to where it is going from there!!!  :dazzled: :dazzled: :dazzled:

Any help would be appreciated!

Regards,
Shantanu
To ret is human, to jmp divine!

Shantanu Gadgil

... further digging around ... the RAResEd.lib (228k) is used while linking, which I presume would contain the save to file code.

in the file "NameEdit.asm", in function "SaveNamesToFile" the following codes seems to be the one which looks suspicious:
GetFileName:
invoke lstrcpyn,addr tmpbuffer,offset szExportFileName,10
invoke lstrcmpi,addr tmpbuffer,offset szProject
.if !eax
lea edx,tmpbuffer
mov ecx,offset szResourceh
.while byte ptr [ecx]!='.'
mov al,[ecx]
mov [edx],al
inc ecx
inc edx
.endw
mov eax,offset szExportFileName+9
invoke lstrcpy,edx,eax
invoke lstrcpy,addr fnbuffer,addr tmpbuffer
.else
invoke lstrcpy,addr fnbuffer,offset szExportFileName
.endif


the "lstrcpyn" of 10 looks like the code which is copying only 9 chars. (resource. == resource for the filesystem)

The RAResEd project does not assemble btw... am I missing something?
I just opened the RAResEd.rap file and tried "Assemble".

it dies on lines like:
and ws, (-1 xor (WS_POPUP or WS_DISABLED or WS_MINIMIZE or WS_MAXIMIZE or WS_VISIBLE))

with error:
DlgEdit.asm(3166) : error A2022: instruction operands must be the same size
To ret is human, to jmp divine!

Shantanu Gadgil

Yippee ... problem fixed .... the ",10" was the problem as suspected!!! The auto export filename gets saved correctly now!!!

(BTW, I am using ML.EXE version 8.0 ... so the error message could be v8 specific, dunno!)

There were other errors along the way ...

I fixed the offending code in the RAResEd with the equivalent expanded code:

;and ws, (-1 xor (WS_POPUP or WS_DISABLED or WS_MINIMIZE or WS_MAXIMIZE or WS_VISIBLE))

becomes:

mov eax, -1
xor eax, (WS_POPUP or WS_DISABLED or WS_MINIMIZE or WS_MAXIMIZE or WS_VISIBLE)
and ws, eax


MASM happy ... code assembles ... me happy!!!  :bg :bg :bg

There were some more errors:
PopUAll dd -1 xor WS_POPUP,0
dd -1 xor WS_POPUP,WS_POPUP


wrror message:
Property.asm(183) : error A2071: initializer magnitude too large for specified size

That was fixed by making the "-1" as "0ffffffffh"

After all this ... I don't know whether the entire ResEd is in an OK state !!! Too tired to verify that it works OK.

Cheers, Thanks and Regards,
Shantanu
To ret is human, to jmp divine!