Thread: how to get the VARIANT type URL as a CString from OnDocumentComplete in webbrowser2

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    114

    how to get the VARIANT type URL as a CString from OnDocumentComplete in webbrowser2

    how to get the VARIANT type URL as a CString from OnDocumentComplete in webbrowser2

    Code:
    void MyDialog::OnDocumentCompleteExplorer1(LPDISPATCH pDisp, VARIANT FAR* URL) 
    {
    	
    }
    "URL" here contains the url that has been completed. but it is a variant type. i want to as a CString type so that i can check it. i tried casting but it doesnt work. does anyone knows how to do it?

    - MFC style
    - winxp
    - vc6.0

    thanks in advance!

  2. #2
    Registered User
    Join Date
    Mar 2004
    Posts
    114
    thanks for all your help
    here is the solution

    CString strURL(V_BSTR(URL));

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. header file bringing errors?
    By bluehead in forum Windows Programming
    Replies: 4
    Last Post: 08-19-2003, 12:51 PM
  2. How to define a variant record type in C
    By Diepvien_007 in forum C Programming
    Replies: 2
    Last Post: 03-12-2003, 04:23 PM
  3. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM
  4. odd errors from msvc std library files
    By blight2c in forum C++ Programming
    Replies: 6
    Last Post: 04-30-2002, 12:06 AM
  5. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 06:51 PM