Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.02.19;
Скачать: CL | DM;

Вниз

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 вся ветка

Текущий архив: 2006.02.19;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.215 c
15-1138630265
Суслик
2006-01-30 17:11
2006.02.19
Про XHTML


15-1138438980
ArtemESC
2006-01-28 12:03
2006.02.19
Файлы chm


10-1113893671
e-not
2005-04-19 10:54
2006.02.19
Помогите разобраться с вызовом функции на COM-сервере


1-1137596199
Still Swamp
2006-01-18 17:56
2006.02.19
Не исполняется Destructor.


15-1138394858
Ермак
2006-01-27 23:47
2006.02.19
Прошу прощения за "флейм"