Returning a pointer from eVC to eVB? 
Author Message
 Returning a pointer from eVC to eVB?

I have a method on an eVC COM object where one of the parameters is a
pointer to a variable.  I am getting a "type mismatch" in eVB when I call
the method.

/*WORKS*/
 STDMETHOD(Connect)(/*[in]*/ BSTR sConnStr);
/*WORKS*/
 STDMETHOD(Connect)(/*[in]*/ BSTR sConnStr, /*[in]*/ long lLong);
/*DOES NOT WORK*/
 STDMETHOD(Connect)(/*[in]*/ BSTR sConnStr, /*[in]*/ long lLong, /*[in,
out]*/ long *pLong);

Does anyone know what can be done?



Mon, 31 Jan 2005 10:46:45 GMT  
 Returning a pointer from eVC to eVB?
Return a COM object or return a VARIANT
You can not return a pointer to a variable as it is not valid in VB address
space.
Remember that there is no marshaling on the device (No DCOM) so you need a
COM object that supports IDispatch.

Doron.


Quote:
> I have a method on an eVC COM object where one of the parameters is a
> pointer to a variable.  I am getting a "type mismatch" in eVB when I call
> the method.

> /*WORKS*/
>  STDMETHOD(Connect)(/*[in]*/ BSTR sConnStr);
> /*WORKS*/
>  STDMETHOD(Connect)(/*[in]*/ BSTR sConnStr, /*[in]*/ long lLong);
> /*DOES NOT WORK*/
>  STDMETHOD(Connect)(/*[in]*/ BSTR sConnStr, /*[in]*/ long lLong, /*[in,
> out]*/ long *pLong);

> Does anyone know what can be done?



Sun, 06 Feb 2005 19:43:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling ATL component created in eVC from eVB

2. eVB / eVC / .NET

3. NewB Q: Calls to eVC++ DLL from eVB app

4. Passing String from eVB to eVC++ DLL

5. Interrupting eVB from eVC

6. I can't connect the device from eVB or eVC++

7. Calling eVC DLL from eVB App ??

8. calling eVC COM DLL from eVB app

9. Using eVC++ 3.0 Functions in eVB Program

10. How to register activex control using eVB and eVC

11. OPC with eVB/eVC++

12. Writing COM Object in eVC++ for Use in eVB

 

 
Powered by phpBB® Forum Software