Winsock の version 等を知る。
PROGRAM winsock USE ifwina IMPLICIT NONE INTEGER :: iret, iMaxSockets, iMaxUdpDg INTEGER (WORD) :: wVer TYPE (T_WSADATA) :: lpWSAData wVer = MAKEWORD(2, 0) iret = WSAStartUp(wVer, lpWSAData) IF (iret /= 0) STOP 'Socket Error' ! PRINT *, 'wVersion :', LOBYTE(lpWSAData%wVersion) , HIBYTE(lpWSAData%wVersion) PRINT *, 'wHighVersion :', LOBYTE(lpWSAData%wHighVersion), HIBYTE(lpWSAData%wHighVersion) PRINT *, lpWSAData%szDescription ( 1:INDEX(lpWSAData%szDescription , CHAR(0)) ) PRINT *, lpWSAData%szSystemStatus( 1:INDEX(lpWSAData%szSystemStatus, CHAR(0)) ) iMaxSockets = TRANSFER(lpWSAData%iMaxSockets, iMaxSockets) PRINT *, iMaxSockets iMaxUdpDg = TRANSFER(lpWSAData%iMaxUdpDg , iMaxUdpDg) PRINT *, iMaxUdpDg ! iret = WSACleanup() STOP END PROGRAM winsock
本文と関係ありません。もう15年位たつのですか・・・orz