The MASM Forum Archive 2004 to 2012

Project Support Forums => MASM32 => Topic started by: Rockphorr on October 19, 2006, 04:26:16 PM

Title: Update *.inc files by yourself
Post by: Rockphorr on October 19, 2006, 04:26:16 PM
I recomend to all users of masm32
1) mov all directives "include X.lib" fom the project asmfile to X.inc file (sample: include kernel32.lib to kernel32.inc)
2) replace PROTO to PROTO STDCALL
3) change .MODEL FLAT,STDCALL to .MODEL FLAT

So you can control the name decoration directly and create your prolog and epilog.
Samples:

_Some@12 PROC NEAR PUBLIC
;prolog instructions
.....
;epilog instructions
                   ret   12
_Some@12 ENDP
;-------------------------------------------------------
_Some1@12 PROC EXPORT
;prolog instructions
.....
;epilog instructions
                   ret   12
_Some1@12 ENDP
Title: Re: Update *.inc files by yourself
Post by: Vortex on October 19, 2006, 04:58:08 PM
The Win32 API system uses the STDCALL calling convention, why to replace all those PROTO STDCALLs with bare PROTOs? Specifying decorated names doesn't seem to be a nice solution for normal programming.
Title: Re: Update *.inc files by yourself
Post by: Ehtyar on October 19, 2006, 09:36:05 PM
I'd have to agree with the comment about includelib at the bottom of inc files, that never really made sense to me why that isnt done..but as far as everything else goes, all i can say is....no :U
Title: Re: Update *.inc files by yourself
Post by: Rockphorr on October 20, 2006, 04:21:54 PM
Quote from: Vortex on October 19, 2006, 04:58:08 PM
The Win32 API system uses the STDCALL calling convention, why to replace all those PROTO STDCALLs with bare PROTOs? Specifying decorated names doesn't seem to be a nice solution for normal programming.
Sometime i need the abnormal or exotic style of a programming. This "PROTO STDCALL" is a way for me to link a standard INC of LIB & DLL.