Indy WSAStartup Error lazarus / 25-WinCE ---------------------------------------------------------------------- SONFEDAI · 2011-12-11 21:05 Indy can not Start Winsock on Windows CE. Error is "Error on call to Winsock2 library function WSAStartup" How to solve this problem. Any Idea? ---------------------------------------------------------------------- SONFEDAI · 2011-12-11 23:04 Solved Thanks ---------------------------------------------------------------------- felipemdc · 2011-12-12 06:31 Please always mention how you solved something so that people searching in the future can use this information. thanks ---------------------------------------------------------------------- SONFEDAI · 2011-12-13 19:26 Original Indy 10.2.0.3 IdWinsock2.Pas Quotefunction FixupStub(hDll: THandle; const AName: string): Pointer; {$IFDEF USEINLINE}inline;{$ENDIF} begin   if hDll = 0 then begin     raise EIdWinsockStubError.Build(WSANOTINITIALISED, RSWinsockCallError, [AName]);   end;   Result := Windows.GetProcAddress(hDll, {$IFDEF WINCE}PWideChar {$ELSE}PChar {$ENDIF}(AName));   if Result = nil then begin     raise EIdWinsockStubError.Build(WSAEINVAL, RSWinsockCallError, [AName]);   end; end; Change It Quotefunction FixupStub(hDll: THandle; const AName: string): Pointer; {$IFDEF USEINLINE}inline;{$ENDIF} {$IFDEF WINCE} Var   S: Array[0..512] Of WideChar; {$ENDIF} begin   if hDll = 0 then begin     raise EIdWinsockStubError.Build(WSANOTINITIALISED, RSWinsockCallError, [AName]);   end;   {$IFDEF WINCE}     StringToWideChar(AName, S, Length(AName) + 1);     Result := Windows.GetProcAddress(hDll, S);   {$ELSE}     Result := Windows.GetProcAddress(hDll, PChar(AName));   {$ENDIF}   if Result = nil then begin     raise EIdWinsockStubError.Build(WSAEINVAL, RSWinsockCallError, [AName]);   end; end; I Think Lazarus For WinCE not convert (using cast) String to WideChar because result is AName is not correct in original code But IdTCPClient do not connect I'm working