На главную Наши проекты:
Журнал   ·   Discuz!ML   ·   Wiki   ·   DRKB   ·   Помощь проекту
ПРАВИЛА FAQ Помощь Участники Календарь Избранное RSS
msm.ru
! ПРАВИЛА РАЗДЕЛА · FAQ раздела Delphi · Книги по Delphi
Пожалуйста, выделяйте текст программы тегом [сode=pas] ... [/сode]. Для этого используйте кнопку [code=pas] в форме ответа или комбобокс, если нужно вставить код на языке, отличном от Дельфи/Паскаля.
Следующие вопросы задаются очень часто, подробно разобраны в FAQ и, поэтому, будут безжалостно удаляться:
1. Преобразовать переменную типа String в тип PChar (PAnsiChar)
2. Как "свернуть" программу в трей.
3. Как "скрыться" от Ctrl + Alt + Del (заблокировать их и т.п.)
4. Как прочитать список файлов, поддиректорий в директории?
5. Как запустить программу/файл?
... (продолжение следует) ...

Вопросы, подробно описанные во встроенной справочной системе Delphi, не несут полезной тематической нагрузки, поэтому будут удаляться.
Запрещается создавать темы с просьбой выполнить какую-то работу за автора темы. Форум является средством общения и общего поиска решения. Вашу работу за Вас никто выполнять не будет.


Внимание
Попытки открытия обсуждений реализации вредоносного ПО, включая различные интерпретации спам-ботов, наказывается предупреждением на 30 дней.
Повторная попытка - 60 дней. Последующие попытки бан.
Мат в разделе - бан на три месяца...
Модераторы: jack128, D[u]fa, Shaggy, Rouse_
  
> использование internetConnect
    КАК ЮЗАТЬ InternetConnect??!
    В смысле чё писать в скобках нада?
      Параметры, вероятно.
        Цитата komrad, 08.03.03, 16:58:32
        КАК ЮЗАТЬ InternetConnect??!
        В смысле чё писать в скобках нада?

        ExpandedWrap disabled
          <br>Битте:<br>InternetConnect<br>HINTERNET InternetConnect(<br>    IN HINTERNET hInternetSession,<br>    IN LPCSTR lpszServerName,<br>    IN INTERNET_PORT nServerPort,<br>    IN LPCSTR lpszUsername,<br>    IN LPCSTR lpszPassword,<br>    IN DWORD dwService,<br>    IN DWORD dwFlags,<br>    IN DWORD dwContext<br>);<br><br>Opens an FTP, Gopher, or HTTP session for a given site. <br><br>Returns a valid handle to the FTP, Gopher, or HTTP session if the connection is successful, or NULL otherwise. To get extended error information, callGetLastError. An application can also use InternetGetLastResponseInfo to determine why access to the service was denied. <br>hInternetSession <br>Handle to the current Internet session. The handle must have been returned by a previous call to InternetOpen. <br>lpszServerName <br>Address of a null-terminated string that contains the host name of an Internet server. Alternately, the string can contain the IP number of the site in ASCII dotted-decimal format (for example, 11.0.1.45). <br>nServerPort <br>Number of the TCP/IP port on the server to connect to. Can be one of the values in the following list. These flags set only the port that will be used. The service is set by the value of dwService. INTERNET_DEFAULT_FTP_PORT  Uses the default port for FTP servers (port 21). <br>INTERNET_DEFAULT_GOPHER_PORT  Uses the default port for Gopher servers (port 70). <br>INTERNET_DEFAULT_HTTP_PORT  Uses the default port for HTTP servers (port 80). <br>INTERNET_DEFAULT_HTTPS_PORT  Uses the default port for HTTPS servers (port 443). <br>INTERNET_DEFAULT_SOCKS_PORT  Uses the default port for SOCKS firewall servers (port 1080). <br>INTERNET_INVALID_PORT_NUMBER  Uses the default port for the service specified by dwService. <br><br>lpszUsername <br>Address of a null-terminated string that contains the name of the user to log on. If this parameter is NULL, the function uses an appropriate default, except for HTTP; a NULL parameter in HTTP causes the server to return an error. For the FTP protocol, the default is "anonymous". <br>lpszPassword <br>Address of a null-terminated string that contains the password to use to log on. If both lpszPassword and lpszUsername are NULL, the function uses the default "anonymous" password. In the case of FTP, the default password is the user's e-mail name. If lpszPassword is NULL, but lpszUsername is not NULL, the function uses a blank password. The following table describes the behavior for the four possible settings of lpszUsername and lpszPassword. lpszUsername  lpszPassword  User name sent to FTP server  Password sent to FTP server  <br>NULL NULL "anonymous" User's e-mail name <br>Non-NULL string NULL lpszUsername "" <br>NULL Non-NULL string ERROR ERROR <br>Non-NULL string Non-NULL string lpszUsername lpszPassword <br><br>dwService <br>Type of service to access. Can be one of the following values: INTERNET_SERVICE_FTP  FTP service. <br>INTERNET_SERVICE_GOPHER  Gopher service. <br>INTERNET_SERVICE_HTTP  HTTP service. <br><br>dwFlags <br>Flags specific to the service used. When the value of dwService is INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE causes the application to use passive FTP semantics. <br>dwContext <br>Application-defined value that is used to identify the application context for the returned handle in callbacks. <br>The InternetConnect function is required before communicating with any Internet service. <br><br>Having a connect function for all protocols, even those that do not use persistent connections, lets an application communicate common information about several requests by using a single function call. In addition, this allows for future versions of Internet protocols that do not require a connection to be established for every client request. <br><br>For FTP sites, InternetConnect actually establishes a connection with the server; for others, such as Gopher, the actual connection is not established until the application requests a specific transaction. <br><br>For maximum efficiency, applications using the Gopher and HTTP protocols should try to minimize calls to InternetConnect and avoid calling this function for every transaction requested by the user. One way to accomplish this is to keep a small cache of handles returned from InternetConnect; when the user makes a request to a previously accessed server, that session handle is still available. <br><br>An application that needs to display multiline text information sent by an FTP server can use InternetGetLastResponseInfo to retrieve the text. <br><br>For FTP connections, if lpszUsername is NULL, InternetConnect sends the string "anonymous" as the user name. If lpszPassword is NULL, InternetConnect attempts to use the user's e-mail name as the password. <br><br>To close the handle returned from InternetConnect, the application should call InternetCloseHandle. This function disconnects the client from the server and frees all resources associated with the connection. <br>
          кто нибудь знает пример?
          1 пользователей читают эту тему (1 гостей и 0 скрытых пользователей)
          0 пользователей:


          Рейтинг@Mail.ru
          [ Script execution time: 0,0247 ]   [ 15 queries used ]   [ Generated: 20.05.24, 04:51 GMT ]