This is the result of trying to play back xm music on 64-bit Windows.
I wrote a simple wrapper around libmodplug that reads its raw PCM output and writes it to the standard wave output.
All you have to do is create an instance of ModPlay which needs a buffer + size of the xm file to be played.
Then just call the play() function and voila
I have to say that it roughly adds 40kb of code to your binaries, you have to decide if that is worth it for you. Personally I don't care, especially becau
Some packers leave a dll's relocation directory intact (e.g. Armadildo). You just have to know the original reloc dir RVA which is easy to find in most cases.
However, you need to define the right reloc table size, since the PE loader subtracts every block from the size and checks for 0.
That means, you can't just guess and make it big enough to contain all elements. It has to be the exact size of the table.
Well, I was looking for a tool that could calculate the size but couldn't find an
Anyone who ever tried to implement tab controls using plain Windows API will probably agree with me that it's a ****ing PITA to get it working properly.
Some of the problems you'll most likely be facing, mostly because of poor documentation:
Handling and adjusting the windows for each tab
Getting Windows to draw the themed background on the windows
Adding transparent (32-bit) icons to tabs
After a lot of googling and guessing around, I got most of this stuff working.
I came u
This is an unpacker for Cryptocrack's PE Protector 0.93 I've done with ap0x's Unpack SDK some time ago. It was supposed to be included with the new version as a VC++ example.
He doesnt seem to come round to release the new version anytime soon (that dude is busy ) so I thought I might as well upload it here.
It contains include files and libs to use the dlls with VC++ without having to link excplicitly (ie. GetProcAddress).
Keep in mind that you cant use the updater module since the dlls can
This is a rather simple but effective way to keep a window from being dragged out of the screen area.
Add this piece of code to your window/dialog procedure:
case WM_MOVING: long scrx, scry; RECT * rect; rect = (RECT *)lParam; scrx = GetSystemMetrics(SM_CXSCREEN); scry = GetSystemMetrics(SM_CYSCREEN); if(rect->right > scrx) OffsetRect(rect, scrx - rect->right, 0); if(rect->bottom > scry) OffsetRect(rect, 0, scry - rect->bottom); if(rect->left < 0) Off
Maybe you've been trying to find out whether an application (yours, that is) is using visual styles or not before.
While you normally know if it does or not (you added the manifest, didn't you), when writing example code or libraries for GUI stuff, it sometimes turns out to be useful to know.
I ran across such a case when I dealt with tab controls. Without visual styles tab sheets have the same background as normal dialogs whereas with visual styles enabled, the bg is white...
Have you seen