Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "WinAPI";
Текущий архив: 2006.02.19;
Скачать: [xml.tar.bz2];

Вниз

EnumResourceTypes постоянно возвращает ошибку   Найти похожие ветки 

 
Surik   (2005-12-04 13:08) [0]

Доброго времени суток! Подскажите, что я делаю неправильно?

function EnumResTypeProc(hModule: Cardinal; lpszType: PChar; Param: Integer): Bool;stdcall;
begin
   MessageBox(0,lpszType,nil,0);
   Result := True;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
hMod,hRes: Cardinal;
begin
  if not opendialog1.Execute then exit;

  hMod := LoadLibrary(PChar(opendialog1.FileName));
  EnumResourceTypes(hMod,@EnumResTypeProc,0); { всегда возвращает}
  ShowMessage(SysErrorMessage(GetLastError)); {"Неверная попытка обращения к адресу памяти"}
end;


 
Lamer@fools.ua ©   (2005-12-04 13:29) [1]

>>Surik   (04.12.05 13:08)

>MessageBox(0,lpszType,nil,0);

Из справки:

EnumResTypeProc Function
...
Remarks

If IS_INTRESOURCE( lpszType) is TRUE, lpszType specifies the integer identifier of the given resource. Otherwise, it is a pointer to a null-terminated string. If the first character of the string is a pound sign ( #), the remaining characters represent a decimal number that specifies the integer identifier of the resource. For example, the string " #258" represents the identifier 258.


Далее.

IS_INTRESOURCE Macro

...

Remarks

This macro checks whether all bits except the least 16 bits are zero. When true, wInteger is an integer identifier for a resource. Otherwise it is typically a pointer to a string.



Страницы: 1 вся ветка

Форум: "WinAPI";
Текущий архив: 2006.02.19;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.064 c
2-1138268319
kull
2006-01-26 12:38
2006.02.19
Задача достать ссылки из html страницы


15-1138526986
vidiv
2006-01-29 12:29
2006.02.19
Применение шифрования в телефонии.


4-1133428554
Verg
2005-12-01 12:15
2006.02.19
Прерывания в многопроцессорной архитектуре


2-1138936625
Silver__Dragon
2006-02-03 06:17
2006.02.19
разделение звука на потоки


2-1138963088
pvm
2006-02-03 13:38
2006.02.19
DLL





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский