Software snipets for the Delphi & Pascal Community
Sep 05, 2010 - 05:14 AM
alt1
Borland :: Mailing Lists
alt1
Search  
alt1
alt1 alt1 alt1
alt1
Main Menu
alt1
· Home
· Your Account

Other Options

· AvantGo
· Downloads
· FAQ
· Members List
· Messages
· News
· Recommend Us
· Reviews
· Search
· Sections
· Stats
· Submit News
· Topics
· Top List
· Web Links

alt1
Who's online
alt1
There are currently, 6 guest(s) and 0 member(s) online.

You are an anonymous user. You can register for free by clicking here


alt1
alt1
List functions in DLL
Posted by: Gayle
alt1
Topic Windows API
Ever wanted to list functions in a DLL ?? Here's how.


unit listfunctionsindll;

interface

uses
Forms,
Classes,
SysUtils,
Dialogs,
ImageHlp, // routines to access debug information
Windows;


type
TForm1 = class(TForm)

private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

// by Dmitry Streblechenko
procedure ListDLLFunctions(DLLName: String; List: TStrings);
type
chararr = array [0..$FFFFFF] of Char;
var
H: THandle;
I,
fc: integer;
st: string;
arr: Pointer;
ImageDebugInformation: PImageDebugInformation;
begin
List.Clear;
DLLName := ExpandFileName(DLLName);
if FileExists(DLLName) then
begin
H := CreateFile(PChar(DLLName), GENERIC_READ, FILE_SHARE_READ or
FILE_SHARE_WRITE, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if HINVALID_HANDLE_VALUE then
try
ImageDebugInformation := MapDebugInformation(H, PChar(DLLName), nil, 0);
if ImageDebugInformationnil then
try
arr := ImageDebugInformation^.ExportedNames;
fc := 0;
for I := 0 to ImageDebugInformation^.ExportedNamesSize - 1 do
if chararr(arr^)[I]=#0 then
begin
st := PChar(@chararr(arr^)[fc]);
if Length(st)0 then
List.Add(st);
if (I0) and (chararr(arr^)[I-1]=#0) then
Break;
fc := I + 1
end
finally
UnmapDebugInformation(ImageDebugInformation)
end
finally
CloseHandle(H)
end
end
end;

// the following is an example how to use the procedure

var
List: TStrings;
I: integer;
S: String;

begin
List := TStringList.Create;

ListDLLFunctions('c:\cjpexplorerv11\expreg.dll', List);
showmessage(inttostr(list.count));
S := 'List of functions';
for I := 0 to List.Count - 1 do
S := S + #13#10 + List[I];
ShowMessage(S);

List.Free
end.



alt1
alt1
 
alt1
Login
alt1
Username

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like a theme manager, comments configuration and posting comments with your name.

alt1
Related links
alt1
· More about Windows API
· News by admin


Most read story in Windows API:
List functions in DLL


Printer friendly page  Send this story to a friend

"List functions in DLL" | Login/Create an account | 2 Comments
Threshold
Comments are owned by the poster. We aren't responsible for their content.
Re: List functions in DLL(Score: 0)
by Anonymous on Nov 26, 2009 - 03:05 AM
blog de femmes poilue, extraits mangas x gratuits mesvip, porno baimbridge, porno bestiality, m garotic mature, fist anal blog, gays et matures, jeune fille upskirt, porno naine poilue, clitoris hors norme, blog des belles salopes maries, blogs poitrines amatrices, photo salope zoophilie, come scaricare da redtube, nichons extraits gratuits, video porno vieille yu tube, vielle et salopes, red you tube scuola, videobeurettestreamfree wwwfreesex ustka pl, film zoofil amteur


[ Comments not allowed for anonymous users, please register ]

Re: List functions in DLL(Score: 0)
by Anonymous on Jan 24, 2010 - 11:30 AM
branle collant avec pied, photo zoophilie singe, mature baiser par un chien, photo ecoliere nue, extrait zoophile chien, extrait gratuit brent everett se fait enculer, blog de femme nue et pervere gratuit, video exhibe a poile sous la jupes, free porne arabe sex, you tube sexe hard


[ Comments not allowed for anonymous users, please register ]

alt1
Report Bugs :: Tasks :: Developers 
alt1




alt1