B
boycxd
Unregistered / Unconfirmed
GUEST, unregistred user!
麻烦各位下面这段代码如何转化为DELPHI代码!我C++不行,谢谢了!
SC_PankouAsk *pp = (SC_PankouAsk *)tmpbuf;
pp->m_Head.m_nType = SC_PANKOU;
pp->m_Head.m_cStatus = 1;
pp->m_Head.m_lIndex = m_lAskIndex;
pp->m_sID.m_nIndex = nIndex;
pp->m_sID.m_wMarket = wMarket;
pp->m_lDate = pm->m_lDate;
nAskLen = sizeof(SC_PankouAsk);
///////////////////////////////////////////////////////
不好意思,刚才代码没发全。
void CSCDemoDlg::_SCAskData()
{
......
char tmpbuf[1024];
long lStartDate, lEndDate;
......
sprintf(tmpbuf, "%d%02d%02d", m_dateStart.GetYear(), m_dateStart.GetMonth(), m_dateStart.GetDay());
lStartDate = atol(tmpbuf);
sprintf(tmpbuf, "%d%02d%02d", m_dateend.
GetYear(), m_dateend.
GetMonth(), m_dateend.
GetDay());
lEndDate = atol(tmpbuf);
memset(tmpbuf, 0, 1024);
......
SC_PankouAsk *pp = (SC_PankouAsk *)tmpbuf;
pp->m_Head.m_nType = SC_PANKOU;
pp->m_Head.m_cStatus = 1;
pp->m_Head.m_lIndex = m_lAskIndex;
pp->m_sID.m_nIndex = nIndex;
pp->m_sID.m_wMarket = wMarket;
pp->m_lDate = pm->m_lDate;
nAskLen = sizeof(SC_PankouAsk);
......
m_Dll.SCAskData(tmpbuf, nAskLen);
}
SC_PankouAsk *pp = (SC_PankouAsk *)tmpbuf;
pp->m_Head.m_nType = SC_PANKOU;
pp->m_Head.m_cStatus = 1;
pp->m_Head.m_lIndex = m_lAskIndex;
pp->m_sID.m_nIndex = nIndex;
pp->m_sID.m_wMarket = wMarket;
pp->m_lDate = pm->m_lDate;
nAskLen = sizeof(SC_PankouAsk);
///////////////////////////////////////////////////////
不好意思,刚才代码没发全。
void CSCDemoDlg::_SCAskData()
{
......
char tmpbuf[1024];
long lStartDate, lEndDate;
......
sprintf(tmpbuf, "%d%02d%02d", m_dateStart.GetYear(), m_dateStart.GetMonth(), m_dateStart.GetDay());
lStartDate = atol(tmpbuf);
sprintf(tmpbuf, "%d%02d%02d", m_dateend.
GetYear(), m_dateend.
GetMonth(), m_dateend.
GetDay());
lEndDate = atol(tmpbuf);
memset(tmpbuf, 0, 1024);
......
SC_PankouAsk *pp = (SC_PankouAsk *)tmpbuf;
pp->m_Head.m_nType = SC_PANKOU;
pp->m_Head.m_cStatus = 1;
pp->m_Head.m_lIndex = m_lAskIndex;
pp->m_sID.m_nIndex = nIndex;
pp->m_sID.m_wMarket = wMarket;
pp->m_lDate = pm->m_lDate;
nAskLen = sizeof(SC_PankouAsk);
......
m_Dll.SCAskData(tmpbuf, nAskLen);
}