|
I have stripped my code as much as possible to isolate the problem.
If I try to kill another application, say notebook, it works fine.
So I think it must be rtrobo.exe leaving resources that causes troubles.
Note: this code is only used in debug mode.
static void Main(string[] args)
{
Process robotProcess = new Process();
robotProcess.StartInfo.FileName = @"C:\Program Files\Rational\Rational Test\rtrobo.exe";
robotProcess.StartInfo.Arguments = @"Test_001 /user admin /project e:\Sobek\TestcasesNew\Testcases.rsp /build 'Build 1' /NoLoginServices /logfolder Default /play /log Mylog /nolog";
robotProcess.Start();
// In debug mode, wait until rtrobo finishes startup.
Process [] procs = Process.GetProcessesByName( "rtrobo" );
for (int i=0; i
|
|
|
|
|
Hi,
I'm newbie in c# and I create a windows Application.
I want to call a c function in my program.
(I want to call libTiff function)
How can I do this?
Regards.
Have a nice day
bibax en fait un max!
|
|
|
|
|
|
Thx for reply, it seems to be what I search.
Now I have to understand it and use it.
thx
Have a nice day.
bibax en fait un max!
|
|
|
|
|
HI,
I need to get the value of Address from XML file and want to display this Attribute value on Label
Pls tell me the XPATH for Retriveing value of Address
I also need the valie of lastjob
How should i do validation the values from XML file because there can be multiple enrty from user into XMl file how can i select a particular node from XML file
Fomat of this file is as given below
-----------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
- <root>
- <farm-config>
- <farm name="dev1">
- <connection address="192.168.1.3" user="ohm" selectedConnection="1" password="sanjeev">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
- <database state="0" name="bd_house1" sourceType="Monkey">
- <tables state="0" name="CAT">
<columns state="0" name="DATE" />
<columns state="0" name="TIME" />
<columns state="0" name="DAY" />
<columns state="0" name="MONTH" />
<columns state="0" name="YEAR" />
<columns state="0" name="PRODWEEK" />
<columns state="0" name="PRODDAY" />
<columns state="0" name="WEEKDAY" />
<columns state="0" name="SILO" />
<columns state="0" name="CAR" />
<columns state="0" name="PRODUCT" />
<columns state="0" name="VOLUME" />
</tables>
- <tables state="0" name="DOG">
<columns state="0" name="DATE" />
<columns state="0" name="TIME" />
<columns state="0" name="DAY" />
<columns state="0" name="MONTH" />
<columns state="0" name="YEAR" />
<columns state="0" name="PRODWEEK" />
<columns state="0" name="PRODDAY" />
<columns state="0" name="WEEKDAY" />
<columns state="0" name="SILO" />
<columns state="0" name="CAR" />
<columns state="0" name="PRODUCT" />
<columns state="0" name="VOLUME" />
</tables>
</database>
</farm>
</farm-config>
</root>
Regards
sanjeev
|
|
|
|
|
Delete both of these posts and then repost your question, but this time, check the little box under the message window that says "Do not treat <'s as HTML tags".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Guys,
I’m trying to determine when files are being copied on my system.
I started off with the File System Watcher component in .NET, but a copy can’t be inferred from any combination of create or change events. So that won’t work.
I wanted to try Copy Hook Handlers next, but it turns out that Copy Hook Handlers only work with folders or printer objects.
So my question is: Are there any API calls or anything else for that matter, which can be used to monitor copy events?
Thank you
|
|
|
|
|
A Copy operation from any source to your machine is no different than a Create file and Write to it. So, no, there's no way to tell the difference between a file Copy and an application just saving a document to the hard drive.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Any suggestion or link to any forum documentation but in .NET ?
|
|
|
|
|
|
I need to change image (logo)on the my reports (C#) .What is the best load to the image into the report.
Thanks for any help
|
|
|
|
|
Hi all!
I have a small Interop question:
I have a COM object that takes a structure as in-parameter. One of the fields in the structure is an IID*. When doing this in C++ the code:
GUID rrid = __uuidof( _InterfaceName );
parStruct.riid = &rrid;
works fine.
How would I do this in C#? I have tried several things, but can´t get it to work. The type of the struct-field in C# is intPtr. And the only way I can find such a type, that I can think of, is:
Type t = typeof( _InterfaceName );
System.RuntimeTypeHandle h = t.TypeHandle;
parStruct.riid = h.Value;
But I guess that I am way off here.
Any one that can give me a hand here?
Regards
Mikke
Added info:
Hi again!
I tried to create a C++ .Net project instead, just to try and find a work-around. When I took the COM objects needed and tried to import them into my brand new cpp project i got this error message:
TlbImp warning: The type library importer could not convert the signature for the member 'RobEventParams.riid'.
And a couple of other ones like this one for other similar parameter-structs with riid fields. What does that mean for me? Is it impossible to marshal something from .Net into this COM? The purpose is to set up a sink and recieve events from the COM object, to do this I should send a ref to an object that should recieve the events and the signature of an interface implemented in the receiver. It is the interface "signature" that is the riid, and also the problem here. When I execute my C# code above I get an exception telling me that "No such interface supported". Do I have to submit a non-.net method as a sink here?
Best regards again / Mikke
|
|
|
|
|
Hi! I have a listview, let's say with 4 columns, with fullrow selection.
When i select one row, i want to get the element from the second column.
Can you tell me how to do that?
I know how to get the element from the first column, but to get the other element's of the row selected is kind of a problem for me.
Thanks!
|
|
|
|
|
|
How to use C++ style cast ( reinterpret_cast ) in C# ???
In C++ context :
NMHDR* pNMHDR;
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );
Please give me the answer.
Thanks.
trannampro@yahoo.com
|
|
|
|
|
There are no special casting operators in C# like static_cast, dynamic_cast or reinterpret_cast. Just use the normal casting operator, like
void SomeFunc(object obj)
{
MyType t = (MyType) obj;
}
Just remember that the CLR will never allow type casts that violate casting rules, so you really cannot simulate the effect of reinterpret_cast in C# or any .NET language.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
In addition to the previous answer you can also use the as keyword.
The cast operator will throw an exception when the conversion is not possible, with as you'll get a null reference.
For example:
void MyFunc(object o)<br />
{<br />
MyType t = o as MyType;<br />
if (t == null)<br />
}
Regards,
mav
|
|
|
|
|
How to convert int/long to string and string to long in C#?
thanks.
|
|
|
|
|
string 2 long
Convert.ToInt64(stringvalue);
long 2 string
string strlongvalue = longvalue + "";
You can use the Convert class voor a lot of conversions.
Good luck.
No hurries, no worries.
|
|
|
|
|
You mean:
int i0 = 777;
long l0 = 999999;
string kk = i0.ToString();
string kk2 = l0.ToString();
and
int i1 = Convert.ToInt32(kk);
long l1 = Convert.ToInt64(kk2);
Bye...
|
|
|
|
|
Hello there
I am new in CSharp coming from vb.net I have couple of things to ask
which are available in vb.net and what are their alternatives in CSharp ?
1. val(textbox1.text) in vb.net = ??? in csharp
which converts like blank string "" to 0 I used convert function but it does not convert "" to 0
2. How to get the error number err.number
in CSharp i did this
catch (Exception ex)
{
// ex gives the message not the error number
// need to know the error number here
}
3. Module in vb.net which you can add in project for the collection of global functions and variables = ______ in CSharp ????
I added codefile but could not add global variables in it
thanks alot for the support
|
|
|
|
|
I'm afraid it's not possible to do what you want in C#.
(1) is fairly easy. This piece of code will do it for you
int ConvertToInt(string text)
{
if (text == null || text.Length == 0) return 0;
return Int32.Parse(text);
}
(2) is not possible, AFAIK.
(3) is not possible at all in C#. C# doesn't support global variables.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Rizwan Bashir wrote:
I added codefile but could not add global variables in it
C# does not support global variables. You could create a class with public static fields, and it's the same effect. But I'd recommend you to design your app so you don't require them.
class Globals
{
public static MainForm mainForm;
}
MessageBox.Show(Globals.mainForm, .....); -- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Rizwan, what you're asking here is not how to transfer functions from VB.NET to C#, it's about legacy VB functions.
These don't have an equivalent in C#.
1) But Val() can be implemented as stated above by someone else.
2) The kind of error handling in VB is disencoraged in .NET.
You have a lot more powerful exception handling mechanisms, so you shouldn't go for a On Error Resume Next (YUCK!) anymore.
3) There are no global variables. Period. You can use static (shared in VB.NET) class members for this purpose.
Regards,
mav
|
|
|
|
|
Mav, Your point is well taken as I also know that on error resume next type of statements are discouraged and even I am using try catch in vb.net. the problem was.... I am building multi-lingual application with ability to add more languages at run time. so I have to give custom messages according to language selected. for which I need err.number.. but any ways I solved the problem by throwing the exception with the number and in exception I am treating that message as numeric value to process further.
any ways thanks alot to all of you for helping me out.... and I might keep on bothering you more for issues in next couple of days before getting used to with it...
|
|
|
|