Сейчас на форуме: r0lka, yashechka (+5 невидимых)

 eXeL@B —› Крэки, обсуждения —› ExtractIcon и асм.
Посл.ответ Сообщение

Ранг: 33.0 (посетитель)
Активность: 0.010
Статус: Участник

Создано: 31 июля 2005 08:44
· Личное сообщение · #1

Даров. Вот тут такая проблема. В masm делаю пишу "invoke ExtractIcon, hInstance, Addr filename". По идее он же должен фернуть хэндл на иконку, а он тянет муть какую - то. Подскажите как можно вытянуть иконку из EXE файла.



Ранг: 6.2 (гость)
Активность: 0=0
Статус: Участник

Создано: 31 июля 2005 10:46
· Личное сообщение · #2

Syntax

HICON ExtractIcon( HINSTANCE hInst,
LPCTSTR lpszExeFileName,
UINT nIconIndex
);
Parameters

hInst
[in] Handle to the instance of the application calling the function.
lpszExeFileName
[in] Pointer to a null-terminated string specifying the name of an executable file, DLL, or icon file.
nIconIndex
[in] Specifies the zero-based index of the icon to retrieve. For example, if this value is 0, the function returns a handle to the first icon in the specified file.
If this value is –1, the function returns the total number of icons in the specified file. If the file is an executable file or DLL, the return value is the number of RT_GROUP_ICON resources. If the file is an .ICO file, the return value is 1.

Windows 95/98/Me, Windows NT 4.0 and later: If this value is a negative number not equal to -1, the function returns a handle to the icon in the specified file whose resource identifier is equal to the absolute value of nIconIndex. For example, use –3 to extract the icon whose resource identifier is 3. To extract the icon whose resource identifier is 1, use the ExtractIconEx function.

Return Value

The return value is a handle to an icon. If the file specified was not an executable file, DLL, or icon file, the return is 1. If no icons were found in the file, the return value is NULL.

MSDN рулит
поробуй
invoke ExtractIcon, hInstance, Addr filename,0



Ранг: 163.7 (ветеран)
Активность: 0.070
Статус: Участник

Создано: 31 июля 2005 15:25
· Личное сообщение · #3

Devil пишет:
По идее он же должен фернуть хэндл на иконку


По идее masm должен выдать:
error A2137: too few arguments to INVOKE


 eXeL@B —› Крэки, обсуждения —› ExtractIcon и асм.
:: Ваш ответ
Жирный  Курсив  Подчеркнутый  Перечеркнутый  {mpf5}  Код  Вставить ссылку 
:s1: :s2: :s3: :s4: :s5: :s6: :s7: :s8: :s9: :s10: :s11: :s12: :s13: :s14: :s15: :s16:


Максимальный размер аттача: 500KB.
Ваш логин: german1505 » Выход » ЛС
   Для печати Для печати