Click here to Skip to main content
15,920,688 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Release Dependency Problem Pin
prasad_som14-Dec-06 20:09
prasad_som14-Dec-06 20:09 
Question/GS compile option Pin
With_problem14-Dec-06 18:38
With_problem14-Dec-06 18:38 
AnswerRe: /GS compile option Pin
prasad_som14-Dec-06 19:12
prasad_som14-Dec-06 19:12 
GeneralRe: /GS compile option Pin
With_problem14-Dec-06 19:26
With_problem14-Dec-06 19:26 
AnswerRe: /GS compile option Pin
prasad_som14-Dec-06 20:02
prasad_som14-Dec-06 20:02 
GeneralRe: /GS compile option Pin
With_problem14-Dec-06 20:16
With_problem14-Dec-06 20:16 
AnswerRe: /GS compile option Pin
prasad_som14-Dec-06 20:24
prasad_som14-Dec-06 20:24 
GeneralRe: /GS compile option [modified] Pin
With_problem14-Dec-06 20:49
With_problem14-Dec-06 20:49 
this is my code......

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
	HINSTANCE hInstance=LoadLibrary("WartzODLCOM.dll");
	Set_Quote_DB SetQuote;
	SetQuote = (Set_Quote_DB)GetProcAddress(hInstance,"setQuoteToDb");
	
	SessID=SessionId;
	CurrentRequestId=RequestId;
	
	CString marketstate,marketno,bid_d,ask_d;

   	marketno.Format("%d",MarketNo);
	bid_d.Format("%c",BidDirection);
	ask_d.Format("%c",AskDirection);
	marketstate.Format("%d",MarketState);

    
	m_MainEdit=m_MainEdit + "<Price Change> + SessionId + "\t" + RequestId +"\t"+ a ; 
	m_MainEdit=m_MainEdit + "\t"+ Market + Bid  + b + Ask +c +"\t "+ High + "\t";
	m_MainEdit=m_MainEdit + Low + "\t" + d + "   "+ "\t" + Timestamp + "\r\n"; 

	UpdateData(FALSE);
	iLineCount=m_EditCtrl.GetLineCount();
	m_EditCtrl.LineScroll(iLineCount);


	USES_CONVERSION;
	BSTR bsTimeStamp = A2BSTR(Timestamp);
	BSTR bsMarket =  A2BSTR(Market);
	BSTR bsBid = A2BSTR(Bid);
	BSTR bsAsk = A2BSTR(Ask);
                
        // debugging error when calling this function...of dll....access violation
	HRESULT hResult = SetQuote(&bsTimeStamp,&MarketNo,&bsMarket,&bsAsk,&bsBid,&MarketState);
	if(FAILED(hResult))
	{
		AfxMessageBox(_T("Error  inserting record"));
		return;
	}
	else
	{
		MessageBox(_T("data entered" ));
	}
	
   	SysFreeString(bsTimeStamp);
	SysFreeString(bsMarket);
	SysFreeString(bsBid);
	SysFreeString(bsAsk);

	FreeLibrary( hInstance );

  }



-- modified at 3:02 Friday 15th December, 2006
GeneralRe: /GS compile option Pin
prasad_som14-Dec-06 21:46
prasad_som14-Dec-06 21:46 
GeneralRe: /GS compile option Pin
With_problem14-Dec-06 21:56
With_problem14-Dec-06 21:56 
AnswerRe: /GS compile option Pin
prasad_som14-Dec-06 22:00
prasad_som14-Dec-06 22:00 
GeneralRe: /GS compile option Pin
With_problem14-Dec-06 22:19
With_problem14-Dec-06 22:19 
AnswerRe: /GS compile option Pin
prasad_som14-Dec-06 22:25
prasad_som14-Dec-06 22:25 
GeneralRe: /GS compile option [modified] Pin
With_problem14-Dec-06 22:34
With_problem14-Dec-06 22:34 
GeneralRe: /GS compile option Pin
prasad_som14-Dec-06 22:48
prasad_som14-Dec-06 22:48 
GeneralRe: /GS compile option Pin
With_problem14-Dec-06 19:33
With_problem14-Dec-06 19:33 
GeneralRe: /GS compile option Pin
zeemalik3-Feb-07 0:06
zeemalik3-Feb-07 0:06 
QuestionCFile Pin
ranaharoonkhan14-Dec-06 18:04
ranaharoonkhan14-Dec-06 18:04 
AnswerRe: CFile Pin
prasad_som14-Dec-06 18:16
prasad_som14-Dec-06 18:16 
AnswerRe: CFile Pin
ThatsAlok14-Dec-06 18:50
ThatsAlok14-Dec-06 18:50 
AnswerRe: CFile Pin
Hamid_RT14-Dec-06 21:20
Hamid_RT14-Dec-06 21:20 
AnswerRe: CFile Pin
Rage14-Dec-06 21:21
professionalRage14-Dec-06 21:21 
QuestionCreating a virtual drive... Pin
dontknowitall14-Dec-06 17:26
dontknowitall14-Dec-06 17:26 
Questiondate Pin
radhika2814-Dec-06 16:55
radhika2814-Dec-06 16:55 
AnswerRe: date Pin
Steve Echols14-Dec-06 19:25
Steve Echols14-Dec-06 19:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.