R
raashid bhatt
how to print something with out calling libc functions like printf ,
puts etc..
This is the direct method how libc printf works on windows
so why not use this one and get rid of MSVCRT.DLL linking
but make suer to link it with kernel32.lib
#include <windows.h>
int __stdcall main(int argc, char **argv)
{
HANDLE handle;
handle = GetStdHandle(STD_OUTPUT_HANDLE);
WriteFile(handle, "hello world!", 12, NULL, NULL);
CloseHandle(handle);
return 0;
}
link /ENTRY:main program.obj kernel32.lib
puts etc..
This is the direct method how libc printf works on windows
so why not use this one and get rid of MSVCRT.DLL linking
but make suer to link it with kernel32.lib
#include <windows.h>
int __stdcall main(int argc, char **argv)
{
HANDLE handle;
handle = GetStdHandle(STD_OUTPUT_HANDLE);
WriteFile(handle, "hello world!", 12, NULL, NULL);
CloseHandle(handle);
return 0;
}
link /ENTRY:main program.obj kernel32.lib