Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > openwatcom.users.c_cpp > #3539

is _bstr_t not defined in Watcom ?

From Lynn McGuire <lynnmcguire5@gmail.com>
Newsgroups openwatcom.users.c_cpp
Subject is _bstr_t not defined in Watcom ?
Date 2018-08-02 16:29 -0500
Organization OpenWatcom
Message-ID <pjvsuv$4dd$1@www.openwatcom.org> (permalink)

Show all headers | View raw


I am trying to compile some of my Visual Studio code in OW 1.9.  My COM 
code references the function _bstr_t.  I cannot seem to find this 
function in OW.
    https://msdn.microsoft.com/en-us/library/zthfhkd6.aspx

Here is the code:

    OLEMethod (DISPATCH_PROPERTYGET, & result1, pExcelApplication,
               L"ActiveWorkbook",
               "Getting the pointer of the active spreadsheet 
(GetExcelCurrentSelection)", 0);
    if (result1.vt == VT_DISPATCH)
    {
       IDispatch *pDisp = result1.pdispVal;
       VARIANT result2;
       VariantInit ( & result2);
       OLEMethod (DISPATCH_PROPERTYGET, & result2, pDisp, L"Name",
                  "Getting the name of the active spreadsheet 
(GetExcelCurrentSelection)", 0);
       if (result2.vt == VT_BSTR)
       {
          selection += "\'[";
          selection += _bstr_t (result2.bstrVal);
          selection += "]";
          VariantClear ( & result2);
       }
       pDisp -> Release ();
    }

Thanks,
Lynn

Back to openwatcom.users.c_cpp | Previous | NextNext in thread | Find similar


Thread

is _bstr_t not defined in Watcom ? Lynn McGuire <lynnmcguire5@gmail.com> - 2018-08-02 16:29 -0500
  Re: is _bstr_t not defined in Watcom ? Lynn McGuire <lynnmcguire5@gmail.com> - 2018-08-03 11:15 -0500
  Re: is _bstr_t not defined in Watcom ? Paul S. Person <psperson@ix.netscom.com.invalid> - 2018-08-03 09:18 -0700
    Re: is _bstr_t not defined in Watcom ? Lynn McGuire <lynnmcguire5@gmail.com> - 2018-08-03 14:05 -0500
      Re: is _bstr_t not defined in Watcom ? Paul S. Person <psperson@ix.netscom.com.invalid> - 2018-08-04 09:31 -0700
  Re: is _bstr_t not defined in Watcom ? Johann Klammer <klammerj@NOSPAM.a1.net> - 2018-08-03 20:39 +0200
    Re: is _bstr_t not defined in Watcom ? Paul S. Person <psperson@ix.netscom.com.invalid> - 2018-08-04 09:33 -0700
      Re: is _bstr_t not defined in Watcom ? "Steven Levine" <steve53@nomail.earthlink.net> - 2018-08-05 01:34 +0000
        Re: is _bstr_t not defined in Watcom ? Lynn McGuire <lynnmcguire5@gmail.com> - 2018-08-06 14:12 -0500
          Re: is _bstr_t not defined in Watcom ? Paul S. Person <psperson@ix.netscom.com.invalid> - 2018-08-07 09:32 -0700
            Re: is _bstr_t not defined in Watcom ? Lynn McGuire <lynnmcguire5@gmail.com> - 2018-08-07 12:41 -0500
            Re: is _bstr_t not defined in Watcom ? Lynn McGuire <lynnmcguire5@gmail.com> - 2018-08-07 12:43 -0500

csiph-web