Software Archive
Read-only legacy content

DUH!

rahzan
Novice
312 Views
I am trying to fool w/ the variant type in the context of IWEB sample.
There seems to be NO documentation inthe help files about the variant type and members such as .VU and .VT or methods like ConvertStringTOBSTR etc.

Where can I find a doc'n or def'n on methods like ConvertStringTOBSTR and VariantChangeType etc.?

I have only the sample VARUANT.F90 which less than glib. Teh sample has things like VT_BSTR, I assume these are defined in DFCOMTY but does one really have to extract the behavior from the actual module?
Or am I missing the poper place to look up Variants?

Thanks for any hints, Tim

p.s. where does MAX_PATH come from in IWEB.f90?
0 Kudos
4 Replies
Intel_C_Intel
Employee
312 Views
Hi,

Here is a copy of my reply to another recent message:

"VARIANTs and SafeArrays are Windows (COM) concepts and are documented in the Microsoft documentation. VF doesn't provide any additional abstraction over these native Windows types. We merely try to provide Fortran interfaces and type definitions for the Windows functionality. There are a few examples of using SafeArrays and VARIANTs in the ...SamplesAdvancedCOM directory. VT_ARRAY (and friends) are defined in the DFWINTY module with the same values as in the VC++ header files.

Many of the problems that people encounter in dealing with VF COM clients/servers have to do with the mostly undocumented restrictions in Visual Basic. It demands that arguments be passed in particular ways - it will not accept any legal VARIANT that you can create, for example. See "Interface Design Considerations" in the "Creating a COM Server" chapter for an example of VB restrictions."

MAX_PATH is defined in the DFWINTY module. As with most everything else in there, it is a Fortran translation of things defined in the VC++ Windows header files.

Leo
0 Kudos
rahzan
Novice
312 Views
Thank you Leo,
At least you've confirmed that I should not waste time lookng for documentation.

I also appreciate the warning about Basic.

If I had done what you describe (provide all the interfaces etc) if only for the sake of taking credit and showing off (and not even making all the hard work actually accessible to the intended end users) I would have provided _some documentation in the users guide. In contrast to the terrific tutorial on the Com server wizard thingie in the ug.

But getting past that, is there a place in the MSC-compiler documentation or anywhere else I can look these things up or DFWINTY is it?

Tim
0 Kudos
Intel_C_Intel
Employee
312 Views
> But getting past that, is there a place in the MSC-compiler documentation or anywhere else I can look these things up or DFWINTY is it?

In the on-line documentation that ships with VF there is a top level section called the "Platform SDK". This documents all of the MS defined APIs, data types, etc. For example, VARIANTs are discussed under Platform SDK -> COM and ActiveX Object Services -> Automation -> Data Types, Structures, and Enumerations. That version of the docs is a couple of years old now. You can find later information at the msdn.microsoft.com web site.

A good place to start when looking for something new (e.g. VARIANTs) is to use the on-line doc search capability. For example, I would enter VARIANT, and check the "Search titles only" checkbox

Leo
0 Kudos
rahzan
Novice
312 Views
Thanks,
'Course I did the search as I always do but when topics came under my C compiler's I could not decide if any of it applies.

I'll look again

Tim
0 Kudos
Reply