Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I know CreateObject() is used to create an object.I have a c++ COM object which is already registered in the system. My C++ dll's project name is "second" & the class used is "obj".So can u please tell me how to create an object to access the dll as CreateObject(second.obj) is not working?
Posted
Updated 6-Aug-15 21:39pm
v2
Comments
F-ES Sitecore 7-Aug-15 4:19am    
It'll be CreateObject("second.obj") However check the HKEY_CLASSES_ROOT section of the registry to see if Second.Obj is registered. Finally to be used from VBScript it needs an IDisptch interface, it can't only support IUnknown.
Somesh Dhal 7-Aug-15 5:12am    
thanks for your response.But Second.obj i snot there.but the strange thing is i am able to find the CLSID of the dll in the registry but no second.obj..any thoughts?
F-ES Sitecore 7-Aug-15 5:20am    
Sounds like it hasn't been registered properly then. Did you use regsvr32?
barneyman 9-Aug-15 6:42am    
it's not mandatory to register progid's, only clsid's - i don't know if vbs can instantiate using clsids, maybe look at the clsid moniker "clsid:xxxxxxxxx" or register your own progid -> clsid mapping

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900