4 * Copyright (C) 1998, 1999 Emanuele Aliberti.
6 * --------------------------------------------------------------------
8 * This software is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * This software is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public
19 * License along with this software; see the file COPYING. If
20 * not, write to the Free Software Foundation, Inc., 675 Mass Ave,
21 * Cambridge, MA 02139, USA.
23 * --------------------------------------------------------------------
24 * Check a PE DLL for loading and get an exported symbol's address
39 #ifdef DISPLAY_VERSION
52 Size
= GetFileVersionInfoSize(
59 L
"GetFileVersionInfoSize",
64 vi
= (PVOID
) LocalAlloc(LMEM_ZEROINIT
,Size
);
66 assert(dll
!= INVALID_HANDLE_VALUE
);
67 if (0 == GetFileVersionInfo(
75 L
"GetFileVersionInfo",
83 L"\\StringFileInfo\\040904E4\\FileDescription",
90 #endif /* def DISPLAY_VERSION */
106 EntryPoint
= GetProcAddress(
136 TCHAR ModuleName
[_MAX_PATH
];
143 ReactOS System Tools\n\
144 Check a Dynamic Link Library (DLL) for loading\n\
145 Copyright (c) 1998, 1999 Emanuele Aliberti\n\n\
146 usage: %s module [symbol [, ...]]\n",
151 dll
= LoadLibraryA(argv
[1]);
156 LastError
= GetLastError();
157 PrintWin32Error(L
"LoadLibrary",LastError
);
160 "%s: loading %s failed (%d).\n",
176 #ifdef DISPLAY_VERSION
177 DisplayVersion(dll
,ModuleName
);
183 for ( CurrentSymbol
= 2;
184 (CurrentSymbol
< argc
);
188 DisplayEntryPoint( dll
, argv
[CurrentSymbol
] );