Forum » Programiranje » [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!
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 ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | [JAVA] HTTPS clientOddelek: Programiranje | 3193 (1923) | peterv6i |
» | [Android] Bluetooth aplikacijaOddelek: Programiranje | 1105 (968) | marjan_h |
» | [NALOGA][Java] Branje vsebine datoteke vzvratnoOddelek: Programiranje | 1623 (1565) | SkIDiver |
» | [java] Runtime.exec()Oddelek: Programiranje | 1901 (1774) | borchi |
» | Kako pošiljanje datotek v JAVI.Oddelek: Programiranje | 1850 (1721) | kopernik |