Couple of questions
-
Is it possible to have entry points in an application like that of a DLL. If so can you give some insight as to how I would set that up? Also are there any tutorials on creating activex controls in vc++. Is this the same as com? Also how come no cobol programs on this site. I see Java,Assembly,C,C++, but no cobol. How about it I know there are some members that are old cobol writers. Thanks Tom Wright Tom Wright Network Technical Services / Programmer tawright915@yahoo.com
-
Is it possible to have entry points in an application like that of a DLL. If so can you give some insight as to how I would set that up? Also are there any tutorials on creating activex controls in vc++. Is this the same as com? Also how come no cobol programs on this site. I see Java,Assembly,C,C++, but no cobol. How about it I know there are some members that are old cobol writers. Thanks Tom Wright Tom Wright Network Technical Services / Programmer tawright915@yahoo.com
You can export functions from an .exe by including a .def in your project just as you do for a .dll There's one catch however - when the application is loaded using LoadLibrary (Ex), the entry point for the application is NOT called (because it would launch the application), so you must code any exported functions so they do any needed initialization the first time they are called, or don't require initialization, and your application will receive no notification when it is unloaded, so normal cleanup is impossible. In case you hadn't noticed, MS Word 2000 (and possibly older versions) exports functions.
-
Is it possible to have entry points in an application like that of a DLL. If so can you give some insight as to how I would set that up? Also are there any tutorials on creating activex controls in vc++. Is this the same as com? Also how come no cobol programs on this site. I see Java,Assembly,C,C++, but no cobol. How about it I know there are some members that are old cobol writers. Thanks Tom Wright Tom Wright Network Technical Services / Programmer tawright915@yahoo.com
Yep. this is a mainly C++/MFC/Windows site. The best way to start setting up a *object* with methods that you can call from a external application is ATL. Start off the VC++ ATL wizard and create a ATL COM Wizard. Now create a simple object say *Maths* Right mouse click on IMaths in the classwizard and create a Method called Add returning long and using lNum1 and lNum2 as longs parameters. Follow the code and find the stub function where Add is implemented. Add the two numbers lNum1 and lNum2 and return the result. There's a whole lot of shit I have'nt covered here. If you want send me an email and I will quite happily talk you thru the steps of creating and calling the object + sample code. Regards Norm Almond Chief Technical Architect FS Walker Hughes Limited