Page 1 of 1

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

Posted: Fri Jun 08, 2018 9:53 am
by edk
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.

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

Posted: Fri Jun 08, 2018 12:33 pm
by bpd2000
Dear Edward,
My OS is Windows 10 64 bit v1803
I am not facing any error running application

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

Posted: Fri Jun 08, 2018 1:37 pm
by edk
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 294 times

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

Posted: Fri Jun 08, 2018 2:22 pm
by martingz
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

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

Posted: Fri Jun 08, 2018 3:18 pm
by edk
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.

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

Posted: Wed Jun 13, 2018 6:55 am
by edk
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 :!: :?: