clGetPlatformIDs Heap Corruption

I am using a library called isph: http://isph.sourceforge.net/ (note: this problem has also happened with other libraries using OpenCL)

I run this code and get an error message:

cl_platform_id PIDs[4];

clGetPlatformIDs(4, PIDs, &platformCount);

platforms = new CLPlatform*[platformCount];

Write after the call to clGetPlatformIDs I get these error messages:

Windows has triggered a breakpoint in console.exe

This may be due to a corruption of the heap, which indicates a bug in console.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while console.exe has focus.

The output window may have more diagnostic information
Critical error detected c0000374
Unhandled exception at 0x7799e6c3 in console.exe: 0xC0000374: A heap has been corrupted.

I really have no idea why this is happening. It seems to happen with every OpenCL library I check out on the exact same call to clGetPlatformIDs.

My specs:

Windows 7 x64

9600gt

Visual Studio 2010 Ultimate

CUDA 4.1

Let me know if you need any more information.