Calling a ATL COM DLL interface from VBScript routine
-
All, I am working on ATL COM DLL and I am writing a DLL which exposes few interfaces to the application. These interfces can be called either from the VBScript or C++ routine. Any rules which i need to follow especially for having a parameter[[IN], [OUT]. As every one knows that VBScript has data type limitations and we can't pass all the parameters as like in normal. For example the IN and OUT parameter will be used to send and receive values from the interfce and should always be having a VARIANT* data type. For example: 1. STDMETHODIMP CXX::FUNC_XX( BYTE bnl,BYTE bCurrCl,VARIANT* vSData,BOOL boFlag, SHORT *pRetVal) 2. STDMETHODIMP CXXX::FUNC1_XXX(VARIANT* vReconfig,SHORT *pRetVal) Please let me know if any one is having suggestions or sample ATL COM DLL which can be called from VBScript. Thanks, AKS
-
All, I am working on ATL COM DLL and I am writing a DLL which exposes few interfaces to the application. These interfces can be called either from the VBScript or C++ routine. Any rules which i need to follow especially for having a parameter[[IN], [OUT]. As every one knows that VBScript has data type limitations and we can't pass all the parameters as like in normal. For example the IN and OUT parameter will be used to send and receive values from the interfce and should always be having a VARIANT* data type. For example: 1. STDMETHODIMP CXX::FUNC_XX( BYTE bnl,BYTE bCurrCl,VARIANT* vSData,BOOL boFlag, SHORT *pRetVal) 2. STDMETHODIMP CXXX::FUNC1_XXX(VARIANT* vReconfig,SHORT *pRetVal) Please let me know if any one is having suggestions or sample ATL COM DLL which can be called from VBScript. Thanks, AKS
To call a COM interface from VBScript you need a dual interface with IDispatch.
-
To call a COM interface from VBScript you need a dual interface with IDispatch.
Hi, Thanks for answer. But i am mainly interested in knowing what are all the basic rules (such as supported data type of parameters and etc) which i need to follow when i want to write a com dll which can be used from the VBScript especially. Thanks, Siva