How to disassembler exe file With API windows? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I wrote a program that opens the exe files. I want that program to read some specific assembly instructions with their addresses in an exe file. for example JAM or Call.
so, what API functions should I use. if you know any other sources that can be useful tell me ;)

If you want to read code in a Windows PE file (Portable Executable) you will first have to find the code section.
How to find this depends whether the exe is a 32-bit or 64-bit one (although they're pretty much the same for their internal structure), but I recommend you studying the PE format: http://msdn.microsoft.com/en-us/magazine/cc301805.aspx
After that you will have to find the address in which your call code or whatever you want resides. What do you want to do with that binary code is up to you, if you intend to translate it into asm human-readable code you will need a translator (or code one up by yourself... pretty hard for a beginner) such as distorm (GPL and commercial license).
I hope this got you started to what you want to do.

A very good start will be to use a disassembly library, Capstone is one of them for example but more exists.
Then you will need to parse the PE executable format to extract the code to send to your disassembly library...
But in that domain libraries also exists, for example radare supporting most architectures and format (And it can be used with multiple disassembly libraries, including Capstone)

Related

Create crash dump report for a C++ application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Sometimes it happens that your distributed application crashes on customer machines. What you obtain as an info from the customer is that the application simply crashed "doing something": no way to understand where the bug was in your code. Is there a library/add-on to be linked to your application that can create a backtrace file/crash dump report so that it could be sent by the customer to better understand what you normally see in the Visual Studio call stack helping understanding where the bug is?
see google: https://code.google.com/p/google-breakpad/
Description from the website:
Breakpad is a library and tool suite that allows you to distribute an application to users with compiler-provided debugging information removed, record crashes in compact "minidump" files, send them back to your server, and produce C and C++ stack traces from these minidumps. Breakpad can also write minidumps on request for programs that have not crashed.
https://code.google.com/p/google-breakpad/wiki/GettingStartedWithBreakpad
There are a few third party solutions available that provide a library of functions to trap crash data. A simple google search should suffice. However, depending on your budget, the easiest solution is to create a Microsoft WER account. WER has advantages over the other solutions because it is part of the OS and it exposes several functions that allow you to tailor the crash data collection.

Report generator for C++/Qt (Windows) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have a program un C++/Qt written for Windows, which prints some graphs in pdf format and some other data in HTML.
I need to print all together into a single PDF, a single-file report.
I have looked for some libraries similar to Crystal reports, but I just find paid ones and I need a free open-source solution. I finally found RTK reports but it looks to run only with UNIX.
Any library or different solution for my needs?
You might want to check out what Qt has built into it in versions 4.7 & 4.8. From Qt 4.8: Printing with Qt, there is this little tidbit "Qt's printing system also enables PostScript and PDF files to be generated...." The QPrinter class supports several different Output Formats, including PDF.
Disclaimer: I haven't played with this part of Qt, so YMMV.

What is the best library to work with archives [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I wonder, what library you would choose for the following:
I need to be able to combine a bunch of files and folders (a tree of filesystem structure) into one file - archive, thus having one composite file.
the library must be cross-platform: Windows 7 and Linux
it must provide access to the content and ability to extract only one file (e.g. if I have an archive of data folder and if I need only data/subdata/file, only it should be extracted)
it must have C++ (preferably) or C API
I am not particularly keen on archiving, but it would be desirable, since I will be storing mostly text files and they compress well...
Any feedback is highly appreciated!
zlib in combination with Boost Iostreams is a great combination. This does not do file level extraction though.
EDIT:
Some other options I found via another SO question include:
Zipios++
QuaZIP - Requires QT, may not build on Windows
correctly
EDIT2:
Minizip (usually included with zlib) will do the trick too - probably the most lightweight and commonly used solution.
Consider libarchive.
http://gnuwin32.sourceforge.net/packages/libarchive.htm
zlib is probably the safe answer.

Pre-compiled Windows OMF BLAS/LAPACK? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Is there anywhere I can get pre-compiled BLAS and LAPACK binaries for Windows in OMF object format? I want to link some D language code to these. I'm aware of where I can get the relevant libs in COFF format. I'm also aware of the objconv tool, which converts COFF to OMF, though this doesn't seem to work in practice for reasons I don't fully understand. These seem to be related to underscores in symbols, though I tried just about every setting for dealing with these and none seem to work.
Alternatively, does anyone know how to convert the reference binaries to OMF such that they'll actually link properly to DMD-compiled code? As a last resort, does anyone know how to get CLAPACK, CBLAS and F2CLIB to build with DMC? The build process that comes with these seems entirely geared towards the GCC toolchain.
"...seams entirely geared towards the GCC toolchain."
That is an understatemant. Blas is highly "optimized" to complile under one, specific, version of gcc, 2.4.3??.
It would, perhaps, be possible , starting with the un-optimized version of the source, to compile with the OpenWatcom toolchain, so as to generate 32 bit OMF but, I fear, much foo would be involved and the result would be dead slow code.

Read (and write) RTF files with C++ / Qt [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am looking for a simple C++ library for tokenizing and parsing RTF (Rich Text Format) files. I am planning to edit them with Qt's QTextEdit.
More the Formatting preserved the better -- but actually I am planning to use Bold and Italics only.
In perl I would use RTF::Tokenizer.
It would be nice if the module had some sort of interface for writing also, but I am able to brute force that with a template and some regular expressions.
I helped writing the RTF import export filter in KOffice. You can have a look at the code at https://cgit.kde.org/koffice.git/tree/filters/kword/rtf. The code is modular and it depends only on Qt.
A quick SourceForge search suggests librtf. It hasn't been developed in a while, but is listed as stable and is under the LGPL. I don't know whether it will support what you need, but I always suggest searching SourceForge for libraries.
You can ask the #koffice guys on irc.freenode.org over irc. Their program kword is able to open RTF files, and is indeed also written in Qt. I'm sure they would be glad to tell you about how they do it.