Zum Inhalt springen

[Borland C++ Builder 6] fehlende Packages


MrChefman

Empfohlene Beiträge

Und noch eine Frage in eigener Sache:

http://forum.fachinformatiker.de/c-c...-packages.html

Hat denn da wirklich keiner Ahnung?

Bzgl. dieser Frage im Thread "GUI für TouchScreen":

Solche Antworten werden zwar nicht gern gesehen, aber ich kann dir da leider nicht helfen, da ich nur ein einziges mal mit Borland was entwickelt habe, und das war auch nur ein kleines Projekt und noch dazu in Delphi.

Aber sind denn die Packages einzeln zu erwerben?

Normalerweise müssten das bei C doch .h - Dateien sein die du einfach mittels #include einbinden must oder?

Link zu diesem Kommentar
Auf anderen Seiten teilen

Aber sind denn die Packages einzeln zu erwerben?

Normalerweise müssten das bei C doch .h - Dateien sein die du einfach mittels #include einbinden must oder?

Ich habe jetzt die Header-Datei "Sockets.hpp" gefunden. Darin ist folgender Text enthalten:

class DELPHICLASS TTcpClient;

class PASCALIMPLEMENTATION TTcpClient : public TCustomIpClient 

{

	typedef TCustomIpClient inherited;


__published:

	__property Active  = {default=0};

	__property BlockMode  = {default=0};

	__property Connected ;

	__property RemoteHost ;

	__property RemotePort ;

	__property OnCreateHandle ;

	__property OnDestroyHandle ;

	__property OnConnect ;

	__property OnDisconnect ;

	__property OnReceive ;

	__property OnSend ;

	__property OnError ;

public:

	#pragma option push -w-inl

	/* TCustomIpClient.Create */ inline __fastcall virtual TTcpClient(Classes::TComponent* AOwner) : TCustomIpClient(AOwner) { }

	#pragma option pop


public:

	#pragma option push -w-inl

	/* TBaseSocket.Destroy */ inline __fastcall virtual ~TTcpClient(void) { }

	#pragma option pop


};
Fehler: Field Mainform->TcpClient1 does not have a corresponding component. In der Header habe ich TTcpCLient *TcpClient1 gesetzt. Ich kenne aber alle notwendigen Komponenten. Soll ich die in einer eigenen Header-Datei deklarieren? Oder wie kann ich das machen. Weiterhin habe ich folgende Stelle aus der Header-Datei:
class DELPHICLASS TCustomIpClient;

class DELPHICLASS TClientSocketThread;

class PASCALIMPLEMENTATION TCustomIpClient : public TIpSocket 

{

	typedef TIpSocket inherited;


private:

	bool FConnected;

	TSocketNotifyEvent FOnConnect;

	TSocketNotifyEvent FOnDisconnect;


protected:

	virtual void __fastcall DoConnect(void);

	virtual void __fastcall DoDisconnect(void);


public:

	__fastcall virtual TCustomIpClient(Classes::TComponent* AOwner);

	virtual void __fastcall Open(void);

	virtual void __fastcall Close(void);

	bool __fastcall Connect(void);

	void __fastcall Disconnect(void);

	TClientSocketThread* __fastcall GetThreadObject(void);

	__property bool Connected = {read=FConnected, nodefault};

	__property TSocketNotifyEvent OnConnect = {read=FOnConnect, write=FOnConnect};

	__property TSocketNotifyEvent OnDisconnect = {read=FOnDisconnect, write=FOnDisconnect};

public:

	#pragma option push -w-inl

	/* TBaseSocket.Destroy */ inline __fastcall virtual ~TCustomIpClient(void) { }

	#pragma option pop


};
und
class DELPHICLASS TIpSocket;

class PASCALIMPLEMENTATION TIpSocket : public TBaseSocket 

{

	typedef TBaseSocket inherited;


private:

	AnsiString FLocalHost;

	AnsiString FLocalPort;

