The problem with Internet services on computers with Windows 10 version 1803

Issues and Discussions related to Harbour

Moderator: Rathinagiri

Post Reply
edk
Posts: 342
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 96 times
Been thanked: 249 times

The problem with Internet services on computers with Windows 10 version 1803

Post by edk » Fri Jun 08, 2018 9:53 am

Hello all.

Issue refers to the situation when we run the program on Windows 10 v1803 from a mapped network resource shared on Windows XP or Linux (SMB1).

Since the release of Windows 10 v1803, some commands related to network sockets have stopped working. In general, the application has prohibited access to the Internet.
On some hb_ functions of the sockets written in C, the program crashes and on others it reports the error code 22 - EINVAL - an invalid argument.

I tried various options: "Run as Administrator", "Run in compatibility mode", I added a mapped network resource as a trusted Intranet. I turned off the Firewall on the host and client computers, unfortunately unsuccessfully.

Issue does not occur when you run the program from a local disk on Windows 10 v1803 or from a shared network resource on another Windows 10, Server 2008, etc.

Below is a short code that checks Internet connection using various methods.
The first two methods return no Internet connection, and the third crash.

Code: Select all

#include "hmg.ch"

FUNCTION Main()
Local isInet

Msgbox('Method 1')
isInet := InternetCheckConnection( "https://www.google.com" )
msginfo("Internet " + If ( isInet, "available", "NOT available!" ))


MsgBox('Method 2')
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa384346(v=vs.85).aspx
isInet := If(HMG_CallDLL("Wininet.dll", 0, "InternetCheckConnection", "https://www.google.com", 1 /*FLAG_ICC_FORCE_CONNECTION*/, 0) == 1, .T., .F.)
msginfo("Internet " + If ( isInet, "available", "NOT available!" ))


MsgBox('Method 3')
isInet := isInternet()
msginfo("Internet " + If ( isInet, "available", "NOT available!" ))
RETURN
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FUNCTION isInternet( nTimeOut )
	Local aAddr:=hb_socketResolveINetAddr( "www.google.com" , 80 )
	Local socket:=hb_socketOpen()
	Local lIsNet
	Default nTimeOut:=2000
	MsgDebug(socket, aAddr, nTimeOut)
	lIsNet:=!EMPTY( aAddr ) .AND. hb_socketConnect( socket , aAddr, nTimeOut )
	hb_socketClose( socket )
RETURN lIsNet


#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
#include <wininet.h>
#define FLAG_ICC_FORCE_CONNECTION    0x00000001

HB_FUNC( INTERNETCHECKCONNECTION )
{
   const char * cUrl = hb_parc( 1 );
   hb_retl( (HB_BOOL) InternetCheckConnection( cUrl, FLAG_ICC_FORCE_CONNECTION, 0 ) );
}
#pragma ENDDUMP
Regards, Edward.

User avatar
bpd2000
Posts: 1024
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 165 times
Been thanked: 72 times

Post by bpd2000 » Fri Jun 08, 2018 12:33 pm

Dear Edward,
My OS is Windows 10 64 bit v1803
I am not facing any error running application
Attachments
Untitled.png
Untitled.png (12.9 KiB) Viewed 1116 times
BPD
Convert Dream into Reality through HMG

edk
Posts: 342
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 96 times
Been thanked: 249 times

Post by edk » Fri Jun 08, 2018 1:37 pm

bpd2000 wrote:
Fri Jun 08, 2018 12:33 pm
Dear Edward,
My OS is Windows 10 64 bit v1803
I am not facing any error running application
Yes, if you are running a file from a local disk or from a shared network resource on another Windows 10, Server 2008, 2012.

But try to run from a mapped drive that has been shared on Windows XP ;)
0.png
0.png (102.47 KiB) Viewed 1103 times

martingz
Posts: 243
Joined: Wed Nov 18, 2009 11:14 pm
Location: Mexico
Has thanked: 12 times
Been thanked: 9 times

Post by martingz » Fri Jun 08, 2018 2:22 pm

windows 10 update version 1803
the creation in a shared disk of a file, took more than 2 minutes, making the generation of XML files a big headache
previously the creation was almost instantaneous, I had to uninstall the update so everything worked fine
some programs failed

OS windows 10 32 bits version 1803

edk
Posts: 342
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 96 times
Been thanked: 249 times

Post by edk » Fri Jun 08, 2018 3:18 pm

Generally, in the latest version of Win 10, they changed a lot in network connections, there are also many other bugs, for example with power management, with sound or graphics. Some commercial programs also work unexpectedly, e.g., Eset.

I just wanted to signal the problem, as if someone had a similar problem, that his applications work properly on some Win 10 v1803, and not necessarily on others. I wasted a lot of time to find this dependence.

edk
Posts: 342
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 96 times
Been thanked: 249 times

Post by edk » Wed Jun 13, 2018 6:55 am

Confirmed issue by Microsoft.
Known issues in this update
Symptom
Some users running Windows 10 version 1803 may receive an error "An invalid argument was supplied" when accessing files or running programs from a shared folder using the SMBv1 protocol.

Workaround
Enable SMBv2 or SMBv3 on both the SMB server and the SMB client, as described in KB2696547.

Microsoft is working on a resolution that will be available later in June.
I wonder how to enable SMB2 and/or SMB3 on Windows XP :o :!: :?:

edk
Posts: 342
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 96 times
Been thanked: 249 times

Post by edk » Tue Jul 03, 2018 9:58 am

Update KB4284848 resolves the issue. :mrgreen:
https://support.microsoft.com/en-us/hel ... -kb4284848

Post Reply