Ocx传递PByte形参

时间:2013-10-05 11:43:53
【文件属性】:
文件名称:Ocx传递PByte形参
文件大小:52KB
文件格式:RAR
更新时间:2013-10-05 11:43:53
ocx ole parameter 演示了 Ocx定义的函数形参传递PBYTE的流 传的是PCHAR, 在Ocx里面强转成PBYTE,用形参的长度来读取PBYTE short CMyOcxCtrl::fnTest2(LPCTSTR pPara1, long pLen1) ; void CTestOcxDlg::OnButton1() { // TODO: Add your control notification handler code here int nBufLen = 0x100; PBYTE pBuf = new BYTE[nBufLen]; memset(pBuf, 0, nBufLen); for(int n = 0; n < nBufLen; n++) { *(pBuf + n) = n; } m_MyOcx1.fnTest2((const char *)pBuf, nBufLen); } 这样强转传流最简单
【文件预览】:
MyOcx
----ReadMe.txt(3KB)
----MyOcx.rc(4KB)
----StdAfx.h(1KB)
----MyOcx.aps(21KB)
----MyOcx.opt(58KB)
----MyOcx.dsw(864B)
----MyOcx.cpp(2KB)
----MyOcxPpg.cpp(2KB)
----MyOcxCtl.bmp(238B)
----MyOcx.h(944B)
----MyOcxCtl.h(2KB)
----Resource.h(534B)
----MyOcx.odl(2KB)
----testOcx()
--------ReadMe.txt(4KB)
--------StdAfx.h(1KB)
--------res()
--------testOcx.rc(6KB)
--------testOcxDlg.h(1KB)
--------resource.h(731B)
--------testOcx.cpp(2KB)
--------testOcx.dsp(4KB)
--------myocx.h(2KB)
--------testOcx.h(1KB)
--------testOcx.aps(35KB)
--------testOcx.clw(1KB)
--------testOcxDlg.cpp(4KB)
--------StdAfx.cpp(209B)
--------myocx.cpp(1KB)
--------testOcx.plg(5KB)
----MyOcx.dsp(8KB)
----MyOcx.def(218B)
----MyOcxPpg.h(1KB)
----MyOcx.ico(1KB)
----MyOcx.ncb(81KB)
----StdAfx.cpp(204B)
----MyOcxCtl.cpp(6KB)
----MyOcx.plg(5KB)
----MyOcx.clw(919B)

网友评论

  • 想找delphi的相关资源...