|
Thanks for the reply, i did a mistake earlier, i put cmd in the command string and actual command in the parameters, but now its resolved.
Thanks again.
|
|
|
|
|
string ls_path = @"c:\csharpbkp.sql";
System.Diagnostics.Process.Start("mysqldump", "-u root -p emanage >" + ls_path );
why does this not work,
|
|
|
|
|
Probably there is no process or filename by mysqldump ...
Anyhow u got the answer right...
Koushik
|
|
|
|
|
I am using a batch file for now, but there is a process names mysqldump and it works fine on the command prompt and with the batch file.
|
|
|
|
|
<br />
public delegate void updatevalores(int total);<br />
<br />
public partial class FormConexiones : Form<br />
{<br />
private int procesosactuales = 0;<br />
public FormConexiones()<br />
{<br />
InitializeComponent();<br />
}<br />
private void FormConexiones_Load(object sender, EventArgs e)<br />
{<br />
procesos proces = new procesos();<br />
Thread pid = new Thread(new ThreadStart(proces.iniciar(new updatevalores(actualizarv))));<br />
pid.Start();<br />
}<br />
<br />
public void actualizarv(int total)<br />
{<br />
procesosactuales = total;<br />
}<br />
}<br />
Another Class:
class procesos {<br />
{<br />
struct sproceso<br />
{<br />
public int id;<br />
public string NombreProceso;<br />
public string DirProceso;<br />
public string FileProceso;<br />
public DateTime tiempoinicio;<br />
}<br />
ArrayList listaprocesos = new ArrayList();<br />
bool existeproces = false;<br />
bool coincide = false;<br />
Timer nuevotiempo = new Timer();<br />
<br />
public void iniciar(updatevalores procesoact)<br />
{<br />
<br />
nuevotiempo.Elapsed += new ElapsedEventHandler(TiempoEjecutar);<br />
nuevotiempo.Interval = 5000;<br />
nuevotiempo.Enabled = true;<br />
}<br />
<br />
}
The Line Thread pid = new Thread(new ThreadStart(proces.iniciar(new updatevalores(actualizarv)))); has give me an error.
How i can pass values to proces.iniciar method??????????
Thanks
|
|
|
|
|
Hello,
This[^] should help!
All the best,
Martin
|
|
|
|
|
public delegate void updatevalores(int total);<br />
<br />
public partial class FormConexiones : Form<br />
{<br />
private int procesosactuales = 0;<br />
public FormConexiones()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void FormConexiones_Load(object sender, EventArgs e)<br />
{<br />
procesos proces = new procesos();<br />
Thread pid = new Thread(new ParameterizedThreadStart(proces.iniciar));<br />
pid.Start(new updatevalores(actualizarv));<br />
}<br />
public void actualizarv(int total)<br />
{<br />
procesosactuales = total;<br />
}<br />
}
Give me an error with
ParameterizedThreadStart(proces.iniciar)
The error is: none overload correspond 'iniciar' match with 'System.Threading.ParameterizedThreadStart' delegate
what the
|
|
|
|
|
damn
i forget to read:
This is simple, but only accepts a single parameter and isn't type-safe (just like the options when using thread pool threads)
:->
|
|
|
|
|
So you are fine with that?
All the best,
Martin
|
|
|
|
|
Yep
Works Fine:
procesos proces = new procesos();<br />
ThreadStart inipro = delegate { proces.iniciar(new updatevalores(actualizarv)); };<br />
new Thread(inipro).Start();
Ok, so much battle with Thread and asyncronic querys...
time to rest
thanks for all
|
|
|
|
|
Sleep well!
You are wellcome!
All the best,
Martin
|
|
|
|
|
y me getting also feel to sleep..............
a very long conversation to a simple problem...
Thanks and regards
manoj Kumar Jha
|
|
|
|
|
What are webparts?What is the use of webparts
|
|
|
|
|
what is google[^] ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: what is google[^] ?
Oohhh!!! Are we playing Jeopardy now?
|
|
|
|
|
Christian Graus wrote: what is google
I don't know but a simple search on About.com[^] finds the answer! Are you helpless!
|
|
|
|
|
hi all,
how to wrap a text of a item to the next line of listview
if the length is too long?
i found in msdn that the labelwrap property works only if the view mode is set to largeicon or smallicon.
i need to set the view mode to Tile and i need to wrap the text
how is it possible?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
I think this[^] is what you are looking for.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi
I have Windows server 2000 with Terminal Services components installed.
I set ERRORLVEL in C# console application using
System.Environment.Exit(1); OR
System.Environment.ExitCode = 1;
but on dos prompt if i type echo %ERRORLEVEL% , it always returns 0.
I seen on KB from Microsoft-- KB 810146
http://support.microsoft.com/kb/810146
which mentiones that Scripts that check the %errorlevel% system variable may return inconsistent values when run on a Windows 2000-based computer with Terminal Services components installed.
so what is the workaround/soluation for this ? How to set ERRORLEVEL for Windows 2000 with Terminal Services components installed ?
-sandeep
-- modified at 6:19 Thursday 11th October, 2007
|
|
|
|
|
s v joshi wrote: so what is the workaround/soluation for this ?
According to the Microsoft Knowledge Base article you quoted there is a RESOLUTION to the problem. Did you follow the instructions it gave?
|
|
|
|
|
Hi
I have service pack 4 installed .
I have searched Microsoft.com for "Windows 2000 hotfix KB810146" but did not get any result.
I am searching for this hotfix but not getting any results. I guess i need to contact support for it.
But i wonder if i set the ERRORLEVEL form c++ then echo %ERRORLEVEL% returns correct value but if i set from C# then only it shows 0.
-sandeep
|
|
|
|
|
And return ing the value from Main doesn't work either?
[System.STAThreadAttribute]
static int
Main
(
string[] args
)
{
return ( 1 ) ;
}
After reading the KB, it seems it only applies to processes that get killed and don't reach the return .
|
|
|
|
|
change your batch command to
start /wait %path_to_your_exe% to get the right %errorlevel%
|
|
|
|
|
Hello,
I have a tool that creates a word document using C#. To do this, I used the MS Word 11.0 Object Library. Now I tried installing the application on the local of a colleague of mine but he is unable to create an MS Word doc and is prompting an error. I need help in knowing the requirements (I can't seem to find the right keywords to search for it on google.)
Here are some of my questions:
- Should the same MS Word version be installed on the user's pc, or will a different version work?
- Should it be the same edition? (Like Professional or Small Business edition)
- Should the .Net Programmability Support be installed for the MS Word of the user's local? Or is this only needed by the developer to have access to the 11.0 Object library?
- Any other useful information?
Thank you!
Rafferty
|
|
|
|
|