|
-
Jun 21st, 2002, 07:43 AM
#1
Thread Starter
Fanatic Member
Calling ADO from Borland C++ COM
My secretary hopes that I will pay her, her landlord hopes that she will produce some rent, the Electricity Board hopes that he will settle their bill, and so on. I find it a wonderfully optimistic way of life. [Dirk Gently]
-
Jun 24th, 2002, 10:32 AM
#2
Addicted Member
is there environment for com in borland?
is there environment for com in borland?
-
Jun 25th, 2002, 03:57 AM
#3
Thread Starter
Fanatic Member
Yes - to make a COM object in Builder 5 or 6 just do the following:
1. Click File | New, choose the Activex Tab and choose ActiveX Library
2. Click File | Save and save the project - The project name will be the same as the file name.
3. Click File | New - choose the Activex Tab and choose Automation Object. Enter the coClass name - this will be the class name
4. Click View | Type Liabrary.
5. To add a method click the New method button - in the parameters tab you can specify the arguments. Click Refresh when finished
6. Click View | Project Explorer - the code for this new method is in impl.cpp file
7. Goto Project | Options, On the Packages Tab, uncheck the "Build with runtime packages" checkbox, On the Linker Tab, uncheck the "Use dynamic RTL" checkbox
8. Compile the Dll
N.B. Every time you recompile dll you will need to specify new GUID numbers. To do this go to the Type Liabrary and click on each Icon if there is a GUID textbox on the attributes tab - right click on it and choose New GUID - when finished clcik refresh.
My secretary hopes that I will pay her, her landlord hopes that she will produce some rent, the Electricity Board hopes that he will settle their bill, and so on. I find it a wonderfully optimistic way of life. [Dirk Gently]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|