Problem in displaying image through CPictureHolder
-
Hi we are using CPictureHolder in order to display image through data. This data nothing but CString. we are doing the dcode(converting into byte) and creating the byte into CMemfile object. The problem is few image data not displaying the image. i am using below code. hr = ::OleLoadPicture(lpStream, maxLen, FALSE, IID_IPicture, (LPVOID*)&m_pPict); hr return as E_FAIL for some image data. please let me know what could be reason. Regards Gopal
-
Hi we are using CPictureHolder in order to display image through data. This data nothing but CString. we are doing the dcode(converting into byte) and creating the byte into CMemfile object. The problem is few image data not displaying the image. i am using below code. hr = ::OleLoadPicture(lpStream, maxLen, FALSE, IID_IPicture, (LPVOID*)&m_pPict); hr return as E_FAIL for some image data. please let me know what could be reason. Regards Gopal
From documentation:
This function returns S_OK on success. Other possible values include the following.
Return code
description
E_NOINTERFACE
The object does not support the specified interface.
E_POINTER
The stream is not valid. For example, it may be NULL.
So what's the actual return value you got? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
From documentation:
This function returns S_OK on success. Other possible values include the following.
Return code
description
E_NOINTERFACE
The object does not support the specified interface.
E_POINTER
The stream is not valid. For example, it may be NULL.
So what's the actual return value you got? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Hi Returning as E_FAIL. but same image datai have used in C# using xmlreader it works fine.
-
Hi Returning as E_FAIL. but same image datai have used in C# using xmlreader it works fine.
That's in sharp contrast with the documentation. What is the numerical value?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
That's in sharp contrast with the documentation. What is the numerical value?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Hi Numerical value means is it hr return value. if not how do i get it numerical value
-
Hi Numerical value means is it hr return value. if not how do i get it numerical value
Gopal_Kanchana wrote:
Numerical value means is it hr return value
Yes I would like to know
hr
numerical value. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Hi Numerical value means is it hr return value. if not how do i get it numerical value
Hi I am using DWORD to fine numerical value. I getting this value (2147500037) conver into Hex(80004005). it says that (#define OLE_E_NOTRUNNING _HRESULT_TYPEDEF_(0x80040005L));