Re: GETFILE() Inside .Zip files?

Tech-Archive recommends: Fix windows errors by optimizing your registry



To be technical, it's NOT part of Windows Explorer. It's the Windows API.

I've never seen any documentation on it, but I wouldn't be looking. I'm a
registered DynaZip user so I bring my own to the party. ;-)

I'm just pointing out that there MAY be an issue. This isn't the first time
I've seen it come up, and this isn't the only community I've seen it come up
in. You can feel free to believe anything you like.

I've seen a very visible MVP stripped of his award status for using a public
API in Visual Studio in violation of the EULA for that product. I've seen
Microsoft sue a kid named Mike Rowe for using his own name in a domain name.

Dispense all the free legal advice you want, but please do so with full
disclosure of your legal qualifications. :-)

Dan


Cy Welch wrote:
We're talking about the built in zip handling capabilities of windows
explorer. MS would not document how to do it on their website for
use by programmers if they didn't consider it licensed for use.


"Dan Freeman" <spam@xxxxxxxxxxxxx> wrote in message
news:#buZkMl6HHA.3900@xxxxxxxxxxxxxxxxxxxxxxx
I wouldn't be so sure that "because it's there" means you have
permission to use it. Are you allowed to redistribute Foxpro's
Upsizing Wizard? (answer: no) Yet it's provided for your use in
appropriate context. In the case of DynaZip, though, the product
itself is inexpensive enough I wonder why anyone would hesitate to
just buy it and cast aside all doubt. Never fails to amaze me. Software
developers tend to be the worst
offenders when it comes to software copyright infringement. YOU
expect to be paid for YOUR work, but you don't want to pay for
someone else's work.
shrug::

Dan

Cy Welch wrote:
I'm pretty sure that is inaccurate information as MS would certainly
not provide API's to use that functionality if that was the case.
Also, it would be MS on the hook, and I'm pretty sure that dynazip
people don't want to take them on over that (as I'm sure that MS has
made sure that the license they have lets users use the
functionality programatically).

"Steve Meyerson" <stevemeyerson@xxxxxxx> wrote in message
news:lvo8d3lqp315hth7m3ota74e4gpu72t59e@xxxxxxxxxx
And we're supposed to know each part of XP Shell distributed (free)
by Microsoft, specifically which part is covered by which license?
Only "The Zipper" would know.
Steve (Not The Zipper)

On Tue, 28 Aug 2007 12:46:14 +0200, "Frédéric Steczycki [AtoutFox]"
<frederic.armoni@xxxxxxxxx> wrote:

Heya Rog "Joly Jumper" !

A nice one, i have a little "damper" though <s> ...
About 2 years ago (Mike Gagnon pointed this one to me), there was
a thread on UT about this solution.
Someone (surely from Dynazip) point this out :

"Third-party sub-licensing for using the Windows XP Shell zip
folders via programatic or automated means is not covered by
Microsoft's DynaZip license. To use DynaZip's facilities and
programatic interfaces either directly or indirectly, a developer
must have a valid, legal license to DynaZip. Please warn your
readers that they will be exposed legally if they intend to use
the Windows XP zip folders facilities via programatic or automated
means without acquiring a license." Fred

"Roger Ansell" <notmy@xxxxxxxxxxxxxxxxxxxx> a écrit dans le
message de news:
%23N4cf5B6HHA.1188@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

There is a way which doesn't rely on third-party tools and
you can use VFP's standard GetFile dialog.
OK, your user gets the zip file name he wants to extract from
GetFile(). You then extract the path and file name to
separate variables, eg:

lcFile = GetFile()
lcPath = JustPath(lcFile)
lcZipFile = JustFname(lcFile)

* Let's specify the destination path
* so your user doesn't have to intervene:

lcDestPath = "C:\MyApp"

* Now comes the tricky part <s>

Local loShell As "Shell.Application"
loShell = CreateObject("Shell.Application")
* Get a folder object for the source path:
loFolder = loShell.NameSpace(lcPath)
* Get a collection of the files in the folder:
loItems = loFolder.Items
* Now let's find the zip file we want:
For Each loItem In loItems
If Upper(loItem.Name) == Upper(lcZipFile)
* We've found the target zip file
loZip = loItem
Exit
EndIf
Next

* Return a folder object for the zip file
loZipFldr = loZip.GetFolder
* Get a collection of all the files in the zip
loZipItems = loZipFldr.Items
* Specify the destination folder object
loDestFolder = loShell.NameSpace(lcDestPath)
* Copy from the zip to the destination
loDestFolder.CopyHere(loZipItems)

All done!

HTH

-Roger

BTW there's an additional optional parameter
to the CopyHere() method which allows you to
handle how the extraction occurs.
These values are additive:
4 Do not display a progress dialog box.
8 Give the file being operated on a new name in a move, copy,
or rename operation if a file with the target name already
exists. 16 Respond with "Yes to All" for any dialog box that is
displayed. 64 Preserve undo information, if possible.
128 Perform the operation on files only if a wildcard file name
(*.*) is
specified.
256 Display a progress dialog box but do not show the file
names. 512 Do not confirm the creation of a new directory if the
operation requires one to be created.
1024 Do not display a user interface if an error occurs.
2048 Version 4.71. Do not copy the security attributes of the
file. 4096 Only operate in the local directory. Don't operate
recursively into subdirectories.
9182 Version 5.0. Do not copy connected files as a group. Only
copy the specified files.





"Steve Meyerson" <stevemeyerson@xxxxxxx> wrote in message
news:6j01d3lnm449p6cuisk70lan75qecm3kl8@xxxxxxxxxx
The GETFILE() dialog window in VFP8 & 9 closes when I select a
file with the .zip extension and the function returns the path
and name of the .zip file.

Is there a way in VFP to display and select a file inside the
.zip file, as in Windows Explorer?

TIA

Steve M.


.



Relevant Pages

  • Re: GETFILE() Inside .Zip files?
    ... a license from DynaZip and an unsourced quote from an ... Someone (surely from Dynazip) point this out: ... Get a folder object for the source path: ... 256 Display a progress dialog box but do not show the file names. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: GETFILE() Inside .Zip files?
    ... DynaZip, though, the product itself is inexpensive enough I wonder why ... made sure that the license they have lets users use the functionality ... Get a folder object for the source path: ... 256 Display a progress dialog box but do not show the file names. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: GETFILE() Inside .Zip files?
    ... Technically the "zip" module in windows can't even be used by your software... ... made sure that the license they have lets users use the functionality ... Get a folder object for the source path: ... 256 Display a progress dialog box but do not show the file names. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: GETFILE() Inside .Zip files?
    ... Inner Media licensed Microsoft to use Dynazip technology ... OTOH I paid Microsoft for a license to use WinXP. ... Get a folder object for the source path: ... 256 Display a progress dialog box but do not show the file names. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: How to add a user with very limited rights
    ... The Windows Server 2003 External Connector license is an optional ... An EC license is not applicable to Web Edition or Windows Small Business ... For more information about External Connector License, ...
    (microsoft.public.windows.server.sbs)