- Add
kernel32.lib
toIgnore Specific Default Libraries
.
But don't removekernel32.lib
fromAdditional Dependencies
. - Set
Additional Dependencies
tofileextd.lib;ntdll.lib;%(AdditionalDependencies)
.
Order is important.fileextd.lib
must come beforekernel32.lib
. - FileExtd.lib was not created with __declspec(dllimport) in mind. Need to take precautions against the _imp__ symbol.
Do either.#define WINBASEAPI
before#include <windows.h>
. Although this is easy, keep in mind that it affects the entire source file.
- Override
__imp__SetFileInformationByHandle@16
using assembly.