Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement