Nat hole punching sample not working

Nat hole punching sample not working

http://software.intel.com/en-us/articles/building-nat-friendly-applicati...

This page has two links to code that can be used to demonstrate NAT traversal. When I convert the client code toVisual Studio 2008 format, it gives some errors when I compile it.How do I fix there errors?

Andthe client code is supposed to display a blank command prompt window when run, right?

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Visual Studio project conversions are never straight forward.

What errors are you seeing?

Client:
Warning 1 warning C4996: 'CWinApp::Enable3dControls': CWinApp::Enable3dControls is no longer needed. You should remove this call. c:\users\owner\downloads\natclient\natclientdialog.cpp 56 NatClientDialog
Warning 2 warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 89 NatClientDialog
Warning 3 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 94 NatClientDialog
Warning 4 warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 96 NatClientDialog
Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 115 NatClientDialog

(I also included the warnings, figuring that they couldn't hurt.)

Server:
Warning 1 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 25 NATServer
Warning 2 warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 117 NATServer
Warning 3 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 120 NATServer
Warning 4 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 155 NATServer
Warning 5 warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 156 NATServer

(The server compiled just fine. It opened a blank command prompt window, but I am assuming that it is supposed to do that. I posted the warnings just in case. But they don't seem like they should be causing any problems.)

Leave a Comment

Please sign in to add a comment. Not a member? Join today