User Profile

Collapse

Profile Sidebar

Collapse
poko
poko
Last Activity: Apr 3 '10, 08:44 PM
Joined: Dec 13 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • poko
    started a topic Access violation writing location 0x00000020
    in C

    Access violation writing location 0x00000020

    I have come across an exception that I have no idea about.

    " Unhandled exception at 0x00a2ac1b in SampleSocketCli ent.exe: 0xC0000005: Access violation writing location 0x00000020."

    Below is the snippet of relevant code. I started getting this error only after I added 'pComboLeg' & 'addAllLegs' in the tickPrice(). Can someone please help me out. I have googled alot but can't figure out what am I doing wrong....
    See more | Go to post

  • Also, the thing is that if I use only 1 of them, i.e.

    m_pClient->reqMktData( m_dlgOrder->m_id, m_dlgOrder->getContract( ),
    m_dlgOrder->m_genericTicks , m_dlgOrder->m_snapshotMktD ata);

    it works fine. It is only when I try to use another one, i.e.

    m_pClient->reqMktData2( m_dlgOrder->m_id, m_dlgOrder->getContract2() ,
    m_dlgOrder->m_genericTicks , m_dlgOrder->m_snapshotMktD ata);...
    See more | Go to post

    Leave a comment:


  • Run-Time Check Failure #0 - The value of ESP was not properly saved across a function

    I get the following error when I run the code.

    "Run-Time Check Failure #0 - The value of ESP was not properly saved
    across a function call. This is usually a result of calling a function
    declared with one calling convention with a function pointer declared
    with a different calling convention."

    Unable to understand what is causing this. Have given a snippet of the code that I think is relevant....
    See more | Go to post

  • poko
    replied to Timer
    Sure

    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Timers;
    using System.Threading;
    
    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            private TextBox textBox2;
    ...
    See more | Go to post

    Leave a comment:


  • poko
    replied to Timer
    Yo....I got it to work. Thanks :)
    See more | Go to post

    Leave a comment:


  • poko
    replied to Timer
    I managed to execute a call to a handler...but now I am getting another error:

    $exception {"Cross-thread operation not valid: Control 'textBox2' accessed from a thread other than the thread it was created on."} System.Exceptio n {System.Invalid OperationExcept ion}
    See more | Go to post

    Leave a comment:


  • poko
    replied to Timer
    I'll keep the [code] tags in mind from next time. I put a breakpoint on line 67, but the execution did not break. So I guess that the handler is not getting called. Do you know why could that be happening?

    What I really want to create is a countdown timer for an elapsed time. So I trying the get the basic up-count timer right before I do that.
    See more | Go to post

    Leave a comment:


  • poko
    started a topic Timer

    Timer

    I want a textbox on the form to show the current time. The code I have written follows. But it does not work and I don't know why :( Can someone please point out the error.
    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Timers;
    using System.Threading;
    ...
    See more | Go to post
    Last edited by tlhintoq; Dec 18 '09, 12:01 AM. Reason: [CODE] ...Your code goes between code tags [/CODE]

  • poko
    replied to Event handler crash
    Oh I sorted it out. It was a rather silly mistake. Thanks for the reply tho...
    See more | Go to post

    Leave a comment:


  • poko
    started a topic Event handler crash

    Event handler crash

    I have 3 textboxes on my form, TB1, TB2 and TB3.

    TB1 & TB2 are constantly being updated with new data as fast as it is received.

    TB3 is used to show the difference between TB1 & TB2. I convert the text from both TB1 & TB2 to double, perform the subtraction, and then convert the result back to string and display it in TB3.

    The problem is that the subtraction works only if either TB1 or TB2 holds...
    See more | Go to post

  • poko
    replied to Event handler
    @ Dheeraj. Sorry, my mistake. Basically it can be MM_ KeyPress & MM_ KeyPress2 or MM_ KeyPress1 & MM_ KeyPress2. My point was that I am unable to keep both of them in the code.

    @Gary. Yes, compiling at command line did help. Thanks a lot for the tip.
    See more | Go to post

    Leave a comment:


  • poko
    replied to Event handler
    I never said that MM_ KeyPress1 is defined.

    Only MM_ KeyPress & MM_ KeyPress2
    See more | Go to post

    Leave a comment:


  • poko
    replied to Event handler
    I am using Visual Studio 2008. And yes, MM_KeyPress2 exists in the class.

    I have defined both MM_KeyPress1 & MM_KeyPress2 in my class. Before building and running the project, the code is:

    this.txtBox1.Ke yPress += new System.Windows. Forms.KeyPressE ventHandler(thi s.MM_ KeyPress);

    this.txtBox2.Ke yPress += new System.Windows. Forms.KeyPressE ventHandler(thi s.MM_ KeyPress2);

    After I build...
    See more | Go to post

    Leave a comment:


  • poko
    started a topic Event handler

    Event handler

    I'd appreciate it if someone could help me out with this. Currently I am handling instances of the 'enter' key being pressed as:

    this.txtBox1.Ke yPress += new System.Windows. Forms.KeyPressE ventHandler(thi s.MM_KeyPress);

    this.txtBox2.Ke yPress += new System.Windows. Forms.KeyPressE ventHandler(thi s.MM_KeyPress);

    where MM is the name of the form. I want it to work as:

    this.txtBox1.Ke yPress +=...
    See more | Go to post

  • poko
    replied to Textbox access.
    Thanks Gary, it worked. And I'll try to remember your tip :)
    See more | Go to post

    Leave a comment:


  • poko
    started a topic Textbox access.

    Textbox access.

    Hi. I am having difficulty looping through texboxes. I do not want to use Controls. I have named my textboxes as:

    textBoxBuy1, textBoxBuy2, textBoxBuy3, .....

    There are many more textboxes in the form (with different names so that I can use the desired ones in a loop) but I do not want to refer to them while looping. I want to loop all the textboxes named textBoxBuy only. This is what I am doing:

    for (int...
    See more | Go to post
No activity results to display
Show More
Working...