Article View: comp.os.ms-windows.programmer.tools.mfc
Article #121Re: how to convert a CString into a VARIANT ??
From: Ali
Date: Tue, 19 Dec 2000 17:13
Date: Tue, 19 Dec 2000 17:13
30 lines
1791 bytes
1791 bytes
I have never used it but just from looking at it bstrVal is a BSTR, its a char *. You can't just assign a string to it. something along this line.... or just do a new v.bstrVal = new char[100]; and then copy into it. VARIANT v; char *Temp[100]; strcpy(Temp,"toto"); v.bstrVal = Temp; Ali "Fr�d�ric VIALLET" <fviallet@com1.fr> wrote in message news:91o4be$pl$1@s1.read.news.oleane.net... > hi, > > use : VC++ 6 > > how to do to convert a CString into a VARIANT ? > VARIANT v; > v.bstrVal="toto"; > > ?? > > Thanks for help on the subject > > Fred > >
Technical Details
Message-ID:
<uIM%5.2397$SKV4.289276069@news.randori.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!cyclone.bc.net!newsfeed.stanford.edu!newsfeeder.randori.com!news.randori.com!not-for-mailReferences:
<91o4be$pl$1@s1.read.news.oleane.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 1138df,6492fccb20b167df X-Google-Attributes: gid1138df,public X-Google-Thread: 104971,6492fccb20b167df X-Google-Attributes: gid104971,public X-Google-Thread: fdcad,6492fccb20b167df X-Google-Attributes: gidfdcad,public X-Google-Thread: 104d65,6492fccb20b167df X-Google-Attributes: gid104d65,public X-Google-Thread: f7a51,6492fccb20b167df X-Google-Attributes: gidf7a51,public X-Google-ArrivalTime: 2000-12-19 09:30:33 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!cyclone.bc.net!newsfeed.stanford.edu!newsfeeder.randori.com!news.randori.com!not-for-mail From: "Ali" <ali__2@yahoo.com> Newsgroups: comp.os.ms-windows.programmer.tools.mfc,fr.comp.lang.c++,microsoft.public.vc.language,microsoft.public.vc.mfc,microsoft.public.vc.mfc.docview References: <91o4be$pl$1@s1.read.news.oleane.net> Subject: Re: how to convert a CString into a VARIANT ?? Lines: 32 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <uIM%5.2397$SKV4.289276069@news.randori.com> Organization: Randori News Inc. -- http://www.randori.com -- Fast! Date: Tue, 19 Dec 2000 11:13:25 -0600