建議使用 Visual Studio 2017

C28125

 

如需 Visual Studio 2017 的最新文件請參閱 Visual Studio 2017 文件

warning C28125: The function must be called from within a try/except block

驅動程式正在呼叫函式,必須從 try/except 區塊內呼叫,例如 ProbeForReadProbeForWriteMmProbeAndLockPages

下列程式碼範例會產生此警告:

ProbeForRead(addr, len, 4);  

下列程式碼範例可避免此警告:

  
__try  
{  
    ProbeForRead(addr, len, 4);  
}  
__except(EXCEPTION_EXECUTE_HANDLER)  
{  
    Status = GetExceptionCode();  
    ... report error status  
}  

顯示: