Search code examples
winapimasmirvine32

how Irvine32.lib makes a few unsupported functions available in VC


With Irvine32.lib linked, and irvine32.inc included, I can invoke a few functions that VC originally does not support, such as Clrscr() or Gotoxy().

VC has never supported those functions.

So if I invoke Clrscr() somewhat, then the actual binary data for Clsscr() must be fired from some OS supported dlls such as ntdll.dll or kernel32.dll, both of which, however, clearly do not have it supported.

I Dumpbin-ed Irvine32.lib but I could not find the location from which that function is called.

How does Irvine32.lib magically make it available to call the unsupported functions I mentioned?

Thanks in advance.


Solution

  • The code for Irvine is available! If you looked at it you would see that Kip, used the following Win32 API calls to implement his versions:

    Clrscr
    GetConsoleScreenBufferInfo
    WriteConsoleOutputCharacter
    WriteConsoleOutputAttribute
    SetConsoleCursorPosition

    Gotoxy
    SetConsoleCursorPosition

    If you don't like his ways, you could always implement your own versions.