How to pass pointer to array of byte to function?

Because IVO GELOV did not updated his code and/or did not removed his answer, I am adding my current code, which I am using. type TBytes = array of byte; procedure Dictionary.WriteData(var Data: TBytes); begin try DataStream.Write(Data[0], sec[sid].grp[grp].META.dataLength); finally end; end;

Delphi 7 Webbrowser – select without value [closed]

TWebBrowser is just a wrapper for the Internet Explorer ActiveX control, so this is really an IE DOM issue, not a Delphi issue. Try setting the select element’s selectedIndex property instead of its value property: WebBrowser1.OleObject.Document.All.Item(‘year’, 0).selectedIndex := 0; The value property is what gets transmitted to the server, but only of there is an … Read more

Select Directory error … delphi 7 [closed]

var olddir: string; //global variable procedure olddiris(name:string); begin if name=”trick” then olddir:= ‘c:\program files\’+name; end; procedure MyGetPath(name:string); var options : TSelectDirOpts; begin OldDirIs(name); //returns olddir if FileCtrl.SelectDirectory(OldDir,options,0) then ShowMessage(‘i got it’); end; procedure TForm1.Button1Click(Sender: TObject); begin Mygetpath(‘trick’); end; This code runs without error… (Note: changed GetPath -> MyGetPath; added “\” to ‘c:\program files’) If the … Read more

Pascal, Delphi Linked lists [closed]

Something like this: type TOccurencyNodePtr = ^TOccurencyNode; TOccurencyNode = record Occurency: integer; Next: TOccurencyNodePtr; end; TIdentifierFoundNodePtr = ^TIdentifierFoundNode; TIdentifierFoundNode = record Identifier: string; Next: TIdentifierFoundNodePtr; end; var Occurencies: TOccurencyNodePtr = nil; Identifiers: TIdentifierFoundNodePtr = nil; procedure AddIdentifierOccurency(const Identifier: string; const Occurrency: Integer); var IdentifierNode, LastIdentifierNode: TIdentifierFoundNodePtr; OccurencyNode, LastOccurencyNode: TOccurencyNodePtr; begin IdentifierNode := Identifiers; LastIdentifierNode := … Read more