#define WIN32_LEAN_AND_MEAN 的作用

WIN32_LEAN_AND_MEAN

简洁的来说,定义WIN32_LEAN_AND_MEAN以排除加密、DDE、RPC、Shell 和Windows套接字等 API,文档在这

该宏在源码中是这样的:

C++
#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
#include <dlgs.h>
#ifndef _MAC
    #include <lzexpand.h>
    #include <mmsystem.h>
    #include <nb30.h>
    #include <rpc.h>
#endif
#include <shellapi.h>
#ifndef _MAC
    #include <winperf.h>
    #include <winsock.h>
#endif
#ifndef NOCRYPT
    #include <wincrypt.h>
    #include <winefs.h>
    #include <winscard.h>
#endif
#ifndef NOGDI
    #ifndef _MAC
        #include <winspool.h>
        #ifdef INC_OLE1
            #include <ole.h>
        #else
            #include <ole2.h>
        #endif /* !INC_OLE1 */
    #endif /* !MAC */
    #include <commdlg.h>
#endif /* !NOGDI */
#endif /* WIN32_LEAN_AND_MEAN */
qrcode

创建时间:2020-04-21 02:54:00

最后修改:2023-02-03 06:54:34