Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //объявление в *.cpp
- bool TForm1::CheckShararam(void) {
- TIdTCPClient* TCP = new TIdTCPClient(NULL);
- try {
- try {
- TCP->Host = "*site.com";
- TCP->Port = 80;
- TCP->ConnectTimeout = 1000;
- TCP->Connect();
- return TCP->Connected();
- }
- catch (...) {
- ShowMessage("catch");
- return false;
- }
- }
- __finally {
- delete TCP;
- ShowMessage("finally");
- }
- }
- //объявление в *.h
- public: // User declarations
- bool CheckShararam();
- //видимость из другой формы
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement