if i have a Class Module within an executable file, can i call a method from that Class from another executable file.
Thanks
Sam
Printable View
if i have a Class Module within an executable file, can i call a method from that Class from another executable file.
Thanks
Sam
No, you would have to create a DLL with the class file.
You can instantiate the class in the second program, and use it, but how would you expect to use it across programs? An instance of the class would be much like a global variable of any other type. Would you realistically expect to be able to use that variable in a second program?
Uh, in other words, no. If the second program is running, you could get the two to communicate such that you could use it, but calling a function in a separate execution space seems like a strange thing to allow. The address of the function would be different each time the other program ran.
thanks
Ummm...... if it is a standard EXE, no. But if you create it as an ActiveX EXE, then yes you can, as long as the class is public as well.
TG