The @16 is not an ordinal, it's the number of arguments on the stack in
bytes.
The .rbuild should define 4 things:
1) Function convention (@fastcall@x, _stdcall@x or _cdecl)
2) Bytes on stack (only relevant for stdcall and fastcall)
3) Ordinal, optional
4) Forward/alias, optional
On Nov 23, 2007 7:04 PM, Marc Piulachs <marc.piulachs(a)codexchange.net>
wrote:
Hi All,
I have lately seen a big effort to make more modules compilable under
Visual C , one of our current problems when building dlls is that our .def
files are mingw/gcc specific not directly compatible with msvc or any other
future compiler we may support. Currently we are using not very elegant
solutions to archive compatibility with msvc like stripping some information
from mingw def files. As Alex suggested I think it's a good idea to move
that information to rbuild files and let rbuild generate full compatible
compiler def files in the intermediate folder. The advantages are obvious.
As I have little experience with mingw def files I would like to request
some help from other developers to evaluate/validate my proposal.
From my research on the ros codebase I have found that possible
variations:
- CcRosInitializeFileCache@8
- FsRtlGetFileSize
- @HalExamineMBR@16
- PsChargeProcessNonPagedPoolQuota@4=PsDereferenceImpersonationToken@4
- ConvertSecurityDescriptorToAccessNamedA=
ConvertSecurityDescriptorToAccessA@28
- GetSecurityDescriptorLength(a)4=NTDLL.RtlLengthSecurityDescriptor
- ??1type_info@@UAE@XZ=__thiscall_MSVCRT_type_info_dtor @15
- ChkdskEx=VfatChkdsk@24
My proposed syntax is as following and it should support all of the above
cases:
<exportfunction name="CcRosInitializeFileCache" ordinal="8" />
(required)
(optional)
<exportfunction name="CcRosInitializeFileCache" ordinal="8"
mappedname="PsDereferenceImpersonationToken" mappedordinal="4"/>
(required)
(optional) (optional)
(optional)
<exportfunction name="GetSecurityDescriptorLength" ordinal="4"
mappedname="RtlLengthSecurityDescriptor" mappedordinal="4"
module="ntdll"/>
(required)
(optional) (optional)
(optional) (optional)
With this information rbuild will generate a modulename_gcc.def when you
type "make" and modulename_msvc.def on the intermediate folder when you type
"make msvc".
Opinions, comments?
Regards,
Marc
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
--
Best regards,
Alex Ionescu