Ok!! Here is a brief description followed by the code.
I am trying to load the image from the device, and trying to get its attributes
hBmp = SHLoadImageFile(szFilePath); //szFilePath- refers to loaction of the image
// code to get the attributes of the image.
1)works absolutely fine for the lower resolution images.
2)Yes I am freeing the handle as you have said.
I am loading images of different resolutions(from higher to lower resolution).
The problem I am facing is this API wont return a valid handle when i try to load an image of higher resolution(size :640kb),but works absolutely fine for the rest of the lower resolution images.