I have a resource file which has JPG's as custom resource. The problem is that i am not able to load the jpg into a variable of type "IPictureDisp" using either LoadResData or even LoadResBitmap. If I directly load the jpg using loadpicture function(using the jpg file name), it works smoothly.

Am I using the wrong datatype or is there some other way to load JPg's from a resource file.