» »

[delphi] ReadStream - AccessViolation

[delphi] ReadStream - AccessViolation

kyusss ::

Napisal sem program(client), ki serverju poslje ukaz in dobi odgovor. Problem imam z branjem streama. Ko pride do ReadStream mi javi napako: Access violation at adrress 0041EE19 in module Avtorizacija.exe. Read of address 00000000.
Koda:
with IdTCPClient do
begin
outputStream:=TStringStream.Create(strKomanda);
try
WriteStream(outputStream);
ReadStream(inputStream, -1, FALSE);
finally
FreeAndNil(outputStream);
FreeAndNil(inputStream);
end;
end;

Ce naredim tako:
with IdTCPClient do
begin
outputStream:=TStringStream.Create(strKomanda);
inputStream := TStringStream.Create('');
try
//WriteLn(strKomanda);
WriteStream(outputStream);
ReadStream(inputStream, -1, FALSE);
finally
FreeAndNil(outputStream);
FreeAndNil(inputStream);
end;
end;
pa mi javi napako: Project Avtorizacija.exe raised exception classEOutOfMemory whit message 'Out of memory'.

Kje je problem? Hvala!
  • spremenil: kyusss ()


Vredno ogleda ...

TemaSporočilaOglediZadnje sporočilo
TemaSporočilaOglediZadnje sporočilo
»

[JAVA] HTTPS client

Oddelek: Programiranje
173193 (1923) peterv6i
»

[Android] Bluetooth aplikacija

Oddelek: Programiranje
51105 (968) marjan_h
»

[NALOGA][Java] Branje vsebine datoteke vzvratno

Oddelek: Programiranje
71623 (1565) SkIDiver
»

[java] Runtime.exec()

Oddelek: Programiranje
111900 (1773) borchi
»

Kako pošiljanje datotek v JAVI.

Oddelek: Programiranje
141850 (1721) kopernik

Več podobnih tem