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 ?

Path csiph.com!weretis.net!feeder4.news.weretis.net!news.albasani.net!www.openwatcom.org!not-for-mail
From Lynn McGuire <lynnmcguire5@gmail.com>
Newsgroups openwatcom.users.c_cpp
Subject is _bstr_t not defined in Watcom ?
Date Thu, 2 Aug 2018 16:29:18 -0500
Organization OpenWatcom
Lines 31
Message-ID <pjvsuv$4dd$1@www.openwatcom.org> (permalink)
NNTP-Posting-Host 108-237-228-37.lightspeed.hstntx.sbcglobal.net
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace www.openwatcom.org 1533245215 4525 108.237.228.37 (2 Aug 2018 21:26:55 GMT)
X-Complaints-To news@www.openwatcom.org
NNTP-Posting-Date Thu, 2 Aug 2018 21:26:55 +0000 (UTC)
X-Mozilla-News-Host news://news.openwatcom.org:119
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
Content-Language en-US
Xref csiph.com openwatcom.users.c_cpp:3539

Show key headers only | 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