Appendix C: Program Examples
134
FX
3U
-ENET-ADP User's Manual
Appendix C-1 Program example for communication using MC protocol -1
<Remarks>
• The following explains an outline of the compiling procedure for a program created using Microsoft
Corporation Visual C++ .NET
1) Start Visual C++ .
2) Prepare for program creation.
Select "New Project" from the project tab, select "Win32 console project", and create an empty project
with the name "ENETSAMP".
3) Add ENETSAMP.C to the project and create a program.
(See the program example on the next page.)
4) Compile the created file from the compile screen of the build menu.
5) From the project menu property setting screen, add WSOCK32.LIB to the linker addition dependency
files.
6) Create an executable file (ENETSAMP.EXE) on the build screen of the build menu.
7) End Visual C++ .NET.
8) Execute ENETSAMP.EXE.
• Outline of the procedure for calling the socket routine
Start
socket()
bind()
Passive open
Active open
UDP
listen()
connect()
accept()
send()/recv()
sendto()/recvfrom()
shutdown()
closesocket
Complete
(Create socket)
(Bind)
(Open)
(Communicate)
(Disable sending/receiving)
(Close)
Summary of Contents for FX3U-ENET-ADP
Page 1: ...FX3U ENET ADP USER S MANUAL ...
Page 2: ......
Page 6: ... 4 Safety Precautions Read these precautions before use MEMO ...
Page 161: ......