Помогите, пожалуйста.
type Tq = class(Tobject)
procedure l;
private
type ImageInfo = record
width : integer;
height:integer;
srcDC,bufDC: hdc;
end;
var imgInf:imageinfo;
function q(x,y:integer):integer;
end;
Возникает ошибка при присвоении значения переменной imginf. Ошибка EAccsesViolation. Что делать?
Добавлено.
Код:
type TGagGraph = class(Tobject)
type ImageInfo = record
width : integer;
height:integer;
srcDC,bufDC: hdc;
end;
var imgInf:imageinfo;
function GGinit(srcHDC: hwnd): pointer;
procedure setPixel(x,y:integer; color:TRGBQuad; srcBMPbits: pointer);
function getPixel(x,y:integer; srcBMPbits: pointer): TRGBQuad;
procedure repaint_dc;
constructor Create;
private
function XY_to_BMP_cell_number(x,y:integer):integer;
end;
function rgba(r,g,b,a:byte):TRGBQuad;
implementation
function rgba(r,g,b,a:byte):TRGBQuad;
begin
result.rgbBlue:=b;
result.rgbGreen:=g;
result.rgbRed:=r;
result.rgbReserved:=a;
end;
constructor TGagGraph.Create;
begin
imginf.width:=0; // <------- Exception class EAccsesViolation with messgae 'Accses violation at adress 00435eaf in module re.exe'.
end;