Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/05/2004, 16:08
masterboy6666
 
Fecha de Ingreso: mayo-2004
Mensajes: 183
Antigüedad: 20 años, 9 meses
Puntos: 0
HOLA te pongo un ejemplo para retorna una funcion de ejemplo

STDMETHODIMP Clase::HOLA(BSTR *Name)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
// TODO: Add your implementation code here
CString s_hola="hola";
*Name = s_hola.AllocSysString();
return S_OK;
}

ahora en la definicion de tu interfaz quedaria la funcion asi
[id(4), helpstring("method HOLA")] HRESULT GetErmName([out,retval] BSTR *Name);

recuerda para regresar valores utiliza [out,retval] y para recibir es[in]

Espero que te haya ayudado.