Search code examples
windowswinapikernel32

CreateToolhelp32Snapshot could not be located in kernel32.dll error message


When launching my application in Windows NT machine (Ver. 4.0 SP6), I get the below error message and the application does not get launched. However, the same app gets launched on Windows XP and works fine.

The Message reads as below:

"The procedure entry point CreateToolhelp32Snapshot could not be located in the dynamic link library KERNEL32.dll"

Any idea/fix? Please help

Thanks,

Nayan


Solution

  • From the reference page for CreateToolhelp32Snapshot():

    • Minimum supported client | Windows XP [desktop apps only]
    • Minimum supported server | Windows Server 2003 [desktop apps only]

    so the function is not available on NT. A possible alternative would be to use EnumProcesses() in conjunction with OpenProcess(). See the example Enumerating All Processes.