简体   繁体   中英

conditional compile between windows server 2008 and windows server 2008 R2

There are changes in few OS structures in R2(eg. vds provider) from w2k8.

So how do I conditional compile my source to appropriate version? or will I need to ship complete different projects for R2 and w2k8.

_

If possible I want preprocessor ifdef flag like _WIN32_WINNT and WINVER.

I want to avoid using SDK to detect version. But if there is no flag(accodring to my googling skills) kindly suggest the method to find OS version via SDK.

Once you use conditional compilation you bind to one setup - either pre-R2 or R2 and this can't be changed during runtime. You either need to ship two versions or have one version that will behave differently in runtime - check the OS version (in runtime, not in compile time) and behave appropriately during each OS-dependent operation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM