Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

office and delphi

Can some one please help me and tell me how the olevariant works? i'm not realy sure how to use it and the places i do use it it doesn't work.

I need to know this cause the server applications that comes with delphi 6 to run office uses these variables, please can sumone help me?

Comments

  • sziszi81sziszi81 Member Posts: 80
    : Can some one please help me and tell me how the olevariant works? i'm not realy sure how to use it and the places i do use it it doesn't work.
    :
    : I need to know this cause the server applications that comes with delphi 6 to run office uses these variables, please can sumone help me?
    :


    The help (keyword: olevariant) says:

    The OleVariant type exists on both the Windows and Linux platforms. The main difference between Variant and OleVariant is that Variant can contain data types that only the current application knows what to do with. OleVariant can only contain the data types defined as compatible with Ole Automation which means that the data types that can be passed between programs or across the network without worrying about whether the other end will know how to handle the data.

    When you assign a Variant that contains custom data (such as a Pascal string, or a one of the new custom variant types) to an OleVariant, the runtime library tries to convert the Variant into one of the OleVariant standard data types (such as a Pascal string converts to an Ole BSTR string). For example, if a variant containing an AnsiString is assigned to an OleVariant, the AnsiString becomes a WideString. The same is true when passing a Variant to an OleVariant function parameter.
Sign In or Register to comment.