?
Solved

What is the maximum number of characters you can put on a BSTR?

Posted on 1999-01-29
3
Medium Priority
?
237 Views
Last Modified: 2013-11-20
What is the maximum number of characters you can put on a BSTR?
0
Comment
Question by:lucent2000
[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
  • 2
3 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 1328511
BSTRs are double NULL terminated and can be of any length under Win32.  Some functions that take a BSTR, however, may not be so forgiving, however...
0
 

Author Comment

by:lucent2000
ID: 1328512
The correct answer is this:
Quote from Nathan

2 gig...  I would not count on that being available as physical memory and
swap space will have to  actually hold the data if it is to be in memory.  

Why?  BSTR is, by defintion a length prefixed array of data.  The length
field for Win32 is a 32-bit integer, so the largest size is 2^32.  But under
WinNT and Win95, you can only access 2 gig of addressable space (as a user
process, a kernel level process could get all 4 gig), so it is 2 gig that
could be potentially used.



0
 
LVL 32

Accepted Solution

by:
jhance earned 100 total points
ID: 1328513
I'll have to disagree.  The 2G limit is NOT a BSTR limit but rather a Win32 limit. BSTR on another platform will not have this limit.
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

764 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