	AnsiString FRemoteHost;

	AnsiString FRemotePort;

	void __fastcall SetLocalHost(AnsiString Value);

	void __fastcall SetLocalPort(AnsiString Value);

	void __fastcall SetRemoteHost(AnsiString Value);

	void __fastcall SetRemotePort(AnsiString Value);


protected:

	bool __fastcall Bind(void);


public:

	__fastcall virtual TIpSocket(Classes::TComponent* AOwner);

	sockaddr_in __fastcall GetSocketAddr(AnsiString h, AnsiString p);

	AnsiString __fastcall LookupHostName(const AnsiString ipaddr);

	AnsiString __fastcall LookupHostAddr(const AnsiString hn);

	Word __fastcall LookupPort(const AnsiString sn, char * pn = (void *)(0x0));

	Word __fastcall LookupProtocol(const AnsiString pn);

	AnsiString __fastcall LocalDomainName();

	AnsiString __fastcall LocalHostName();

	AnsiString __fastcall LocalHostAddr();

	int __fastcall ReceiveFrom(void *buf, int bufsize, const sockaddr_in &ToAddr, int &len, int flags = 0x0);

	int __fastcall SendTo(void *buf, int bufsize, const sockaddr_in &ToAddr, int flags = 0x0);

	__property AnsiString LocalHost = {read=FLocalHost, write=SetLocalHost};

	__property AnsiString LocalPort = {read=FLocalPort, write=SetLocalPort};

	__property AnsiString RemoteHost = {read=FRemoteHost, write=SetRemoteHost};

	__property AnsiString RemotePort = {read=FRemotePort, write=SetRemotePort};

	__property Domain  = {default=2};

public:

	#pragma option push -w-inl

	/* TBaseSocket.Destroy */ inline __fastcall virtual ~TIpSocket(void) { }

	#pragma option pop


};
und diese
class DELPHICLASS TBaseSocket;

class PASCALIMPLEMENTATION TBaseSocket : public Classes::TComponent 

{

	typedef Classes::TComponent inherited;


private:

	bool FActive;

	TServerSocketBlockMode FBlockMode;

	unsigned FBytesReceived;

	unsigned FBytesSent;

	TSocketDomain FDomain;

	Word FProtocol;

	int FSocket;

	TSocketType FSockType;

	TSocketNotifyEvent FOnCreateHandle;

	TSocketNotifyEvent FOnDestroyHandle;

	TSocketErrorEvent FOnError;

	TSocketDataEvent FOnReceive;

	TSocketDataEvent FOnSend;

	void __fastcall SetActive(bool Value);

	void __fastcall SetBlockMode(TSocketBlockMode Value);

	void __fastcall SetDomain(TSocketDomain Value);

	void __fastcall SetProtocol(Word Value);

	void __fastcall SetSockType(TSocketType Value);


protected:

	DYNAMIC void __fastcall DoCreateHandle(void);

	DYNAMIC void __fastcall DoDestroyHandle(void);

	DYNAMIC void __fastcall DoHandleError(void);

	virtual void __fastcall DoReceive(char * Buf, int &DataLen);

	virtual void __fastcall DoSend(char * Buf, int &DataLen);

	virtual int __fastcall ErrorCheck(int rc);

	virtual void __fastcall Loaded(void);

	void __fastcall SetBytesReceived(unsigned Value);

	void __fastcall SetBytesSent(unsigned Value);


public:

	__fastcall virtual TBaseSocket(Classes::TComponent* AOwner);

	__fastcall virtual ~TBaseSocket(void);

	virtual void __fastcall Open(void);

	virtual void __fastcall Close(void);

	int __fastcall MapDomain(TSocketDomain sd);

	int __fastcall MapSockType(TSocketType st);

	int __fastcall PeekBuf(void *Buf, int BufSize);

	int __fastcall ReceiveBuf(void *Buf, int BufSize, int Flags = 0x0);

	AnsiString __fastcall Receiveln(const AnsiString eol = "\r\n");

