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


Groups > openwatcom.users.c_cpp > #3545

Re: is _bstr_t not defined in Watcom ?

From Paul S. Person <psperson@ix.netscom.com.invalid>
Newsgroups openwatcom.users.c_cpp
Subject Re: is _bstr_t not defined in Watcom ?
Date 2018-08-04 09:33 -0700
Organization A noiseless patient Spider
Message-ID <v8lbmdt7urktsk4vqurreesd5gvqdlvdle@4ax.com> (permalink)
References <pjvsuv$4dd$1@www.openwatcom.org> <pk27h0$1mbd$1@gioia.aioe.org>

Show all headers | View raw


On Fri, 03 Aug 2018 20:39:17 +0200, Johann Klammer
<klammerj@NOSPAM.a1.net> wrote:

>On 08/02/2018 11:29 PM, Lynn McGuire wrote:
>> 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
>Hmmm. wasn't there some general rule to avoid types 
>starting in _ because those are implementation specific? 

I have /no/ experience working with this sort of thing, but it appears
to me that the /entire thing/ is specific to Microsoft, so why should
_bstr_t be any different?
-- 
"Nature must be explained in 
her own terms through 
the experience of our senses."

Back to openwatcom.users.c_cpp | Previous | NextPrevious in thread | Next 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