|
Expose a method in that other process that returns the call stack and use remoting to get to it.
|
|
|
|
|
Hi,
I'm trying to download files from an FTP server, what the code does is get list of files then loop through foreach file in filelist and download it. I got the ftpLib from this board.
It all works OK until about the 6th file download, the code seems late on reading the response, thus resulting on error message. I've tried Thread.Sleep at various location to no avail .. Help !!
The steps on the server:
LIST
150 Connection Accepted
226 Transfer OK
TYPE I
200 Type set to I
SIZE filename.gif
213 34355
PASV
227 Entering Passive Mode (IP)
RETR filename.gif
150 Connection Accepted
CWD ..
etc etc ....
The error usually happen on reading response from PASV command, instead reading 227, it still reads 213 (which is file size)
|
|
|
|
|
This trace will not be of any help.
What happens if you do not use Passive (try to make an Active Connection)
Also, please post that part of the trace where an error is being generated.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Hello All,
I m new in Tapi programming. My applications load the (contact no.)data from database to the listbox. On dial button click the application should starts calling all the Contact no. in sequence from the list box.
I m using Tapi3 (TAPI3Lib) library. My first call gets connected, but i don't get connected to subsequent calls & COM Interoperatability Exception is thrown. i would like to know how to release or dispose each individual Call in Tapi3. Please if any one could guide me, its urgent. I ll be obliged.
Thanks a lot..........
//Thread method
private void connmethod(Object iCall)
{
ITBasicCallControl2 ibCall = (ITBasicCallControl2)iCall;
string s = "C:\\Documents andSettings \\AllUsers \\Documents\\My Music\\Sample Music\\BS.wav";
//pTapi.RegisterCallNotifications(pAddress, false, true, 16, 1);
ibCall.Connect(false);
}
//Calling Method in Tapi
private void btncall_Click(object sender, EventArgs e)
{
ITBasicCallControl2 iCall;
try
{
pTapi.Initialize();
lEnumAddress = pTapi.EnumerateAddresses();
lEnumAddress.Next(1, out pAddress, ref ui);
for (int i = 0; i <= lstboxCallno.Items.Count; i++)
{
Console.WriteLine("ui:{0}", ui);
if (pAddress.AddressName.ToString()
.Equals(cmbModem.SelectedItem.ToString()))
{
btncall.Enabled = false;
btnDisconnect.Enabled = true;
pCall = null;
iCall = null;
txtboxno.Text = "";
txtboxno.Text = lstboxCallno.Items[0]
.ToString();
iCall = (ITBasicCallControl2)pAddress.
CreateCall(txtboxno.Text.ToString()
, LINEADDRESSTYPE_PHONENUMBER, TAPIMEDIATYPE_AUDIO);
pCall = iCall;
Console.WriteLine("No : {0} ", txtboxno.Text.ToString());
if (iCall != null)
{
Thread t = new Thread(new ParameterizedThreadStart(connmethod));
t.Start((Object)iCall);
t.Join();
pTapi.RegisterCallNotifications(pAddress, false, true, 16, 1);
Console.WriteLine("Thread State:{0}", t.ThreadState.ToString());
}
}}}catch(Exception e){}}
//COM ERROR.........
Uninitialized object (Exception from HRESULT: 0x80040007 (OLE_E_BLANK))
bhavin
|
|
|
|
|
Hi i am gooa develop a tool for performance analysis....
any one have idea about API HOOKING in c#?
My small attempt...
|
|
|
|
|
You cannot do it using C#. The .NET compilers do not support the proper exports required by the .DLL injection technique. You have to use C++ to handle the hooking code and it should also expose an interface that your C# app can talk to, probably through COM. For further infomration on this, you'd be better served by asking in the Visual C++ forum.
|
|
|
|
|
hi everyone,
I am creating a data entry application in C# for real estate agents.
to make data entry quicker i need to create shortcuts keys. for example
if the agents enters CTRL + S, it should be typed Sell or CTRL + R = Reseller.
How can i do this
thanks in advance.
modified on Friday, April 4, 2008 2:31 AM
|
|
|
|
|
i think on key press event of the text box u can check the combination of keys and
then can set the text u require.
rahul
|
|
|
|
|
Handle the keyup event of the control where you type. Check the Keycode property value. It would be something like
if (e.KeyCode == Keys.S && e.Control)
else if (e.KeyCode == Keys.R && e.Control)
|
|
|
|
|
Hello,
I have created a new report via the reportviewer control, with the data coming from a object. When I print the report either to the printer or pdf the text body only appears on odd pages, with only the header and footer appearing on even pages. This turns a 2 page report into a 4 page report.
Evidently I am doing something wrong, but after two days of hunting I'm at a loss to know where. Any ideas would be much appreciated?
Thanks in advance
|
|
|
|
|
Hello..
I'm doing Reimer's tutorial http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Moving_water.php[^], and now I'm trying to run the code in the xbox. I used refer to other tutorials but still I can't do it. I really hope that somebody can solve my problem.
This is the code I want to change using the controller:
float x = 0.5f;<br />
float y = 1.0f;<br />
<br />
private void ProcessInput(float amountOfMovement)<br />
{<br />
Vector3 moveVector = new Vector3();<br />
<br />
KeyboardState keys = Keyboard.GetState();<br />
if (keys.IsKeyDown(Keys.Right))<br />
moveVector.X += amountOfMovement;<br />
if (keys.IsKeyDown(Keys.Left))<br />
moveVector.X -= amountOfMovement;<br />
if (keys.IsKeyDown(Keys.Down))<br />
moveVector.Y -= amountOfMovement;<br />
if (keys.IsKeyDown(Keys.Up))<br />
moveVector.Y += amountOfMovement;<br />
<br />
if (keys.IsKeyDown(Keys.Add))<br />
x += 0.1f;<br />
y += 0.1f;<br />
if (keys.IsKeyDown(Keys.Subtract))<br />
x -= 0.1f;<br />
y -= 0.1f;<br />
<br />
Matrix cameraRotation = Matrix.CreateRotationX(cameraAngles.X) * Matrix.CreateRotationZ(cameraAngles.Z);<br />
cameraPosition += Vector3.Transform(moveVector, cameraRotation);<br />
<br />
MouseState currentMouseState = Mouse.GetState();<br />
if (currentMouseState.X != p_mouseState.X)<br />
cameraAngles.Z -= amountOfMovement / 80.0f * (currentMouseState.X - p_mouseState.X);<br />
if (currentMouseState.Y != p_mouseState.Y)<br />
cameraAngles.X -= amountOfMovement / 80.0f * (currentMouseState.Y - p_mouseState.Y);<br />
Mouse.SetPosition(Window.ClientBounds.Width / 2, Window.ClientBounds.Height / 2);<br />
}<br />
|
|
|
|
|
All you need to do is use the GamePad class instead of the Keyboard and Mouse classes.
There is an abundance of examples of how to do this on the XNA creators website.
|
|
|
|
|
Hello all,
In my software every user has to be signed in with an ID and password. After that I will show them some user specific data in texts, graphs and pictures- all these data will be extracted from a local database.
I am thinking about Crystal Report for this. But one experienced programmer advised me that as far as the execution speed is concerned , I should not use the crystal reports in this case. Actually I can design it in a simple form with photos and charts.
Plz clarify me whether I should use crystal report in this case. Will it be inefficient to use crystal report here taking the execution time under consideration?
Please help me to solve this out
Thanks in advance
Faysal,
email: faysal_002299@yahoo.com
|
|
|
|
|
If you're not publishing large reports, then extract the data and put it on your UI components manually. Crystal Reports are slow, the ReportViewer is slow. I've used both and they're just not worth it if you're just putting up a photo and some user data. I'm in a situation at the moment where I may have to remove ReportViewer from my project because of customer complaints about speed. There are a number of alternatives.
Scott
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
Hi,
I want to learn about Key Board hooks in C#. If any one expert in that area or have recommend resources or sample code, please send me!
I want to get fully access on my keyboard in my project not even windows.
Your corporate is appreciated!
|
|
|
|
|
|
Hi guys i am wondering how can i post an image here so I can show you in an image format rather than typing text here. Thanks
|
|
|
|
|
You can't; it's been disabled because people started abusing it. You will have to upload your pic on another site and link to it.
|
|
|
|
|
hi all,
i get error in my application .plz help to recover the error
i add time in the database .before adding in database it
check this time is already exit or not .if exits it don't allow
me to add the same time again
i have two comobox one for hour and second for minute and it contain
int value.i get value from comobox and concatenate both value
and send to database
on running application it give me system error message
private void btnAdd_Click(object sender, System.EventArgs e)
{
//cbxHr.Text hour combo box
//cbxMin.Text min combo box
SaveTiming(cbxHr.Text,cbxMin.Text);
}
private void SaveTiming(string hr, string std_min)
{
bool flag = false;
string connectionString = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Testing;Data Source=(local)";
string test = hr+""+ std_min;
string isExist = "SELECT * FROM timing WHERE s_time=" + test + "";
string sqlInst = "Insert into timing(s_test)Values(" + test + ")";
using (SqlConnection connection = new SqlConnection(connectionString))
{
SqlCommand command = new SqlCommand(isExist, connection);
connection.Open();
SqlDataReader reader = command.ExecuteReader();
if (reader.HasRows)
{
MessageBox.Show("Timing already has been assigned");
flag = true;
}
reader.Close();
if (!flag)
{
SqlCommand cmd = new SqlCommand(sqlInst, connection);
cmd.ExecuteNonQuery();
}
}
}
okey
|
|
|
|
|
Hi,
Why did you not put the error you are getting?
Anyhow, how are you storing the time in database--what is the type? If it is string then problem is in your sqlQuery:
string isExist = "SELECT * FROM timing WHERE s_time=" + test + "";
string sqlInst = "Insert into timing(s_test)Values(" + test + ")";
Both will not work as strings need single quotes around them. Here is the correct version:
string isExist = "SELECT * FROM timing WHERE s_time= '" + test + "'";
string sqlInst = "Insert into timing(s_test)Values('" + test + "')";
Hope it solves the issue. You should put your code in a try catch block when executing commands on database.
|
|
|
|
|
tittly wrote: string sqlInst = "Insert into timing(s_test)Values(" + test + ")";
try: Insert into timing(s_test)Values('" + test + "')
A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty I am a Optimist
|
|
|
|
|
i use string type in data base
when i run my application it stop on this statement
SqlDataReader reader = command.ExecuteReader();
and show system error message
okey
|
|
|
|
|
to know what is the error;
use:
try
{
...
}
catch()
{
...
}
finally()
{
}
******************************
The best things in life are free
******************************
modified on Friday, April 4, 2008 3:14 AM
|
|
|
|
|
I am trying to make a calculator out of C# and the last thing I am doing now is for interaction to the calculator using a keyboad. So what I did was to create a keypress event for the main form that whenever a key is pressed, the event method will be triggered. I dont know what i'm doing wrong but whenever I press a key on the keyboard, the value of the key doesn't show... do you have any example on how to do this?
|
|
|
|
|
Hi Silvyster,
Hard to help you as I can not see your code. Anyways, I am assuming you have a User Interface for users to interact with the calculator. Do you have buttons for each number of the calculator? If you do each button has a Click, KeyPress, KeyUp, KeyDown event. You need to handle these events by simply setting the display to the value of the key pressed. Remember you have to filter the input as users can not enter characters such as &, @, h etc.
If you can explain what your UI looks like then I can help you.
Let me know if you have any additional questions.
|
|
|
|