Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1105935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:42:48+00:00 2026-05-17T01:42:48+00:00

in the VS2008 ide, i write a wrapper to encapsulate the VC dll(vc.dll) to

  • 0

in the VS2008 ide, i write a wrapper to encapsulate the VC dll(vc.dll) to be a Com(com.dll) and the vc.dll will be called by c.exe

qutsion#1:
i found the compile option for vc.dll was Char Set:Not Set
my question is, Which Char Set should i use to compile the com project?

question#2:
if we set the Char set to be Not Set also for the com project ,then how should i handle the string in the interface of the functions? because there are many string types such as TCHAR and BSTR and _bstr_t which one is better for my Com project?

question#3:
how should i set the Char Set for the C project(C.exe)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:42:49+00:00Added an answer on May 17, 2026 at 1:42 am

    There are zero reasons left to avoid setting the Character Set to Unicode. Windows has been a native Unicode operating system for the past 17 years. COM automation can only work with Unicode strings. It doesn’t actually matter that much since you should be using BSTRs in your COM code, it is not affected by that setting.

    Always use BSTR in your interface declarations. The _bstr_t class is indeed a handy wrapper class around BSTR to make manipulating these strings easy. TCHAR is archaic and not compatible with COM automation.

    Same reasoning goes for the client app. The setting doesn’t matter because you forced the client to use BSTR with your interface declaration. But not using Unicode in the rest of that app’s code is archaic. And the code you’d have to write to convert the BSTR to a const char* and back is just a waste of your time and a potent source of lossage when the Unicode string contains characters that cannot be translated to the system code page. All mainstream COM clients (Java, .NET, Javascript and other scripting languages) use Unicode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I run the program from IDE (VS2008) it works perfectly. When I want
VS2008 Code Analysis will flag a spelling mistake in an identifier using the IdentifiersShouldBeSpelledCorrectly
In vs2008, is it possible to write an extension methods which would apply to
NOTE: Using .NET 2.0, and VS2005 as IDE Hello all, I'm working on logging
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
In VS2008 I have written a C# service, an installer, and have created a
Does VS2008 have somewhat C++0x standard support? DUPLICATE Visual Studio support for new C
The VS2008 SP1 documentation talks about std::tr1::mem_fun . So why, when I try and
When editing XAML in VS2008 SP1, the editor is really slow. devenv process seems
I use the VS2008 command prompt for builds, TFS access etc. and the cygwin

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.