Click here to Skip to main content
15,921,841 members
Home / Discussions / COM
   

COM

 
QuestionHow to open error.log file Pin
John13-Jul-00 2:41
John13-Jul-00 2:41 
GeneralReading an existing Excel File from C++/COM.. Pin
K M Bansal12-Jul-00 4:17
sussK M Bansal12-Jul-00 4:17 
GeneralObject to save text or number into file Pin
BJ12-Jul-00 2:06
BJ12-Jul-00 2:06 
GeneralRe: Object to save text or number into file Pin
Alex Gorev12-Jul-00 4:21
Alex Gorev12-Jul-00 4:21 
GeneralRe: Object to save text or number into file Pin
BJ12-Jul-00 5:44
BJ12-Jul-00 5:44 
GeneralName Space Extension Pin
rod7-Jul-00 8:14
rod7-Jul-00 8:14 
GeneralCalling a COM component from ASP Pin
pba_7-Jul-00 7:02
pba_7-Jul-00 7:02 
GeneralRe: Calling a COM component from ASP Pin
Alex Gorev7-Jul-00 8:42
Alex Gorev7-Jul-00 8:42 
Hi,

First of all you should use the SysReAllocString instead of SysAllocString. It's not the source of the problem but it's a correct way of doing things. Before assigning a new value to the pointer you must free the data it's pointing to.

STDMETHODIMP CTest::get_Path(BSTR *pVal)
{
if(pVal == NULL)
return E_POINTER;

if(!SysReAllocString(pVal, m_bstrPath))
return E_OUTOFMEMORY;

return S_OK;
}

Your problem is that in VBScript and JScript cannot pass parameters by reference to automation properties or methods. Use return values of properties and methods to return a value instead of using byref parameters for this purpose. This approach limits you to one return value.

Regards,
Alex Gorev,
Dundas Software.

QuestionHow to get IDispatch of an instance of Excel in C++ DLL called from Excel xla? Pin
leo6-Jul-00 2:11
leo6-Jul-00 2:11 
AnswerRe: How to get IDispatch of an instance of Excel in C++ DLL called from Excel xla? Pin
leo10-Jul-00 4:37
leo10-Jul-00 4:37 
AnswerRe: How to get IDispatch of an instance of Excel in C++ DLL called from Excel xla? Pin
K M Bansal12-Jul-00 4:16
sussK M Bansal12-Jul-00 4:16 
GeneralRe: How to get IDispatch of an instance of Excel in C++ DLL called from Excel xla? Pin
leo13-Jul-00 3:49
leo13-Jul-00 3:49 
QuestionHow to get Browser Helper Object pointer ? Pin
solo.ru4-Jul-00 5:43
solo.ru4-Jul-00 5:43 
AnswerRe: How to get Browser Helper Object pointer ? Pin
Alex Gorev4-Jul-00 6:14
Alex Gorev4-Jul-00 6:14 
Generalvoid* in a parameter in COM function Pin
Jafet Sánchez2-Jul-00 20:14
Jafet Sánchez2-Jul-00 20:14 
GeneralRe: void* in a parameter in COM function Pin
Alex Gorev4-Jul-00 4:33
Alex Gorev4-Jul-00 4:33 
GeneralRe: void* in a parameter in COM function Pin
Alex Gorev4-Jul-00 6:28
Alex Gorev4-Jul-00 6:28 
QuestionHow do i extract a substring from a variant or bstr Pin
spikee2-Jul-00 0:49
spikee2-Jul-00 0:49 
AnswerRe: How do i extract a substring from a variant or bstr Pin
Jafet Sánchez2-Jul-00 20:23
Jafet Sánchez2-Jul-00 20:23 
AnswerRe: How do i extract a substring from a variant or bstr Pin
Alex Gorev4-Jul-00 4:14
Alex Gorev4-Jul-00 4:14 
GeneralATL PROP_DATA_ENTRY Pin
Lakshmi Vyas30-Jun-00 6:08
Lakshmi Vyas30-Jun-00 6:08 
GeneralRe: ATL PROP_DATA_ENTRY Pin
Alex Gorev30-Jun-00 11:33
Alex Gorev30-Jun-00 11:33 
GeneralRe: ATL PROP_DATA_ENTRY Pin
Lakshmi Vyas30-Jun-00 16:54
Lakshmi Vyas30-Jun-00 16:54 
GeneralRe: ATL PROP_DATA_ENTRY Pin
Alex Gorev4-Jul-00 3:54
Alex Gorev4-Jul-00 3:54 
GeneralASP Components Pin
Kitkat29-Jun-00 19:16
Kitkat29-Jun-00 19:16 

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.