I have v1 and v2 versions of my software. v1 uses the registry to save settings, with lots of calls to GetProfileInt, etc. v2 now uses an sqlite db to save settings.
<
Since this answer is accepted I might as well include the solution the asker actually used:
jacobsee discovered the deprecated pragma
#pragma deprecated(GetProfileInt)
You may be able to declare them as deprecated using __declspec(deprecated)
. It would look like this:
UINT __declspec(deprecated) WINAPI GetProfileInt(
__in LPCTSTR lpAppName,
__in LPCTSTR lpKeyName,
__in INT nDefault
);
You'll have to do so from a header that is included in every translation unit you care about. Doing so will result in a warning any time a translation unit that includes the deprecated declaration uses that function.
If you want a compiler error and if your project doesn't already treat warnings as errors then you'll have to turn that on, and maybe fix all the warnings you've been ignoring. (These are good practices whether you use this solution or not.)