Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1013 Bytes

getprotobyname.md

File metadata and controls

41 lines (28 loc) · 1013 Bytes

Home

Function name : getprotobyname

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


The getprotobyname function retrieves the protocol information corresponding to a protocol name.


Code examples:

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

Declaration:

struct PROTOENT FAR * getprotobyname(
  const char FAR *name
);  

FoxPro declaration:

DECLARE INTEGER getprotobyname IN ws2_32;
	STRING name  

Parameters:

name [in] Pointer to a null-terminated protocol name.


Return value:

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