General information
Category:
ActiveX controls in VFP
>>We are trying to use a third party activeX control the control is a dll file, it does not have to be registered with windows the file is just copied into the windows folder.
>>
>>I am having problems talking to the dll I have tried:
>>
>>ohhcom = CREATEOBJECT("HH32commDriver")
>>
>>and
>>
>>ohhcom = NEWOBJECT("HH32commDriver")
>>
>>trying this I receive an Class definition HH32commDriver is not found.
>>
>>I can open the dll in the class browser and see all the methods and events has anyone any ideas on how to talk to the control?
>>
>>Thanks
>>
>>John
>
>AFAIK, all ActiveX controls must be registered. When registered, they make some entries into the registry. You can usually tell what the program ID (eg. the string you pass CREATEOBJECT()) is by looking in the registry. I normally just do a search for the DLL name. There will be a ProgID node. The program ID is contained there. If you don't have to register the DLL, then it's probably not an ActiveX control. It's probably a standard DLL. In that case, you have to use DECLARE to access it. You'll definitely want docs in that case (although in a pinch you can use the DEPENDS.EXE included w/Visual Studio to figure out the DECLARE call).
>
>To register the control if it is actually an ActiveX: regsvr32 C:\PathToDLL\HH32commDriver.DLL
Hi Paul
I have registered the dll and now I don't get an error when trying to use createobject.
Thanks
John
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only