	bool __fastcall Select(System::PBoolean ReadReady, System::PBoolean WriteReady, System::PBoolean ExceptFlag, int TimeOut = 0x0);

	int __fastcall SendBuf(void *Buf, int BufSize, int Flags = 0x0);

	int __fastcall Sendln(AnsiString s, const AnsiString eol = "\r\n");

	int __fastcall SendStream(Classes::TStream* AStream);

	bool __fastcall WaitForData(int TimeOut = 0x0);

	__property bool Active = {read=FActive, write=SetActive, default=0};

	__property TSocketBlockMode BlockMode = {read=FBlockMode, write=SetBlockMode, default=0};

	__property unsigned BytesReceived = {read=FBytesReceived, nodefault};

	__property unsigned BytesSent = {read=FBytesSent, nodefault};

	__property TSocketDomain Domain = {read=FDomain, write=SetDomain, default=0};

	__property int Handle = {read=FSocket, nodefault};

	__property Word Protocol = {read=FProtocol, write=SetProtocol, nodefault};

	__property TSocketType SockType = {read=FSockType, write=SetSockType, default=0};

	__property TSocketNotifyEvent OnCreateHandle = {read=FOnCreateHandle, write=FOnCreateHandle};

	__property TSocketNotifyEvent OnDestroyHandle = {read=FOnDestroyHandle, write=FOnDestroyHandle};

	__property TSocketErrorEvent OnError = {read=FOnError, write=FOnError};

	__property TSocketDataEvent OnReceive = {read=FOnReceive, write=FOnReceive};

	__property TSocketDataEvent OnSend = {read=FOnSend, write=FOnSend};

};

und TComponent sollte ja nun bekannt sein...

Link zu diesem Kommentar
Auf anderen Seiten teilen

Also: kurz formuliert:

Ich habe ein Datei "Sockets.hpp", in der - so wie ich es erkennen kann - der TTcpClient, der mir bislang fehlt, beschrieben wird. Hat auch alle propertys - soweit ich das sehen kann.

Bislang war er als Objekt auf dem Formular eingebaut. Nun geht das nicht mehr und ich will das Objekt manuell erzeugen. Dazu habe ich die Sockets.hpp included, in der Header das Objekt definiert (TTcpClient *TcpClient1) und will es nun erzeugen: TcpClient1 = new TTcpClient.

Will ich dann speichern, kommt die Fehlermeldung:

Mainform->TcpClient1 does not have a corresponding component.

Was habe ich falsch gemacht?

Link zu diesem Kommentar
Auf anderen Seiten teilen

So, dann zum Schluss noch 1 andere Frage:

Ich glaube, ich habe ein Teil des Problems in den Griff bekommen.

Jetzt will ich aber den Konstruktor von TTcpClient aufrufen. Der Standard-Konstruktor "new TTcpClient()" klappt so nicht (bei TTcpClient *TcpClient1 = new TTcpClient(); )

Kann mal jemand in der Hilfe vom Borland C++ Builder Pro nachschauen (unter Examples), wie man den erstellt?

Link zu diesem Kommentar
Auf anderen Seiten teilen

  • 1 Jahr später...

Hallo hier mal ein kleiner tip zu deinen probs.

C++ builder in personal,professional und enterprise....

vergleiche die bcb6 poster.

Dann erkennst du sofort welche Funktionen die einzelnen versionen können.

Gerade DB Applications benötigen meist die Enterprise.

MFG

Link zu diesem Kommentar
Auf anderen Seiten teilen

Dein Kommentar

Du kannst jetzt schreiben und Dich später registrieren. Wenn Du ein Konto hast, melde Dich jetzt an, um unter Deinem Benutzernamen zu schreiben.

Gast
Auf dieses Thema antworten...

×   Du hast formatierten Text eingefügt.   Formatierung wiederherstellen

  Nur 75 Emojis sind erlaubt.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Editor leeren

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...