5 * Copyright (C) 1998, 1999 Emanuele Aliberti.
7 * --------------------------------------------------------------------
9 * This software is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
14 * This software is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this software; see the file COPYING. If
21 * not, write to the Free Software Foundation, Inc., 675 Mass Ave,
22 * Cambridge, MA 02139, USA.
24 * --------------------------------------------------------------------
25 * Check a PE DLL for loading and get an exported symbol's address
40 #ifdef DISPLAY_VERSION
53 Size
= GetFileVersionInfoSize(
60 L
"GetFileVersionInfoSize",
65 vi
= (PVOID
) LocalAlloc(LMEM_ZEROINIT
,Size
);
67 assert(dll
!= INVALID_HANDLE_VALUE
);
68 if (0 == GetFileVersionInfo(
76 L
"GetFileVersionInfo",
84 L"\\StringFileInfo\\040904E4\\FileDescription",
91 #endif /* def DISPLAY_VERSION */
107 EntryPoint
= GetProcAddress(
137 TCHAR ModuleName
[_MAX_PATH
];
144 ReactOS System Tools\n\
145 Check a Dynamic Link Library (DLL) for loading\n\
146 Copyright (c) 1998, 1999 Emanuele Aliberti\n\n\
147 usage: %s module [symbol [, ...]]\n",
152 dll
= LoadLibraryA(argv
[1]);
157 LastError
= GetLastError();
158 PrintWin32Error(L
"LoadLibrary",LastError
);
161 "%s: loading %s failed (%d).\n",
177 #ifdef DISPLAY_VERSION
178 DisplayVersion(dll
,ModuleName
);
184 for ( CurrentSymbol
= 2;
185 (CurrentSymbol
< argc
);
189 DisplayEntryPoint( dll
, argv
[CurrentSymbol
] );