PDA

Click to See Complete Forum and Search --> : ActiveX DLL's


johnpc
Jan 10th, 2000, 02:22 AM
Does anyone know how to create an ActiveX Dll to work basically the same as a VB internal Function would work to make a call to a DLL, passing two variables "a" and "b" to the DLL and having the it return a variable "c" which would be the sum of a and b. Your help would be appreciated.



------------------

KENNNY
Jan 10th, 2000, 06:39 AM
can u re-state your question.. its a bit confusing :)

i think this is what u want:
(in your DLL)


Public Function Add(ByVal a as long, ByVal b as long) as long

Add = a + b

end function


although its not really worth the bother, you may as well just add them manually in your code?



------------------
cintel rules :p
www.cintelsoftware.co.uk

Frans C
Jan 11th, 2000, 12:29 AM
If you want to use the function like a global function in your standard exe, you should set the instancing property of the class in the activex dll to GlobalMultiUse. In your standard exe add a reference to the dll.