Download cabinet sdk




















This item does not appear to have any files that can be experienced on Archive. Please download files in this item to interact with them on your computer. Show all files. Uploaded by feudalnate on June 20, Internet Archive's 25th Anniversary Logo. Cab is a file extension for a cabinet file for microsoft windows systems. The cab file isnbsp scegli windows software development kit e microsoft. Article id:. The cabinet software development kit sdk is available from the microsoft download center.

The original microsoft cabinet sdk software development kit is no longer available at the microsoft website. This article is just about the API. Currently, I have only created classes for extracting cabinet files, but I might extend the classes in future to support existing and new cabinet files as well. First of all, let me tell you why I decided to create these classes.

It needs a lot of repetitive tasks which are quite common when working with cabinet files. That led me to the idea of creating wrappers that implement these common tasks so I don't have to write the same code all over again. There already are a couple of articles around that provide excellent classes to work with cabinet files, but unfortunately, they don't meet my needs.

I want a wrapper with the following properties:. It is the last property that none of the implementations I found so far provide. After all, it is very bothersome and inefficient to have to store a cabinet on disk so you can extract it and delete the file again while you could have done the same in memory. With these templates, it will be relatively easy to extract a cabinet through any electronic medium you desire. I have chosen to use templates for their efficiency, because I don't need virtual functions this way which is not even possible on static functions, while it is with templates, as you can see in the source code.

Another advantage of 'virtual' functions through templates instead of normal virtual functions is compile time linking instead of runtime linking, meaning the compiler can make optimizations.

However, this is no article about templates, but about cabinet files, so I'll try to stay focused. Using it is fairly easy. It cannot be instantiated directly, so you will have to write a subclass on it.

There is an empty subclass CCabinet , but I do not recommend to use that one, because the only thing it can do is to extract every file in the cabinet the default behavior from CCabinetT. For this article, I will define a new class named CCabinetTutorial. For now, I will declare it like this:. Is that all, you wonder? Yes, that is all. This is exactly how CCabinet is defined. CCabinetT provides all functionality to extract files from a cabinet file.

So, let's take a look on how it should be used. The following fragment shows how to extract all files from tutorial. Those of you who have worked before with the Cabinet API will immediately recognize the four functions that get shown here. Those who don't will probably wonder what on earth an FDI context is. Let me try to explain this to you.

As these templates are only capable of decompressing cabinet files, we will only use the FDI. Apart from the FDI context, this small example should be pretty self-explanatory. It creates the context, checks if the target file is a valid cabinet file, and extracts to the specified folder. After that, it cleans up the resources we used. But wait a minute! What if we don't want to extract all files from a cabinet? Simple, we only have to override some functions. CCabinetT allows the subclasses to overwrite the following functions as if they are virtual :.

I will start with explaining the functions marked bold. The OnCabinetInfo function gets called when a new cabinet file gets opened. The parameters contain some basic information about the contents of the cabinet. OnCopyFile gets called when a file is about to be copied, and you can allow or disallow the file to be copied with the return value.

OnCopyFileComplete gets called when a file is extracted, and OnNextCabinet is called when the contents of the cabinet span over multiple cabinet files. You will have to make sure the next cabinet file is accessible before returning, for instance, by providing the user the chance to insert another disk. So, let's redo CCabinetToturial to implement these functions.

It's as simple as that! I will now discuss the next two overridables:. As you might have already guessed, these two functions provide memory management. You can override them like this:. For more information, see Using Cabinets and Compressed Sources. Large files can be split between two or more cabinet files. There can be no more than 15 files in any one cabinet file that spans to the next cabinet file. For example, if you have three cabinet files the first cabinet can have 15 files that span to the second cabinet file and the second cabinet file can have 15 files that span to the third cabinet file.

The installer extracts files from a cabinet as they are needed by the installation and installs them in the same order as they are stored in the cabinet file. The space requirements for installing a file stored in a cabinet are no different than for installing an uncompressed file.



0コメント

  • 1000 / 1000