CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Posts
    384

    The Variant Data Type

    There is a need to migrate a COM based C++ component to a pure C# .NET based component without having anything to do with COM (no CCW).
    The signatures of some of the method interfaces contain data types like BSTR and VARIANT *.
    What do you think would be apt replacements for these data types in a .NET based assembly ?
    Would replacing BSTR with String and VARIANT * with object be a good understanding ?

    Thanks !

  2. #2
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: The Variant Data Type

    Hi. I've got a few questions...

    Why is there are need to do such a migration?

    Are there any clients that currently depend on the COM component? Or are you developing new clients that will consume the .NET version of the component?

    If you don't have to support any existing clients of the COM component. You are not bound by the current interface and you can define any interface as you see fit. More specifically you can side-step the issue of how to map a VARIANT*!!??

    The real question should be what are my clients expecting? I doubt they really want an instance of 'object'. Basically you can be more specific and you ignore the current interface re-write everything using .NET patterns and conventions.

  3. #3
    Join Date
    Jan 2006
    Posts
    384

    Re: The Variant Data Type

    The legacy implementation exposed COM interfaces which were consumed by multiple clients including ASP/VB Script etc.
    There is a need to migrate the implementation to .NET components instead of COM based components - to be consumed by .NET clients. The customer expects the interfaces to be maintained as much as possible as the original implementation (except ofcourse for the conversion to .NET data types)

    Given the above background, what would be your suggestions ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured