News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Number and type of arguments required for call to C library

Started by jj2007, May 21, 2014, 10:21:19 PM

Previous topic - Next topic

GoneFishing

Next item to my TODO list:
I'll try the code from this brilliant article with zip folders as a target  .

dedndave


GoneFishing

Well , as it always happens - in order to find right solution we must take a pause till the spontaneous insight  :t
Part two contains reference to
Reading a contract from the other side: SHSetInstanceExplorer and SHGetInstanceExplorer article .


dedndave


GoneFishing

Sad to say but I cannot try it immediately in MS VS and under the debugger 

dedndave

you're not missing any fun

QuoteIt seems that zipfldr.dll does not call SHGetInstanceExplorer despite creating worker threads.
This may be a bug in zipfldr.dll.

my guess is that it's not a bug
rather, a more involved method is used
but - this may give me a clue where to look
i can look at the thread code in zipfldr.dll

GoneFishing

I found the origin of the quote :manipulating zipfldr.dll to create a Compressed folder
no doubt that it's not a bug
I'll look into the zipfldr's thread too

dedndave

i tried watching the reference count 3 ways:
IID_IShellDispatch
IID_Folder
IID_FolderItems

no luck on any of that

i have seen several examples where they look at Items.Count
that's probably a good method about 99.9% of the time - lol
just because the count is correct does not mean the last item was completely zipped and added

dedndave

the Items.Count method would be reliable if we added a "bogey" item to the list
if we could be sure it was the last item to be added, we would know all the other items were complete

seems like a hack, but a good one   :biggrin:

adeyblue

Went back and looked at the 'doesn't use a separate thread' IStorage method, swapped one hack for another and success! Single thread zipping - with subfolders.

Except, it doesn't work on XP. And you can't have two files anywhere in the zip with the same filename (zipfldr helpfully decides that temporary files it's completely done with should be read-only), and I'm sure there's something else I've forgotten.

So yeah, quite a lot of restrictions unless another mass of zipfldr owned hoops are jumped through. If nothing else it's an example of how to loop through directories and copy them somewhere else with the shell interfaces.

dedndave

 :t

still, nice to have an IStream example - useful for other things, too

Gunther

You have to know the facts before you can distort them.

sinsi


dedndave

Raymond Chen is a MS programmer, that often blogs about code (see Sinsi's link)
he usually has a pretty good grasp on the code
and - i always learn by reading from the comments section, too
the same is true on CodeProject - the comments are a must-read

Gunther

Dave, Sinsi,

thank you for that information.  :t

Gunther
You have to know the facts before you can distort them.