FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Dobbs M-Dev
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
February 01, 2003

Avoiding the Visual C++ Runtime Library

(Page 5 of 16)
February 2003/Avoiding the Visual C++ Runtime Library

Listing 10 Initializing constant variables


extern "C"
{
    unsigned int _osver;
    unsigned int _winver;
    unsigned int _winmajor;
    unsigned int _winminor;
}

int WINAPI WinMain( ... )
{
    _osver = GetVersion();

    _winminor = (_osver >> 8) & 0x00FF ;
    _winmajor = _osver & 0x00FF ;
    _winver = (_winmajor << 8) + _winminor;
    _osver = (_osver >> 16) & 0x00FFFF ;
}

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK