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
hi aks, Variant are used for Automation, so after creating the ATL Dll just compile that DLL. and create an instance of the Dll in VBScript. and pass the the Arugments from the VBScript. VARIANT is used for that purpose only it is used for Purely Automation Purpose. good luck.
Uday kiran