Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1017 Bytes

getprotobynumber.md

File metadata and controls

41 lines (28 loc) · 1017 Bytes

Home

Function name : getprotobynumber

Group: Windows Sockets 2 (Winsock) - Library: ws2_32


The getprotobynumber function retrieves protocol information corresponding to a protocol number.


Code examples:

Winsock: how to retrieve the protocol information corresponding to a protocol number

Declaration:

struct PROTOENT FAR * getprotobynumber(
  int number
);  

FoxPro declaration:

DECLARE INTEGER getprotobynumber IN ws2_32;
	INTEGER number  

Parameters:

number [in] Protocol number, in host byte order.


Return value:

If no error occurs, getprotobynumber returns a pointer to the protoent structure. Otherwise, it returns a NULL pointer and a specific error number can be retrieved by calling WSAGetLastError.