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

    How to return string in ActiveX control method?

    I am developing a activex control( VC 6.0, MFC activeX control, use in IE ), this control provide a metho, and I want this method can return string to caller.

    for example, in IE, I use javascript code:

    Code:
    var obj = document.getElementById( "CONTROLID" );
    var sTemp = "";
    obj.functionname( sTemp );
    can sTemp variable return the string?
    or:
    sTemp = obj.functionname();

    In Visual C++, which type I should choose for the function's variable?
    LPCTSTR or LPUNKNOWN?

  2. #2
    Join Date
    Jun 2005
    Location
    Chennai , India
    Posts
    1,375

    Thumbs up Re: How to return string in ActiveX control method?

    GetString ([out, retval] BSTR* pString) : return a string...
    It takes seconds for rating…that actually compensates the minutes taken for giving answers
    The biggest guru-mantra is: Never share your secrets with anybody. It will destroy you.
    Regards, Be generous->Rate people
    Jayender!!

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