Autor Beitrag
Arnulf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Do 10.03.05 23:05 
hallo
Ich versuche ein Banner in mein Program einzubauen.
Das funktioniert auch bei mir sehr gut.
Bei einem freund allerdings nicht der bekommt diese Fehlermeldung (das ist mein eigener exception handle):
CLNT: EXCEPTION:10055:No buffer space available

ausblenden Code:
1:
2:
3:
  HTTP.Get('http://81.209.128.133/banners/gamehost.bmp');
  Stream := TStringStream.create(HTTP.Body);
  IMG_Banner.Picture.Bitmap.loadfromstream(stream);


Ich habs schon so probiert:

www.gamehost.biz/banners/gamehost.bmp
www.gamehost.biz......

Bei mir funktinieren alle methoden aber bei ihm nicht - er benutzt win2k und ich xp.
Mir ist das relativ wichtig vor allem wenn ich schon einen sponsor für mein programm hab :)

Kann mir jemand sagen wo das problem liegt?
Arnulf

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.


Zuletzt bearbeitet von Arnulf am Fr 11.03.05 12:35, insgesamt 1-mal bearbeitet
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Fr 11.03.05 02:34 
liegt sicher daran dass MAN IM INTERNET KEINE BMP VERWENDET SONDERN GIF ODER JPG
ausserdem: warum Stringstream ???

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Arnulf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Fr 11.03.05 15:51 
Was soll ich sonst verwenden? - memory stream?
Das bmp hab ich genommen weil ich mir dann das umwandeln erspar und das eh so klein ist, daß es nicht auffällt.

Aber daran kann es ja wohl nicht liegen denk ich.
Das dürfte irgendein tcp socket problem sein - vermutlich nur von win2k.
Zu dem Thema hab ich nur das gefunden:
support.microsoft.com/kb/q196271/

Ich hab beim googlen auch etwas über ein problem mit zone alarm in der Beziehung gelesen.
Jedenfalls werd ich das mit der Registry mal ausprobieren, ist aber trotzdem seltsam.

Vielleicht gibts ja wirklich eine andere Methode die besser funktioniert - für Vorschläge bin ich immer zu haben.

Arnulf
Arnulf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Mo 14.03.05 12:25 
Hi
den registry eintrag zu ändern hat nicht geholfen :(

hat irgendjemand eine idee was man hier anders machen könnte damit es auch bei win2k funktioniert?
Oder woran das liegen könnte?

Arnulf
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Mo 14.03.05 12:56 
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
procedure TForm1.Button1Click(Sender: TObject);
var
  Stream: TMemoryStream;
begin

  Stream := TMemoryStream.Create;
  try
    with TNMHTTP.Create(nil) do
      try
        try
          Get('http://www.gamehost.biz/banners/gamehost.bmp');
          with Stream do
          begin
            Size := Length(Body);
            WriteBuffer(Body[1], Size);
            Position := 0;
          end;
          Image1.Picture.Bitmap.LoadFromStream(Stream);
        except
        end;
      finally
        Free;
      end;
  finally
    Stream.Free;
  end;

end;

procedure TForm1.Button2Click(Sender: TObject);
var
  Stream: TStringStream;
begin

  with TNMHTTP.Create(nil) do
    try
      try
        Get('http://www.gamehost.biz/banners/gamehost.bmp');
        Stream := TStringStream.Create(Body);
        try
          Image1.Picture.Bitmap.LoadFromStream(Stream);
        finally
          Stream.Free;
        end;
      except
      end;
    finally
      Free;
    end;

end;


Zitat:
Kann mir jemand sagen wo das problem liegt?

Liegt bestimmt an den fehleranfälligen FastNet Komponenten. Warum benutzt du nicht Indy oder ICS?

_________________
Ciao, Sprint.
Arnulf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Mi 16.03.05 19:18 
naja - danke jedenfalls
ich hab einfach auf indy componenten umgebaut.
jetzt funktioniert es endlich.
da ich auch files mit dem runterlade wars ein haufen arbeit :) aber du hattest recht mit indy geht.

Arnulf