Module: wine Branch: master Commit: 7b475390e4a661a60c708097850c411cb4ae4ca4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7b475390e4a661a60c70809785...
Author: Andrew Eikum aeikum@codeweavers.com Date: Fri Oct 9 10:53:31 2009 -0500
ole32: Use rgiidExclude in StorageImpl::CopyTo.
---
dlls/ole32/storage32.c | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 9c38a65..b9c2f29 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -1462,10 +1462,8 @@ static HRESULT WINAPI StorageImpl_CopyTo( HRESULT hr; IStorage *pstgTmp, *pstgChild; IStream *pstrTmp, *pstrChild; - BOOL skip = FALSE; - - if ((ciidExclude != 0) || (rgiidExclude != NULL)) - FIXME("Exclude option not implemented\n"); + BOOL skip = FALSE, skip_storage = FALSE, skip_stream = FALSE; + int i;
TRACE("(%p, %d, %p, %p, %p)\n", iface, ciidExclude, rgiidExclude, @@ -1488,6 +1486,16 @@ static HRESULT WINAPI StorageImpl_CopyTo( IStorage_Stat( iface, &curElement, STATFLAG_NONAME); IStorage_SetClass( pstgDest, &curElement.clsid );
+ for(i = 0; i < ciidExclude; ++i) + { + if(IsEqualGUID(&IID_IStorage, &rgiidExclude[i])) + skip_storage = TRUE; + else if(IsEqualGUID(&IID_IStream, &rgiidExclude[i])) + skip_stream = TRUE; + else + WARN("Unknown excluded GUID: %s\n", debugstr_guid(&rgiidExclude[i])); + } + do { /* @@ -1518,6 +1526,9 @@ static HRESULT WINAPI StorageImpl_CopyTo(
if (curElement.type == STGTY_STORAGE) { + if(skip_storage) + continue; + /* * open child source storage */ @@ -1571,6 +1582,9 @@ static HRESULT WINAPI StorageImpl_CopyTo( } else if (curElement.type == STGTY_STREAM) { + if(skip_stream) + continue; + /* * create a new stream in destination storage. If the stream already * exist, it will be deleted and a new one will be created.