Cthulhu
November 6th, 2007, 06:41
Quote:
Introduction This article will demonstrate techniques to incorporate compiled machine code into an existing project using ASM source files. The assembly source file will be created from the compiled machine code. In addition, it will detail the limitation of Imagehlp.dll (single thread safety requirement), and show techniques for converting a compiled STDCALL procedure to a C-CALL assembly language routine. Eample one will present a standard C++ console application. The program add two numbers and returns the results. The example will present a few of the basic obstacles to overcome. Sample two will incorporate the graft using compiled machine code of Add() from the first. Finally, example three will use machine code from imagehlp.dll to supplement the PE Checksum program. This will remove the requirement of the library dependency from a project and fully demonstrate the techniques. |
http://www.codeproject.com/useritems/CodeGraft.asp