Can the FWP format of Expression Web 4.0 export web package be converted to a zip? - expression-web

Expression Web 4.0 has the ability to export content and it's dependencies (a partial website). The format it exports in is a Microsoft Expression Web 4 Web Package (.fwp). Has anyone found a utility to convert this to a zip?

That's why I get for not actually investigating further. Turns out the first four bytes are 4D 53 43 46 (MSCF) which means that it's a CAB file with a different extension.
It contains all the files which have been renamed and flattened, as well as a manifest.xml.
Should be a short exercise with XSD.exe from here to make use of it.

Related

beyondcomare4 Problem with class file comparison

I use the beyondcompare software to compare the class code, but when the software opens the class file, it prompts a conversion error!
More strange is that my local compiled class can be converted, compiled on the server, the downloaded class can not be converted
I tried to compare 2 identical classes, one is server, one is local, and jd-gui is converted to java file comparison without any difference.
I downloaded it on the official website (https://www.scootersoftware.com/download.php?zz=kb_moreformatsv4), which is your conversion tool, Java class to source
The problem is as shown below, the class on the right shows a conversion error.
(source: sinaimg.cn)
The following figure is to decompile the two classes into java code, without any inconsistency.
(source: sinaimg.cn)
It looks like the file format has a problem with Unicode/Chinese characters in the file name/path.
To fix the problem in Beyond Compare 4:
Open Tools > File Formats.
Select the Java Class to Source file format.
Go to the Conversion tab.
Change the dropdown External program (Unicode filenames) to External program (ANSI filenames), then Save.

MFC: Steps localizing MFC APP with seperate resource dlls

Before anyone bashes me with, read this first and that second, I have tried following links below to achieve internationalization with MFC.
Creating resourse DLL:
Localization of MFC Components
http://msdn.microsoft.com/en-us/library/x6h91d9w.aspx
Localization for older MFC
htp://support.microsoft.com/kb/198846/en-us
I am new to MFC so please be kind with your answers. So in order to get localization with MFC 7 and above I followed these steps. (Currently using MFC with Visual Studio11)
Created a MFC Project (MyApp) with MFC in a shared DLL
To add a another language (German) to the app, I created a win32 Dll project (MyAppDEU)
Copied the resource file (MyApp.rc) inside same folder and renamed it MyAppDEU.rc
Added the MyAppDEU.rc file to the dll project
In resource view of MyAppDEU.rc, changed the VS_VERSION_INFO -> Block header to "Deutsch (000704b0)"
Changed some strings in the string table to see the difference when the main app loads
Changed the ouput of the MyAppDEU project to build inside the MyApp Output folder
Compiled MyAppDEU to get the Dll
Compiled MyApp with and without following the instructions from point 9
http://support.microsoft.com/kb/198846/en-us
So with all these done, I failed to see any difference in my Application. It loads with the English resouce file which I created the App with. My computer has a German Windows 8 OS. From what I know MFC has inbuilt multilanguage support with Satellite Dlls. I have the correct naming format ApplicationNameXXX.dll. The dlls are in the same directory as the exe.
I hope someone can see what Im doing wrong or missing here. I am fairly new to MFC and appreciate any help regarding this.
[answer adaapted from this SO answer]
I have used a slightly different approach successfully, skipping the MFC inbuilt multilanguage support with Satellite DLLs.
We have multiple DLL projects in our solution, each one containing just one set of resources for a single language (e.g.: AppRes_ENU.DLL). At run-time InitInstance(), we select the appropriate language DLL with code like
CString sResourceDllName;
// format sResourceDllName according to the language ("%s\AppRes_%s.DLL")
hInst_aRes = LoadLibrary(sResourceDllName);
if (hInst_aRes == NULL)
{ // handle <resoure-DLL not available>
return FALSE;
}
AfxSetResourceHandle(hInst_aRes);
and use hInst_aRes to load strings, dialog boxes, ...
Have a look at this software: http://www.apptranslator.com/ . It helps with localisation using satellite dll's; the documentation probably describes how to do it. It's quite simple once you figure our the relationships between ::AfxGetResourceHandle() and hInstanceHandle and all that jazz - the easiest way to learn about that is to read the MFC source. Then you write a few helper classes and off you go :)

reading a ptd/zgy file

Is there a way to read the ptd or zgy file outside of Petrel? I have an application that would like to read the 3d seismic data that petrel holds in these formats without opening petrel to export the data into ASCII or something else. Obviously its a better user experience to just read it from my own application.
You can use zgy access C++ library deployed with Petrel. It's named Slb.Salmon.ZgyPublic.zip and located in the Petrel root folder. The archive contains binaries (native DLLs), C++ header files and documentation.
As for ptd, it is an extension of a folder name which contains files in many formats (binary, XML etc.), belonging to one project. The project's main file has pet extension, it is stored in binary format. There is no documentation on the format, it may change without notice, so you are not supposed to read those files directly.

Error when trying to zip files VB.NET 2003

I have to make a simple zip file using Visual Studio and VB.NET 2003.
After some googling I got to this page: http://www.digioz.com/tutorials/zip_unzip_vbNET/Zip_and_Unzip_VB_NET_1.html wich basically provides me 3 DLLs with classes that are ready to zip files.
When I try to create an instance of the class like the tutorial tells me to:
Dim zp As New CGZipLibrary.CGZipFiles
I get this error:
COM object with CLSID {293364BA-43F8-11D3-BC2D-4000000A2806} is either not valid or not registered.
Ideas?
If anybody got a better/easier approach to zip files using VB.NET 2003 it would be helpful too.
Thanks.
EDIT:
Thanks for all who answered, but I've used a different approach than the suggested ones to zip my files.
I used the Shell function of the Microsoft.VisualBasic.Interaction class like this:
Shell("zip -j " & fileName, AppWinStyle.Hide, True)
Thanks again for those who dedicated their time trying to help me!
It looks like that library you are trying to use is an old COM dll. That means you have to register the dll first using regsvr32.exe before you can use it. However, I would recommend using a native .NET (managed) library. Unless it doesn't meet your needs, I'd simply recommend looking at the GZipStream class which is part of the .NET framework.
Have you tried this one? This is pretty good: ionic.zip.reduced, a dotnetzip library.
Example:
Using zip As ZipFile = New ZipFile()
zip.AddFile("c:\photos\personal\7440-N49th.png")
zip.AddFile("c:\Desktop\2008_Annual_Report.pdf")
zip.AddFile("ReadMe.txt")
zip.Save("MyZipFile.zip")
End Using
More VB.NET examples of Ionic.ZIP
UPDATE:
Your problem is that VS2003 can't use the targeting of the dll which was created in a newer (eg. VS2005) version of VS. For many have tried to use that, a tool was created which you can download here. For more information, visit this site.
Another option that I use in most of my projects is #ZipLib (SharpZipLib), downloads available here:
http://www.icsharpcode.net/opensource/sharpziplib/Download.aspx
Documentation and samples for both VB and C# are available at the same site. It has specific binary assemblies (dll) for .NET framework 1.1, as well as later versions. It's likely that some of the other libraries that you're run across are compiled for .NET 2.0 or later, which won't work in VS2003.
Don't let the name fool you -- it's written in C# (hence the name) but the compiled assemblies work just fine in VB.NET. It supports Zip, GZip, tar, and BZip2 archives.

Create a custom file extension in VB 2008

I have been doing a lot of searching on the web and cant seem to find a clear way of creating a custom file extension. I know to associate the file extension to a certain program, but how do create a format for the custom file extension?
You can do that as well through setup application as described in Walkthrough: Deploying a Windows-based Application, and you can pick any extension you like. I prefer to use abbreviation created from application name, and try to find if this extension is not in use. If extension was in use, then old reference (link between file type and application) will be broken. Use of 4 characters extensions will help with better chance of extension to be unique.