Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Unhandled execption in ariel.exe(APIOCX):0xC0000005 :Access violation

Unhandled execption in ariel.exe(APIOCX):0xC0000005 :Access violation

Scheduled Pinned Locked Moved C / C++ / MFC
helpdebugging
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    With_problem
    wrote on last edited by
    #1

    Whenever i debug the program i got this error when it comes to dll function..i am able to load dll lib and able to link.....can anybody help me to point out the problem where i m amking big mistake....thanks for your time and support.... Dll function: short setQuoteToDB( BSTR* strDateTimeStamp, short* intMarketNo, BSTR* strMarketName, BSTR* strBid, BSTR* strAsk, short* intMarketState);

    typedef int (CALLBACK* Set_Quote_DB)(unsigned short**,
    short*,
    unsigned short**,
    unsigned short**,
    unsigned short**,
    short*);

    void CArielProjectVer2Dlg::OnPriceChangeArielapictrl1(LPCTSTR SessionId,
    LPCTSTR RequestId,
    short MarketNo,
    LPCTSTR Market,
    LPCTSTR Bid,
    short BidDirection,
    LPCTSTR Ask,
    short AskDirection,
    LPCTSTR High,
    LPCTSTR Low,
    short MarketState,
    LPCTSTR Timestamp)
    {
    // TODO: Add your control notification handler code here

    SessID=SessionId;
    CurrentRequestId=RequestId;
    
    marketno.Format("%d",MarketNo);
    bid\_d.Format("%c",BidDirection);
    ask\_d.Format("%c",AskDirection);
    marketstate.Format("%d",MarketState);
    
        m\_MainEdit= SessionId + RequestId + marketno ; 
    m\_MainEdit= Market +  Bid + bid\_d + Ask + ask\_d + High ;
    m\_MainEdit=m\_MainEdit + Low + marketstate + Timestamp ; 
    
    UpdateData(FALSE);
    iLineCount=m\_EditCtrl.GetLineCount();
    m\_EditCtrl.LineScroll(iLineCount);
    

    HINSTANCE hInstance = AfxLoadLibrary("C:\\ActiveXdll\\WartzODLCOM.dll");
    if(hInstance != 0)
    {

    MessageBox("load dll");
        //Unhandled execption in ariel.exe(APIOCX):0xC0000005 :Access violation 
    
    USES\_CONVERSION;
    BSTR bsTimeStamp = A2BSTR(Timestamp);
    BSTR bsMarket    =  A2BSTR(Market);
    BSTR bsBid       = A2BSTR(Bid);
    BSTR bsAsk       = A2BSTR(Ask);
        Set\_Quote\_DB SetQuote;
    SetQuote = (Set\_Quote\_DB)GetProcAddress(hInstance,"setQuoteToDb");
    if(SetQuote != NULL)
    {
    
         SetQuote(&bsTimeStamp,&MarketNo,&bsMarket,&bsAsk,&bsBid,&MarketState);
          return;
    }	
    
    	SysFreeString(bsTimeStamp);
    SysFreeString(bsMarket);
    SysFreeString(bsBid);
    SysFreeString(bsAsk);
    
    FreeLibrary( hInstance );
    
    return;
    }
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups