Hello,
The attachment contains the 32-bit and 64-bit versions of the import library for Universal C Runtime. The libraries are created from the text file listing the functions exported by UCRT.
A quick example :
#include <stdio.h>
#include <stdarg.h>
extern FILE* __cdecl __acrt_iob_func(unsigned Index);
#define _stdin (__acrt_iob_func(0))
#define _stdout (__acrt_iob_func(1))
#define _stderr (__acrt_iob_func(2))
char *_strupr(char *str);
unsigned long _getdrives( void );
int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE* _Stream, char const* _Format , int _Locale, va_list);
int printf(const char * format, ...)
{
int retVal;
va_list vl;
va_start(vl, format);
retVal = __stdio_common_vfprintf(0, _stdout,format, 0, vl);
va_end(vl);
return retVal;
}
int main(int argc,char *argv[])
{
char szDrvMsg[] = "A:\n";
char mystr[]="This is a string printed with UCRT printf.\n";
unsigned long uDriveMask;
printf("%s\n",_strupr(mystr));
printf("Detected logical drives:\n");
uDriveMask = _getdrives();
while (uDriveMask) {
if (uDriveMask & 1)
printf(szDrvMsg);
++szDrvMsg[0];
uDriveMask >>= 1;
}
return 0;
}
Determining the functions imported by the example code :
\PellesC\bin\podump.exe /IMPORTS Hello32.exe
Dump of Hello32.exe
File type: EXE
Imported symbols
api-ms-win-crt-stdio-l1-1-0.dll
0 time date stamp (Thu Jan 1 03:00:00 1970)
hint name
0 __acrt_iob_func
3 __stdio_common_vfprintf
api-ms-win-crt-string-l1-1-0.dll
0 time date stamp (Thu Jan 1 03:00:00 1970)
hint name
3D _strupr
api-ms-win-crt-filesystem-l1-1-0.dll
0 time date stamp (Thu Jan 1 03:00:00 1970)
hint name
15 _getdrives
KERNEL32.dll
0 time date stamp (Thu Jan 1 03:00:00 1970)
hint name
0 GetCommandLineA
0 ExitProcess