Quote Originally Posted by LaVolpe View Post
Start with the last few posts on previous page and post #562 on this page.
Got it, passed an hour reading your material and reference on MSDN. it raised some question... (see below)

Quote Originally Posted by LaVolpe View Post
If passing the handle worked but passing the picture object did not work, then what I described in my previous reply is the reason. Just FYI.
Forgive me, can you be more specific ? What cause the problem ?

Ok, here from component 2.1.32
Code:
    If ipic.KeepOriginalFormat Then
        ipic.SaveAsFile ByVal ObjPtr(IStream), False, lResult
        If lResult = 0& Then ipic.SaveAsFile ByVal ObjPtr(IStream), bSaveMemCopy, lResult
    Else
        ipic.SaveAsFile ByVal ObjPtr(IStream), bSaveMemCopy, lResult
    End If
Of, I'm not sure I understand something...
bSaveMemCopy is Declared as Boolean but never Initialized... (so it was false all the time) So Let replace all code but removing the unused bSaveMemCopy

We got this:
Code:
    If ipic.KeepOriginalFormat Then
        ipic.SaveAsFile ByVal ObjPtr(IStream), False, lResult
        'old: If lResult = 0& Then ipic.SaveAsFile ByVal ObjPtr(IStream), bSaveMemCopy, lResult
        'If lResult = 0& Then ipic.SaveAsFile ByVal ObjPtr(IStream), False, lResult
    Else
        'old: ipic.SaveAsFile ByVal ObjPtr(IStream), bSaveMemCopy, lResult   'Wich MEAN FALSE
        'bug Fix 2.1.33 (not released yet)
        ipic.SaveAsFile ByVal ObjPtr(IStream), True, lResult
    End If
That work as Intended, bug fixed.. now my question is about the other part

Code:
    If ipic.KeepOriginalFormat Then
        ipic.SaveAsFile ByVal ObjPtr(IStream), False, lResult
        'If lResult = 0& Then ipic.SaveAsFile ByVal ObjPtr(IStream), False, lResult
    Else
IPicture.SaveAsFile:
IPicture.SaveAsFile Link

Return Value:
IPicture.SaveAsFile Return Value Link
E_FAIL = 0x80004005 'Unspecified failure
E_INVALIDARG = 0x80070057 'One or more arguments are not valid
S_OK = 0x00000000 'Operation successful

so, if lResult = 0 mean S_OK, why are we doing the same operation a second time ?
is there any benefit ?

just wondering... I'm confused.