kioslave win32 port start
Ralf Habacker
ralf.habacker at freenet.de
Fri Dec 1 18:58:52 CET 2006
Manuel Klimek schrieb:
>> -> getaddrinfo does not work (correct?) on w2k ... wxpsp2 is needed.
>>
>> cmake finds getaddrinfo() but we should not use it.
>>
>
> according to msdn you have to add some includes to make this work:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/getaddrinfo_2.asp
>
> Support for getaddrinfo on older versions of Windows
>
> The getaddrinfo function was added to the Ws2_32.dll on Windows XP and
> later. If you want to execute an application using this function on
> earlier versions of Windows (Windows 2000, Windows NT, and Windows
> Me/98/95), then you need to include the Ws2tcpip.h file and also include
> the Wspiapi.h file. When the Wspiapi.h include file is added, the
> getaddrinfo function is defined to the WspiapiGetAddrInfo inline
> function in the Wspiapi.h file. At runtime, the WspiapiGetAddrInfo
> function is implemented in such a way that if the Ws2_32.dll or the
> Wship6.dll (the file containing getaddrinfo in the IPv6 Technology
> Preview for Windows 2000) does not include getaddrinfo, then a version
> of getaddrinfo is implemented inline based on code in the Wspiapi.h
> header file. This inline code will be used on older Windows platforms
> that do not natively support the getaddrinfo function.
>
> The IPv6 protocol is supported on Windows 2000 when the IPv6 Technology
> Preview for Windows 2000 is installed. Otherwise getaddrinfo support on
> versions of Windows earlier than Windows XP is limited to handling IPv4
> name resolution.
>
> The GetAddrInfoW function is the Unicode version of getaddrinfo. The
> GetAddrInfoW function was added to the Ws2_32.dll in Windows XP SP2. The
> GetAddrInfoW function cannot be used on versions of Windows earlier than
> Windows XP SP2.
>
Christian found out that some of this problems are caused by missing
winsock initialisation which has to be in every application in the
following manner.
WSADATA wsaData;
WORD wVersionRequested = MAKEWORD( 2, 2 );
WSAStartup( wVersionRequested, &wsaData );
Because placing such call in very applications looks very mess and I
think there must be a way to place this in kdewin32 or kdecore library.
Is anybody there who has an idea where to place this stuff ? In
KCoreApplication constructor oder somewhere else ?
As Manuel stated above there seems some effort be required to enable ipv6.
F:\daten\kdelibs-build\kdecore\network\tests>socketdevicetest.exe
Using stream sockets
Testing creation of a server socket
Trying to bind to [0000:0000:0000:0000:0000:0000:0000:0000:]:0
Failed to bind to [0000:0000:0000:0000:0000:0000:0000:0000:]:0
^^^^^^^^
Trying 0.0.0.0:0
Bound to: 0.0.0.0:3869
Testing connection of client socket
Connection failed to 0.0.0.0:3869
^^^^ here is another problem
Ralf
> _______________________________________________
> Kde-windows mailing list
> Kde-windows at kde.org
> https://mail.kde.org/mailman/listinfo/kde-windows
>
More information about the Kde-windows
mailing list