Posts tagged “Delphi” 
-
My programs
-
Delphi
A little tool to export the entire IMAP folder to a set of EML files.
When moving to my new mail server I wanted to keep all existing messages. I had IMAP access to the old mailbox so I made this small program to export all messages into a set of raw .eml files.
Features
- supports SSL connection
- exports any IMAP folder, not just INBOX
- supports custom file name pattern that may include message sender, charset, date, flags, recipient and others
- to see full list of variables connect to the server, click on the green plus button and select Set output file name pattern
- if file with the same name existed new file will be suffixed with (2), (3), etc. similar to the way Explorer acts when renaming multiple files
- can skip messages prior to a certain date – useful when creating regular backups
- if Save settings on exit is checked this date can be automatically set to now after completing each export
- can show/export individual message(s) by their number
- to do this connect to the server, click on the green plus button and select Show message by its index
- can remember connection and other settings on exit
- if you wish to save all but Password fields check Save settings on exit, close the program, open ImapExport.ini, and clear the part after = symbol of Password=... line and then open ImapExport again – from now on Password will be remembered blank
- last connected IMAP folder is remembered but if you wish to always select INBOX (or another folder that’s first in your mailbox) do the same as above but for DefaultFolder=... line
- press Esc to close the program
Download
«…»
|
Read rest of this entry
»
-
Computer
-
Delphi
Direct downloads for highly useful free and standalone Delphi classes and packages.
Seeing in the statistics that many people search for TPNGObject and other stuff I’ve decided to write this download page-article with direct links to useful 3rd party packages I use dialy in my Delphi 7 projects.
All classes are freeware and open source (licenses included). Links are provided for classes I remember the source I’ve got them from. Most packages work well below Delphi 7.
See also my standalone Delphi 7 eXtension library.
PNGImage (TPNGObject)
«…»
|
Read rest of this entry
»
-
My programs
-
Delphi
A collection of most used lightweight & standalone Delphi 7 classes, VCL components and functions.
During my long and fruity friendship with Delphi, particularly the 7th version, I have colelcted a large number of helpful standalone classes, VCL components and functions that I’ve been using in various projects. Not so long ago I decided to put them in a separate build which I called D7X (aka «Delphi 7 eXtension» library).
One of the main points behind D7X is complete Unicode support in each and every component. You will see that pascalString’s are extremely rare in the code.
It is available from this SVN repository:
«…»
|
Read rest of this entry
»
-
Computer
-
Delphi
Explains how to hook any WinAPI or other function using prologue rewriting technique in Delphi 7.
This article is written based on a test project that I had made before creating ApiHook – Win32 API hooking tool not so long ago. It demonstrates how to hook library functions – the technique that lies in the very core of ApiHook.
The basics
Let's start with the basic idea. Why we might want to hook, say, a WinAPI function?
Simply enough: if a target process calls that function it will essentially call ours. Then we can decide what we do: we can bypass the call normally but probably record some function arguments; we can also change the return value – for example, if you've hooked explorer.exe and want to hide certain files from the desktop; we can modify parameters to let the original function do something else that the target program intended to. We can even decide not to call any API function or call a different one – because we actually control the execution from the moment the target calls (our) function and until we return from it.
«…»
|
Read rest of this entry
»
-
My programs
-
Delphi
A full-featured console WinAPI hooking tool written in Delphi 7. Freeware. Open source. Public domain.
ApiHook is a freeware (public domain) open-source program written in Delphi 7 for hooking library calls in Win32 systems. In fact, it can be used to hook any snippet of assembly code in a single EXE file as well but this needs a bit of source code tweaking.
ApiHook lets you track and view information about what functions and how exactly the target program calls. It is implemented in two parts: loader and library. The first injects the ApiHook library into the target process (starting it or attaching to an already running one) while the second does the actual work.
ApiHook lets you examine values of registers the called routine was passed and also capture its parameters (using stored asmESP value) and returned value through them.
The mechanics is simple: you write a script file specifying what actions must be performed when a specific function is called; actions receive the snapshot of the call-time registers and can log them, dump memory blocks or do something else.
«…»
|
Read rest of this entry
»
-
Computer
-
Delphi
This is a follow-up on my previous post «Trouble with UTF8Encode» where I've run into a trouble I didn't feel was solvable. Surprisingly enough I've run into the solution in turn much sooner than I expected.
Intro
Several days ago
I was putting my SQLite wrapper for Delphi 7 in real-life use rather than a demo application and have during the process had stumbled upon a very weird behavior: it kept doing something that prevented SQLite from opening a database. It wasn't something serious, I thought, perhaps I've locked it in some place earlier. However, as I've moved through the code I was understanding that there was no such place.
In the end, after more than an hour of debugging and commenting things out all around the weirdness has hit the apex: everything worked fine if I'd add an extra character used in some completely different part of program and it would say «Cannot open the database» if I'd remove it.
And then I made some change that made sqlite3.dll crash with an Access Violation. «Whoa,» I thought, «thi is no more my app; what's wrong with this thing?». And I've fired up IDA Pro.
«…»
|
Read rest of this entry
»
-
Computer
-
Delphi
An object-oriented approach to colorizing Win32 console output with intuitive formatting.
This seems like my first post in the New Year (btw, my blog is almost a year old now!). Well, let’s start the year with colors then.
Nearly two years ago I’ve written two functions to write colorful messages to Windows console based on a string pattern – in other works, without manual calls to SetConsoleTextAttribute. Since then my experience has advanced particularly well so I decided to rewrite those two functions that were somewhat limited anyway.
This is how the ColorConsole unit was made. It works in Delphi 7 (perhaps in more recent versions too) and uses my D7X – Delphi 7 eXtension library library.
Features
«…»
|
Read rest of this entry
»
-
Computer
-
Delphi
This post is more of a reminder for myself than a real problem-solution article because I still don't know the reasons (actually, I do – check my follow-up article: «Never return PChar in Delphi»)… but let's start with the synopsis.
Long story short, a few days ago I was writing a Delphi unit making heavy use of UTF8Encode() function that, naturally, converts a string from Delphi WideString into a String. If we dig deeper, however, it turns out that it's only a wrapper for UnicodeToUtf8() which works on null-terminated strings rather than normal Pascal strings (why this is so I do not know – it doesn't even call a single WinAPI function).
The fragment of code that has made me nerviously pondering and debugging stuff all around was like this:
A funny part about this was that each next call to UTF8Encode() would not just return the new string but also replace the same string (PChar) that it has returned before stored in Strings[]. UTF8Encode() begins like this:
«…»
|
Read rest of this entry
»
Latest comments
Снятие DRM-защиты с AZW/PRC для Amazon Kindle
FileDrop – cross-browser JavaScript Drag & Drop file upload
Multidomain mail system with Postfix & Cyrus
How to catch fatal errors in PHP
Определение прозрачности пикселя в Photoshop
DBNinja for localhost
How to disable Skype 5 auto update