Here are detailed description of the problem: Case 2: client program on computer A within company LAN. server program on computer B VPNed in company LAN using Sprint aircard and Sonic VPN I can connect from computer A to B Case 3: client program on computer B VPNed in company LAN using Sprint aircard and Sonic VPN server program on computer A within company LAN I cannot connect from computer B to A In both cases, I have added the client and the server programs in Firewall exceptions. The PCs are Windows Vista. I also did some other tests. 1. A program from the followng link: Multi-threaded Client/Server Socket Class[^] This application has the same results as mine. Both applications use Winsock2. 2. A program from the following link: Simple File Transfer Using the Network Development Kit 2.0[^] This program works. This program use MFC CSocket. 3. I can also connect to other SQL server by ADO from the computer B.
Bugslayer1
Posts
-
Client /Server application with VPN connection -
Client /Server application with VPN connectionI wrote a Server/Client application based on TCP/IP. Here are several cases I tested: 1. The applicaiton works fine when both the client and server programs are installed inside a company wired network. 2. The applicaiton works fine when the server program is installed in a computer that is VPNed in while the client program is installed in a company wired network. 3. The client program cannot connect to the server program when the client program is installed in a computer is logged in through VPN into a company network. Can any one provide suggestion on how to solve the problem in case 3?
-
conversion of unix codes to VC++ codesThe lines 975-977 are case 8: return subtract8; case 16: return subtract16; case 32: return subtract32;
-
conversion of unix codes to VC++ codesThanks for your help to expand the codes into a readable fashion. I still have some probelms although I made some progress with some changes. typedef void biasFn (void *image, void *bias, uint32 pixels); static void subtract8 (uint8 *i, uint8 *b, uint32 pixels) { uint8 *image = i; uint8 *bias = b; while (pixels--) { *image = *image > *bias ? *image-*bias : 0; image++, bias++; } } static void subtract16 (uint16 *i, uint16 *b, uint32 pixels) { uint16 *image = i; uint16 *bias = b; while (pixels--) { *image = *image > *bias ? *image-*bias : 0; image++, bias++; } } static void subtract32 (uint32 *i, uint32 *b, uint32 pixels) { uint32 *image = i; uint32 *bias = b; while (pixels--) { *image = *image > *bias ? *image-*bias : 0; image++, bias++; } } static biasFn *lineSubtractFn (unsigned bits) { switch (bits) { case 8: return subtract8; case 16: return subtract16; case 32: return subtract32; } return 0; } ...... biasFn *subtractLine; TIFFGetField(in, 258, &sampleBits); subtractLine = lineSubtractFn (sampleBits); if (subtractLine) { ...... } ...... However, there are some errors I need to work out. Here are the error messages: e:\vc++\libtiff\src\tiff\3.7.2\tiff-3.7.2-src\tools\tiffcp\tiffcp.cpp(975) : error C2440: 'return' : cannot convert from 'void (__cdecl *)(unsigned char *,unsigned char *,unsigned long)' to 'void (__cdecl *)(void *,void *,unsigned long)' This conversion requires a reinterpret_cast, a C-style cast or function-style cast e:\vc++\libtiff\src\tiff\3.7.2\tiff-3.7.2-src\tools\tiffcp\tiffcp.cpp(976) : error C2440: 'return' : cannot convert from 'void (__cdecl *)(unsigned short *,unsigned short *,unsigned long)' to 'void (__cdecl *)(void *,void *,unsigned long)' This conversion requires a reinterpret_cast, a C-style cast or function-style cast e:\vc++\libtiff\src\tiff\3.7.2\tiff-3.7.2-src\tools\tiffcp\tiffcp.cpp(977) : error C2440: 'return' : cannot convert from 'void (__cdecl *)(unsigned long *,unsigned long *,unsigned long)' to 'void (__cdecl *)(void *,void *,unsigned long)' This conversion requires a reinterpret_cast, a C-style cast or function-style cast Any help is appreciated.
-
conversion of unix codes to VC++ codesNo. I cannot. I got the code from libtiff http://www.libtiff.org[^]. One of the tools is tiffcp. I am trying to compile it using VC++.
-
conversion of unix codes to VC++ codesI do not know until I understand these lines of codes. The codes were compiled under Unix system. Problem is that I had a hard time to read the code. Can you explain to me what these lines of codes do?
-
conversion of unix codes to VC++ codesWhen the VC++ compiles the following lines. It throws error messages: subtract(8) subtract(16) subtract(32) error C2440: 'initializing' : cannot convert from 'void *' to 'unsigned char *' Conversion from 'void*' to pointer to non-'void' requires an explicit cast I also had hard to understand these lines of codes.
-
conversion of unix codes to VC++ codesHello there, I tried to incorporate the following code segments in a VC++ project, and to compile it in Visual Studio. There were compiling errors beyond my comprehension. Any help are appreciated. typedef void biasFn (void *image, void *bias, uint32 pixels); #define subtract(bits) \ static void subtract##bits (void *i, void *b, uint32 pixels)\ {\ uint##bits *image = i;\ uint##bits *bias = b;\ while (pixels--) {\ *image = *image > *bias ? *image-*bias : 0;\ image++, bias++; \ } \ } subtract(8) subtract(16) subtract(32) static biasFn *lineSubtractFn (unsigned bits) { switch (bits) { case 8: return subtract8; case 16: return subtract16; case 32: return subtract32; } return NULL; }