NVAPI Reference Documentation
NVIDIA
Release 550
Wed Mar 20 2024

Deprecation Warnings

All legacy APIs will be deprecated if a replacement is available. When an API is deprecated, it still remains in the code. However, any attempts to use it will result in a warning message recommending alternative APIs and stating that the API will be removed in the future - the API will not remain in the code indefinitely.

As the API is not removed immediately, this gives the client time to bring their code into compliance with the new APIs.

Example of Some Warnings

error C2220: warning treated as error - no 'object' file generated
warning C4996: 'NvAPI_GPU_GetConnectedOutputs': Do not use this function -
it is deprecated in release 290.
NVAPI_INTERFACE NvAPI_GPU_GetConnectedDisplayIds(__in NvPhysicalGpuHandle hPhysicalGpu, __inout_ecount_part_opt(*pDisplayIdCount, *pDisplayIdCount) NV_GPU_DISPLAYIDS *pDisplayIds, __inout NvU32 *pDisplayIdCount, __in NvU32 flags)

How to Avoid Warnings

There are two courses of action that clients should take to avoid being presented with the warnings. These include a short term phase and a long term phase:

Phase-I (short term):

  • Option 1: Ignore the warning by using CFFLAG. Add “CFLAGS += -wd4996” and “CFLAGS += -wd4995”
  • Option 2: Don't use CFLAG, which treats the warning as an error. Remove “CFLAGS += -WX” from the make file.

Phase-II (long term): Clients need to avoid using the deprecated APIs and switch to the replacement APIs.


NVIDIA
Copyright (c) 2007–2024 NVIDIA Corporation. All rights reserved.

NVIDIA