This modification helped me.

In the HeapTest.c

Code:
heap ph;
And,
Then calling the HeapCreate function as

Code:
HeapCreate(&hp, 1, (heapcomparefunc)rec_cmp);
Works Fine.

Sometime during testing I faced a very strange problem. That I seen the pointer addresses were holding the previus running time values, until I restarted the system. Any solution for that?

Thanks to you for helping me so much.