Software Archive
Read-only legacy content

COM Wizard

Intel_C_Intel
Employee
324 Views
I guess someone here has used this? And looking at the Adder example I would also guess that the general recommendation would be to upgrade to 6.5 Pro rather than try the COM stuff manually?

Am I right?

Any comments on the wizard?

Cheers

Dan

(P.S. Steve and other VF guys - the adder example is horrible when it comes to reading the code - can't the wizard be made to generate something more readable?)
0 Kudos
5 Replies
Intel_C_Intel
Employee
324 Views
There's no doubt in my mind that the upgrade is worth it.
What type of comments specifically are you looking for wrt the wizard?
Send in your suggestions for the wizard generated code to vf-support@compaq.com. They are always welcome.

-John
0 Kudos
Intel_C_Intel
Employee
324 Views
Thanks for the reply John. Comments I was looking for were sort of 'ease of use' type thing. I'd be using it to turn some VF DLLs into COM objects - comments on suitablility for that job...
Looking at the CHM help entries it looks quite easy and fiarly intuitive.
Perhaps my idea of what makes 'nice looking' code is just me, but spaces between functions would be a good start, and the function definition on one line, and consistent capitalisation of keywords etc (either all lower or all uppercase) etc.
OK, so its easy enough for me to do this, but editing auto-generated code goes against the grain a little! :o)

Dan
0 Kudos
Intel_C_Intel
Employee
324 Views
Hi Dan,

> Perhaps my idea of what makes 'nice looking' code is just me, but spaces between functions would be a good start, and the function definition on one line, and consistent capitalisation of keywords etc (either all lower or all uppercase) etc.

The "unnatural" spacing comes from the code generation and dealing with optional and repeated parts of the code. It might be difficult to make it "prettier". The consistent capitalisation could be done. As John saids, comments are always welcome.

Regards,
Leo
0 Kudos
Intel_C_Intel
Employee
324 Views
Hi Dan,

I'd say that the COM Server Wizard (CSW) is definitely easy to use and that it's the only thing available that's suitable for the job, unless you are considering rewriting in another language.

Yes you can edit auto-generated code, but beware editing the DO NOT EDIT files because you'll lose those edits if you make changes in the CSW - those files are re-generated. This is a minor nit of mine with the CSW - I prefer to have full control over my IDL as I can with ATL. But I think that the design of the CSW is well targeted for the broader base of CVF users.

hth,
John
0 Kudos
brownts
Beginner
324 Views
Dan,

I have converted some Fortran DLLs to COM both as a COM server accessed by VB code and with the Fortran accessing VB objects. Going to a COM server was unbelievably smooth using the COM server wizard. Accessing the VB objects was more difficult due to my initial lack of understanding how to deal with variables of type Variant. Once that was understood I wrote some code to handle the variants and don't have to think about it again. Overall, the CVF COM stuff has made interfacing with VB much easier.

Bottom line -- the COM stuff is great!
0 Kudos
Reply