khaled,
You'll need to maje sure that your DLL supports OLE/automation and you'll also need to know the name of the accessible interface in the DLL. One place to find this is using the OLE View MS Visual Studio tool. Expand the All Objects item, then look for your DLL. When you find it, exapnd the DLL item and you will see the available interfaces. Look for the ProgID field to see what to use with the CreateObject command (see below). You can double-clik each interface, select View Type Info, and you'll see the availoable properties and methods.
Once you have this, you can implement the DLL within VBScript by using the CreateObject function call.
For example, if you wanted to implement some MS Excel functions:
Code:
Dim objExcel
Set objExcel = CreateObject("Excel.Application")
Accessing the functions then depends upon their argument and return types.
You may want to check to see if there is a forum here devoted to OLE, automation or COM.
*but i didn't find my DLL using the OLE View even after using regsvr32, it says "file.dll" is loaded but "Dllregisterserver entry point is not found"
"Dllregisterserver may not be exported"
* else how could i know if the DLL supports OLE automation
especially that nothing shows in the code source that we used the OLE interface
and if it doesn't support the OLE, will i be able to use this DLL or not
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.