473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

for those who still create COM servers

5 985
Egbert Nierop (MVP for IIS) <eg***********@nospam.invalidwrote:
Boost BSTR performance by 3000%
http://technolog.nl/eprogrammer/arch...7/25/1009.aspx
anyone willing to rewrite _bstr_t ? ;)
B.

Jul 25 '06 #2

"Bronek Kozicki" <br**@spamcop.netwrote in message
news:OQ**************@TK2MSFTNGP05.phx.gbl...
Egbert Nierop (MVP for IIS) <eg***********@nospam.invalidwrote:
>Boost BSTR performance by 3000%
http://technolog.nl/eprogrammer/arch...7/25/1009.aspx

anyone willing to rewrite _bstr_t ? ;)
That would be a hard task :<

I've been looking into the source, and that one looks much more dependent on
tiny subroutines, while the member functions of CComBSTR are independently
written.
Whynot just use CComBSTR instead of _bstr_t ?

in addition, CComBSTR2 also has methods like CString has (formatting), so if
you manipulate strings (in/out or retval) you even do not have to cast to
CString and BSTR back, thus again improving scalability. I only would like
someone to improve Join and Split on the CComBSTR2 class. These functions
are really slow.

Jul 25 '06 #3
Egbert Nierop (MVP for IIS) <eg***********@nospam.invalidwrote:
Whynot just use CComBSTR instead of _bstr_t ?
maybe because _bstr_t is already in your project if you use #import? Or
because it's more const-safe than CComBSTR? Or because it does simple
and nice Unicode<>ANSI conversions?
B.

Jul 25 '06 #4

"Bronek Kozicki" <br**@spamcop.netwrote in message
news:u0**************@TK2MSFTNGP03.phx.gbl...
Egbert Nierop (MVP for IIS) <eg***********@nospam.invalidwrote:
>Whynot just use CComBSTR instead of _bstr_t ?

maybe because _bstr_t is already in your project if you use #import? Or
that would be 500bytes extra code on your compiled project ;-)
because it's more const-safe than CComBSTR? Or because it does simple and
nice Unicode<>ANSI conversions?
Possibly. I never do Unicode <-ansi conversions since I simply never
develop for Win9x/ME :).

There are very nice ATL conversion macro's that do the task already. But
since I don't know _bstr_t for sure, I cannot speak about this.

Jul 25 '06 #5
Egbert Nierop (MVP for IIS) <eg***********@nospam.invalidwrote:
>maybe because _bstr_t is already in your project if you use #import?
Or

that would be 500bytes extra code on your compiled project ;-)
and yet another string class, with different ownership semantics than
others. Mistakes in ownership handling can be pretty expensive, if you
forget the semantics of class you use. Thus I simply do not use the ones
I do not really need.
>because it's more const-safe than CComBSTR? Or because it does
simple and nice Unicode<>ANSI conversions?

Possibly. I never do Unicode <-ansi conversions since I simply never
develop for Win9x/ME :).
I do use std::runtime_error (or actually my own classes derived from
thereof) and the problem is that it does not accept const wchar_t* :-(
B.

Jul 25 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark Huebner | last post by:
I have Visual Studio 2003 Professional and MS SQL Server 2000 installed on my laptop. For some reason, I can't create a new database with the Visual Studio Server Explorer. The error message is...
0
by: Mark Huebner | last post by:
I have Visual Studio 2003 Professional and MS SQL Server 2000 installed on my laptop. For some reason, I can't create a new database with the Visual Studio Server Explorer. The error message is...
0
by: Mark Huebner | last post by:
I have Visual Studio 2003 Professional and MS SQL Server 2000 installed on my laptop. For some reason, I can't create a new database with the Visual Studio Server Explorer. The error message is...
0
by: EoRaptor013 | last post by:
I have been trying for several days to create a peer-to-peer replication among three servers. I first created the publication on Server A, enabled it for peer-to-peer to peer on the publication...
2
by: Abhi | last post by:
i need to create a user in web mail using dotnet coad by using webmailserver api ex: xxx is my webmail then i want to create to a user in that webmail xxx ex: yyy@xxx.com how i should do in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.