Is there a wxMSW equivalent to MFC's COleSafeArray?
Dave Bee
davebeeus at yahoo.com
Wed Nov 21 16:17:30 PST 2007
I am currently porting MFC based code to wxWidgets,
without really being an expert in OLE or MFC. The MFC
code works and I assume that if I replace class by
class wisely and carefully, it should eventually work
with minimum effort.
For example, I had no problem replacing CString with
wxString.
I replaced CString::GetBufferSetLength() with
wxString::GetWriteBuf() and CString::ReleaseBuffer()
with wxString::UngetWriteBuf() without a problem.
Since that code uses OLE/COM, I had to replace
CString::AllocSysString() with wxMSW's
SysAllocString(), found in
wxWidgets-2.6.3\include\wx\msw\ole\oleutils.h.
However, I now need to find a substitute for
COleSafeArray, including its member function
COleSafeArray::CreateOneDim().
Is there a simple substitute in wxMSW that I could
use, without having to become an expert in COM? I just
looked at the COM/Automation *introduction* and it is
500 pages long...
I mean, I can probably read all of that and write
everything from scratch, but since wxWidgets is such a
mature library I thought perhaps there is some
shortcut that could save me significant time? Just
like in the case of SysAllocString()?
Thanks,
Dave
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
More information about the wx-users
mailing list