rejetto forum

SD_BOTH undeclared

0 Members and 1 Guest are viewing this topic.

Offline edpsatu

  • Occasional poster
  • *
    • Posts: 1
    • View Profile
Please help how to solve this problem.
Thanks B4

[Pascal Error] HSlib.pas(792): E2003 Undeclared identifier: 'SD_BOTH'
[Pascal Error] HSlib.pas(1223): E2003 Undeclared identifier: 'SD_BOTH'
[Pascal Fatal Error] main.pas(38): F2063 Could not compile used unit 'HSlib.pas'



Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2039
    • View Profile
Quote
{ *********************************************************************** }
{                                                                         }
{ Delphi Runtime Library                                                  }
{                                                                         }
{ Copyright (c) 1996-2005 Borland Software Corporation                    }
{                                                                         }
{ *********************************************************************** }

{*******************************************************}
{       Win32 sockets API Interface Unit                }
{*******************************************************}

unit WinSock;

{$WEAKPACKAGEUNIT}

interface

uses Windows;

{ HPPEMIT '#include <windows.h>'}

type
  {$EXTERNALSYM u_char}
  u_char = Char;
  {$EXTERNALSYM u_short}
  u_short = Word;
  {$EXTERNALSYM u_int}
  u_int = Integer;
  {$EXTERNALSYM u_long}
  u_long = Longint;

{ The new type to be used in all
  instances which refer to sockets. }
  {$EXTERNALSYM TSocket}
  TSocket = u_int;

const
  {$EXTERNALSYM FD_SETSIZE}
  FD_SETSIZE     =   64;

// WinSock 2 extension -- manifest constants for shutdown()
  {$EXTERNALSYM SD_RECEIVE}
  SD_RECEIVE     = 0;
  {$EXTERNALSYM SD_SEND}
  SD_SEND        = 1;
  {$EXTERNALSYM SD_BOTH}
  SD_BOTH        = 2;

type
// the following emits are a workaround to the name conflict with
// procedure FD_SET and struct fd_set in winsock.h


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13309
    • View Profile
thanks mars
as you can see, the value is defined in standard winsock library bundled with Turbo Delphi (2006), it's value is 2.