0

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

Alex K.
  • 171,639
  • 30
  • 264
  • 288
Nayan Soni
  • 1,001
  • 3
  • 12
  • 22
  • NT **4**? That API does not exist on that platform, it was introduced in XP so the software is clearly not compatible. – Alex K. Oct 30 '12 at 12:56

1 Answers1

2

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.

hmjd
  • 120,187
  • 20
  • 207
  • 252
  • The MSDN documentation is misleading. It was in fact introduced in Windows 2000. – David Heffernan Oct 30 '12 at 13:34
  • @DavidHeffernan, misleading is putting mildly! – hmjd Oct 30 '12 at 14:27
  • It's a very common trap to fall into. When MS update their API docs they update min OS to the min supported at the time when the doc is updated. So you can still find some that declare Win2000 to be the min OS. For example `CloseHandle`. Of course once upon a time that doc listed NT3 as min level. It pays to keep around a copy of your MSDN docs subscription DVD from 10 years ago! – David Heffernan Oct 30 '12 at 14:40