?
Solved

converting COleVariant to CString

Posted on 2000-04-28
6
Medium Priority
?
666 Views
Last Modified: 2013-11-20
How to convert a COleVariant to CString?
0
Comment
Question by:buccso
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 2759029

COleVariant var;
CString str;

// ...

str = (LPCTSTR) var.bstrVal;
0
 

Author Comment

by:buccso
ID: 2759052
It only converts the first char of the string. To work correctly you have to skip the cast.


0
 
LVL 86

Expert Comment

by:jkr
ID: 2759074
You should have rejected insted of grading a 'D'...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:buccso
ID: 2759104
With a simple modification it solved the problem. I couldn't reject it.
0
 
LVL 86

Expert Comment

by:jkr
ID: 2760517
'D' is 'hardly acceptable' - this is a bit insulting (at least for me)
0
 

Author Comment

by:buccso
ID: 2768417
I think you are a bit huffy. What does it matter, which greade do you get?
Nothing.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question