Archived

This topic is now archived and is closed to further replies.

Fragmo

VB - Invalid Callee??

Recommended Posts

i have an active X control that has a method called AddTool. this method takes 3 params, BSTR, VARIANT*, VARIANT* and returns a pointer to the new tool heres the IDL declaration [id(1)] HRESULT AddTool([in] BSTR bstrName, [in] VARIANT* pvarImage, [in] VARIANT* pvarData, [out, retval] IFDToolInfo** ppTool); Private Sub Form_Load() Dim ret As IFDToolInfo Dim pic As Variant Set pic = Picture1.Picture Dim data As Variant data = "foo" Set ret = toolbox.AddTool("Name", pic, data) for some friggin reason VB always spits out an error (0x80020010 Invalid Callee) BEFORE it even gets into the code for the AddTool method. the control is on the form and the name is correct, i''ve even tried removing both variant params, making it not return a value, changing the name of the method, changing the dispid and none of it made any difference, always the same error. does anyone have any idea why this would happen? thanks in advance

Share this post


Link to post
Share on other sites