milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
      • Côte d'Azur 2024
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home

Stack overflow

Details
Written by: Stanko Milosev
Category: Delphi
Published: 22 October 2008
Last Updated: 04 May 2022
Hits: 5275

If you receive that exception, and you are using something like:

...
var
Buffer: array [0..MAX_SIZE] of Char;

Than MAX_SIZE is too big, because Char can take small mount of data.

Use better something like this:

{
The following example opens a file of your choice and reads
the entire file into a dynamically allocated buffer. The
buffer and the size of the file are then passed to a routine
that processes the text, and finally the dynamically
allocated buffer is freed and the file is closed.
}

procedure TForm1.Button1Click(Sender: TObject);
var
F: file;
Size: Integer;
Buffer: PChar;
begin
if OpenDialog1.Execute then
begin
AssignFile(F, OpenDialog1.FileName);
Reset(F, 1);
try
Size := FileSize(F);
GetMem(Buffer, Size);
try
BlockRead(F, Buffer^, Size);
Memo1.Lines.Add(Buffer);
finally
FreeMem(Buffer);
end;
finally
CloseFile(F);
end;
end;
end;
 

That code is taken from Delphi help, system.FreeMem function.

Can't load package

Details
Written by: Stanko Milosev
Category: Delphi
Published: 22 September 2008
Last Updated: 22 September 2008
Hits: 5557
If you are receiving a message like this, and you know that path exist, also, you added in the system path, then check in Delphi Tools->Options->Environment Variables, if you have path defined there too, then Delphi will override existing system path variable... So, best would be to delete ath variable from Delphi.

One more good link.

Details
Written by: Stanko Milosev
Category: MSMQ
Published: 19 December 2008
Last Updated: 18 July 2011
Hits: 6780

About queues generally:

http://msdn.microsoft.com/en-us/library/ms733789.aspx

MSMQBench

Details
Written by: Stanko Milosev
Category: MSMQ
Published: 18 December 2008
Last Updated: 30 November -0001
Hits: 6189

You can download it from here, and here is an example:

msmqbench -sr 10 10 -q servername estq

  1. Deploying MSMQ 3.0 Applications with DCOM
  2. Few links.
  3. Microsoft Message Queuing
  4. ORA-00904: invalid identifier

Subcategories

C#

Azure

ASP.NET

JavaScript

Software Development Philosophy

MS SQL

IBM WebSphere MQ

MySQL

Joomla

Delphi

PHP

Windows

Life

Lazarus

Downloads

Android

CSS

Chrome

HTML

Linux

Eclipse

Page 100 of 168

  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104