Creating named tempfiles

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Wed Feb 4 02:24:45 PST 2015


On Wednesday, 4 February 2015 at 08:33:57 UTC, Jonathan M Davis 
wrote:
> On Wednesday, February 04, 2015 08:18:46 Kagamin via 
> Digitalmars-d wrote:
>> You got it declared with stdcall convention, should change to
>> cdecl.
>
> Well, I have it as extern(Windows) like everything else in
> core.sys.windows.windows - it has extern(Windows): at the top. 
> Should that
> be something else in this case? I'm not at all familiar with 
> the Windows
> calling conventions.
>
> - Jonathan M Davis

Functions in <io.h> are low-level I/O API, providing POSIX-style 
wrappers for winapi functions: 
https://msdn.microsoft.com/en-us/library/40bbyw78.aspx - you can 
see them documented as part of C runtime library. The 
declarations should be somewhere core.sys.windows.io, see for 
example core.sys.windows.stat.
Everything in C runtime library uses C calling convention, 
because that's a library special for C, which makes it working. C 
is C, Windows is Windows, that's the difference. There can be Ada 
runtime library, which will use whatever calling (and naming) 
convention native to Ada, there can be Pascal runtime library, 
which will use whatever calling convention native to Pascal, 
there can be Haskell runtime library, which will use whatever 
calling convention native to Haskell, and so on. C has runtime 
library too.


More information about the Digitalmars-d mailing list