how to import/export dll and use its function - dllimport

I am developing a project. I want to include a particular function from 7zip software to decompress data. Its a kinda exporting a particular function from 7zip software to my project. Should I do using DLL import and export or is there any other way?

you should take a look in LZMA SDK, it would give access to 7zip function from C++/C#/C/Java.

Related

how to release a module in Haskell that can be used in another program?

I'm a beginner of Haskell, and I got a question here, how to release or build a module which can be used in another program ?
For example, when I use Java, I can write some classes, some functions and make it to be a jar that can be use in another program. So , how does this go with Haskell? Is there necessary to use the same functions, modules with the source code ?
And thanks.
If you're fine with sharing your library and its source code with everyone, it is common to upload it to Hackage. Other projects built with any common Haskell build tool know how to interface with Hackage packages
If you want to selectively share your library and its source code, you can upload it to a private or public github repository, and it could be used as a stack dependency
If you want to share the library locally with yourself, stack supports depending on local paths
If you wish to share your library without sharing source code, you can expose a C-api and make a DLL

Can we generate CPP files out of WINRT/header files?

I see that we've a bunch of header files and references(winmd) ,in windows 10 SDK. Is there any way I can generate cpp files as well out of these so that I can compile all of them together and create a library out of this ?
Basically, what I want is : I do not want to include the publicly available WINRT header files inside my app directly. Instead, I want to create a WINRT library with all the WINRT definitions which can be referred/linked to in my app. I'll expose the required definitions via some subset of header files.
Let me know if this is possible.
Thanks in advance.
You can use the cppwinrt.exe tool that ship in the Windows SDK to generate your own headers that you can then include in your project.

Visual Foxpro dBASE/dbf type solution for Linux

I am looking to take some propriety program which uses a dBASE backend and a FoxPro client to access it, and move it to a simple Linux solution. Any suggestions for an open source Linux software which can easily import dbf files, and create a front end without much doing?
I am comfortable with Bash, Perl, Python, and html in that order, but I would prefer something that doesn't require much code on my end.
You could look at Servoy. It:
Runs on Linux
Is based on an open-source Java stack (Tomcat/Terracotta/Wicket/Rhino/Hibernate) and is mostly open-source itself.
Is database agnostic, and includes the ability to connect to and work with DBF files directly
Coding is done in Javascript (Rhino) with the ability to inject client-side code directly when needed.
Can target web and desktop from one codebase.
Has a full drag-and-drop IDE which is basically modified Eclipse.

Should third-party static libraries be included as an item in VC++ 2010 project?

I use third party static library (provided as a .LIB file without source code) in my project. For linking purposes it is enough to add it via "Properties/Linker/Input->Additional Dependencies"
This library is not used in any other project in the solution.
I wonder if I should add it as an item to project file itself. The advantages that I see: it will be immediately obvious that this project uses it and one wouldn't have to add it to version control system manually (anything that is a part of the project/solution is added automatically if you use something like AnkSVN).
The project in VCS must be buildable. It is impossible without the lib. So you should add it.

Using minizip in Visual C++ 2010

I've been programming for a while, but for some reason I just can't find how to do something that I know has to be simple. I want to create zip files with a small utility that does not require dlls or any other helper files. I found a few places that recommend using zlib and minizip to work with zip files. I just can't figure out HOW to use them. I've installed zlib, but I have no clue how to install or use minizip. Every thing I find assumes I already have my environment set up to use it and "all you need to do is use function X and voila!" I've been trying to find how to use external libraries, but I'm getting just as vague info that way too. Are there any books that might be a place to start looking? I'm all for educating myself, but I'm actually quite lost with where to start on this.
Checkout XZip on CodeProject: http://www.codeproject.com/KB/cpp/xzipunzip.aspx
If you don't want to have to use any DLL's, that is a way to go. I've been using the 7-Zip DLLs with C# .NET programs lately. The 7-Zip SDK itself is not fun to work with, and all the solutions I know of that really work require the 7-Zip DLLs. However, once you integrate 7-Zip, you have ZIP, TAR, RAR, just about every other archive format integrated. The 7-Zip format itself is my favorite as it generally offers the best compression.
For .NET managed code, the SevenZipSharp library makes integrating the 7-Zip DLLs a snap:
http://sevenzipsharp.codeplex.com/

Resources