I am testing out the C# example in https://winscp.net/eng/docs/library#csharp
. I find out when it starts up, it takes about 30 seconds or so before initialization of SessionOptions object. Why is there this delay? And how can I reduce the delay?
I am required to write a C++/CLI program using WinSCP. I follow that C# example and have converted it (manually) to C++/CLI version of it. Likewise, when the program reaches the initialization of SessionOptions object, it takes 30 seconds already. Why? Can it be shortern?
For C# program, if I comment out everything in Main() but have only one WriteLine('Done') statement, the program returns immediately.
For C# program, if I have only the initialization of SessionOptions and that WriteLine() statement, the program takes about 32 seconds to return.
For C++/CLI program, if I comment out everything in Main() and even the #using "WinSCPnet.dll" but have that one WriteLine() statement, the program returns immediately.
For C++/CLI program, if I uncomment #using "WinSCPnet.dll", and have
WinSCP::SessionOptions ^ sftpSessionOptions = nullptr;
WinSCP::SessionOptions ^ sftpSession = nullptr;
the word "Done" appears at least 30 seconds after start up of program.