Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Arne

Re: Console crashes when started from .Net

I've been writing this in VB.Net :oops: (Not my choice):

Dim objStarupInfo As System.Diagnostics.ProcessStartInfo
objStarupInfo = New System.Diagnostics.ProcessStartInfo(System.Windows.Forms.Application.StartupPath & "WinSCP3\WinSCP3.com")
'Setting startup parameters
'Redirecting input and output streams
objStarupInfo.CreateNoWindow = True
objStarupInfo.RedirectStandardInput = True
objStarupInfo.RedirectStandardOutput = True
objStarupInfo.RedirectStandardError = True
objStarupInfo.UseShellExecute = False
objStarupInfo.WorkingDirectory = System.Windows.Forms.Application.StartupPath & "\WinSCP3"
Me.m_objSCPConsole = New Process(objStarupInfo)
Me.m_objSCPConsole.Start()
martin

Re: Console crashes when started from .Net

Can you show me piece of code you use to run WinSCP? I do not have a .NET environment, however I can try to implement something similar in C.
Guest

Re: Console crashes when started from .Net

martin wrote:

What do you mean that you looked at a working .com file?


I've started it from cmd (command prompt). Works fine then. I'm just not able to start the process from .Net. crashes with *testing*

Eception code 0xc0000005 first then again
Eception code 0xc0000005 and then
Eception code 0xc0000027.

Don't know what the exception codes stand for... Or if they're relevant at all
martin

Re: Console crashes when started from .Net

Arne wrote:

I also looked at a working .com file (started fom cmd) and compared it to a crashed one (started as a process in .Net), but the only difference seemed to be that the envornment keys (not values) in the latter one were all lowercase.

What do you mean that you looked at a working .com file?
Arne

Console crashes when started from .Net

I'm trying to use WinSCP, runtime, from a program I'm working on. I've already got PLink up and running and I'm going to use that for issuing commands. I'd like to use the WinSCP sychronize function for file transfer though :)

I was able to redirect the WinSCP output stream (.Net), but the WinSCP3.com crashes when I start the process (even if I don't redirect the stream). If I just remove the .exe, I get the output stream nice and tidy as it complains it can't find the file.

I looked up the error code, and it complained about some memory conflict (I think).

I also looked at a working .com file (started fom cmd) and compared it to a crashed one (started as a process in .Net), but the only difference seemed to be that the envornment keys (not values) in the latter one were all lowercase. The .com file also crashes After it has started the WinSCP.exe process (Problem communicating with WinSCP.exe?), which seems to be working fine... It lives on as a seperate process after the WinSCP.com is terminated.

Got a clue about this? :)

Arne