|
|
Hi,
The code you posted is implemented as a blocking socket. It will literally block the entire thread until it receives a response from the other side.
To avoid this you can set the SO_RCVTIMEO[^] socket option.
Best Wishes,
-David Delaune
|
|
|
|
|
Would anyone know how to obtain a HINTERNET handle I tried OpenInternet included wininet.h but got errors as there were #define openinternet openinternetW and the compiler said openinternetW not defined even though I saw the function prototype in wininet.h
thanks
|
|
|
|
|
I just looked at Wininet.h and there is no reference to OpenInternet, and neither Google nor MSDN appear to know about it. Which version are you working with?
|
|
|
|
|
Sorry my mistake its InternetOpen regardless intelisense is giving me a error #define internetOpen internetOpenW and internetOpenW is not defined
However looking at winInet.h
INTERNETAPI_(HINTERNET) InternetOpenA(
_In_opt_ LPCSTR lpszAgent,
_In_ DWORD dwAccessType,
_In_opt_ LPCSTR lpszProxy,
_In_opt_ LPCSTR lpszProxyBypass,
_In_ DWORD dwFlags
);
INTERNETAPI_(HINTERNET) InternetOpenW(
_In_opt_ LPCWSTR lpszAgent,
_In_ DWORD dwAccessType,
_In_opt_ LPCWSTR lpszProxy,
_In_opt_ LPCWSTR lpszProxyBypass,
_In_ DWORD dwFlags
);
#ifdef UNICODE
#define InternetOpen InternetOpenW
#else
#define InternetOpen InternetOpenA
#endif // !UNICODE
Whether my property page settings are Unicode or Multicharacter I still get the same error
Thanks
|
|
|
|
|
OK, I found it, and compiling with a call to InternetOpen() works fine. You need to gather, and show us, more information.
|
|
|
|
|
just started console application to see how I can obtain the FTP directory . one of the params was a HINTERNET handle
This is the code As for the property pages as I can not attach a picture I can only read off what I think is relevant
use of MFC - use standard windows libraries
Character Set Use Unicode character set
Windows SDK Version 10.0.17763.0
#include "pch.h"
#include <iostream>
#include "winInet.h"
int main()
{
std::cout << "Hello World!\n";
InternetOpen("DBGR", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, INTERNET_FLAG_ASYNC);
}
This was the include directory generated by Visual Studio
Quote: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\include
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\VS\include
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\cppwinrt
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Include\um
|
|
|
|
|
This is a console application so it will be missing lots of definitions. You need to include windows.h before any of the other include files.
|
|
|
|
|
thank you on to the next step to see if I can get the FRP Directory
|
|
|
|
|
Hi
I just set up FTP on Windows 10 wonder if there are any registery setting for instance to find out the folder you set for your FTP Location
thanks
|
|
|
|
|
|
all I come up with searching is how to install FTP on Windows which I already did I tested it out from z/os yesterday using FTP client API EZAFTPKS the MSDN api to lets me know about folder change I was just thinking rather then hard code the folder that I am monitoring for changes I could get the FTP folder name from registry doesn't seem like there is an entry
|
|
|
|
|
Check the documentation to see if it refers to any config options. Application developers generally avoid using the registry these days.
|
|
|
|
|
|
|
With e.g. Ubuntu, it is simple: There is a single Docker base image, updated in step with the non-dockerized OS.
With Windows, you got a plethora of them: servercore, nanoserver, dotnet-framework, ... And it is difficult to tell which ones are meant as "general" bases, which ones are tailored to a (small or large) specific application area, which ones are more or less complete applications rather than primarily intended as base images.
The one-line description rarely tells more than the name does, and says nothing about how this alaternative compares to other alternatives.
Is there anywhere to be found a "comparison chart" over the various (general) Windows Docker base images, telling which features are included or not in each of them?
|
|
|
|
|
I will explain these in the most simple words, but you need to bear with me that the usage of these images is not for general cases, they are specialized images available for special needs.
Quote: servercore, nanoserver, dotnet-framework As their names suggest, they are the images for Windows Server, and here is the description for the image,
Quote: The official Windows Server Core base image for containers And that clears up that this image is the base image for containers that would work on Windows Server. Same for others, for example the dotnet-framework. Who doesn't know this one?
Oh, and to your curiosity, there is still a .NET SDK image as well that provides a base image for your build tool.
Quote: which ones are more or less complete applications rather than primarily intended as base images. Like I said, they all have their specialized features, there is Windows docker image, if that is what you mean. Comparing Ubuntu with Windows Server, or .NET framework is like comparing oranges to apple juice (get it?).
Quote: how this alaternative compares to other alternatives. Seems like you have not been working on Windows environments lately, or perhaps you are a Linux guy, because that is pretty much clear the way Windows works.
Windows has some native app development frameworks, Win32, MFC, WinRT (Windows Runtime) and Universal Apps, and then there are some modern frameworks (older actually!) like .NET framework, .NET Core, .NET Standard, and much more... Then there are different flavors of Windows like Windows for consumers—the Windows we use—and Windows Server for workloads, think of that as Ubuntu Server, then there is Windows for IoT, Windows Mobile (dead almost), and whatnot...
Man, Windows is merely 2 years younger than this universe, and ever expanding.
I would recommend spending some time with Windows development environments and these names will make much more sense than they do right now.
Quote: Is there anywhere to be found a "comparison chart" This is something that I completely agree with, for beginners this can be helpful. Would you like to contribute your findings on CodeProject for others to benefit from?
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
|
|
do not write code for windows but windows no supports microSD card fix, I am in need of software to fix microSD card.
|
|
|
|
|
Your question still has nothing to do with Windows Development, and Dave has already given you a link to find the answer.
|
|
|
|
|
In a LAN with many computers, only a few computers when I set static IP computer is not connected to the network but I set dynamic IP the computer works normally, how to fix this error ?
|
|
|
|
|
Assuming that you have got DHCP server in LAN which is responsible for automatic ip addresses assignement.
When you set static ip and its address is out of range of your DHCP, you can't connect to the internet.
|
|
|
|
|
I configured static IP is of course the full input already, you have not read my information carefully, in the LAN there are many computers set static IP works well but only a few machines can not set the static IP to Dynamic IP works, of course when I set a static IP that doesn't have duplicate IP but it still doesn't work
|
|
|
|
|
And what range of IP addresses is reserved for dynamic assignement (on DHCP server side)?
What IP are you trying to set manually?
What error message do you get?
In my opinion, when you set static IP addresses, you provoke IP address conflict
modified 12-Sep-19 3:07am.
|
|
|
|