bstr size issue

Is every char in a BSTR always 2 bytes?  Does it depend on 
2/11/2004 11:44:26 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 14

BSTR is defined like typedef OLECHAR* BSTR;
OLECHAR is defined like typedef WCHAR OLECHAR;
WCHAR is defined like typedef WORD WCHAR;
WORD is defined liketypedef unsigned short WORD;
unsigned short always is 2 bytes.

So each BSTR element is 2 bytes.

Rodrigo Corral Gonz´┐Żlez [MVP] FAQ

2/11/2004 12:28:28 PM wrote:

>Is every char in a BSTR always 2 bytes?  Does it depend on 

My understanding is that a BSTR is always Unicode. Unicode is two
bytes per character.

Tim Slattery
Slattery_T (112)
2/11/2004 1:36:35 PM
>Is every char in a BSTR always 2 bytes? 

Yes - they should be unless the BSTR is being misused, or isn't really
a string - SysAllocStringByteLen.

davidl7375 (2060)
2/11/2004 2:05:59 PM

Similar Artilces:

Please help, Issues moving a CRM4 database to a new server and dom
Hi, I know there are a few posts here about this but nothing works for me. My Goal is to move a database to another server in another location with a different domain. Here is what I tried. I backed up the database on the current server (domain name: serverusa). I did backup both the MSCRM and the Config. First I tried to install MSCRM fresh on the new server (Domain name: server-ebm) I then checked it and I could access the CRM fine on the server using IE. Then I did go to the SQM management and restored the MSCRM database from a dump. After this I can access but it tells me "Inva...

Word printing issue
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Hi all, new to MAC, switched from PC to MAC in December 2009. <br> Trying to simulate MS Publisher using MAC Word 2008. <br> Can only seem to get background colours to be effective at Print Preview stage, if I add a background colour in the Word document view first and then switch into Print Preview the background colour has disappeared and the same if I try to Print. <br><br>Any ideas? Check in Word>Preferences>Print>Options for this document only... What is your setting...

exmerge calendar send on behalf issue
Hello - I migrated an exchange box using the exmerge utility and have noticed that when a user tries to change an appointment that was on the old box and has invitees, it will not send an update as there is a permission error with send on behalf. This is not a shared calendar, just the users own calendar that was imported from their previous mailbox on the other exchange server. The only scenario that I can figure that would cause something like this is is the calendar appointment is tied down with the previous user and is not associated as the organizer with the new appointment. Any thoug...

exchange 2000 size limitation and exchange server im
Hi All: Did Microsoft release an update to increase the maximum database size in Exchange 2000 Standard Edition to 75 GB as they did with Exchange 2003, Service Pack 2? I would guess not. Also, Exchange Server 2000 had an IM feature that worked with the Windows Messenger program. It looks like this functionality was removed for Exchange 2003, is that correct? Drew Drew <> wrote: >Did Microsoft release an update to increase the maximum database size >in Exchange 2000 Standard Edition to 75 GB as they did with Exchange >2003, Service Pack 2? I would guess n...

MRP issue
For some reason we have a part in MRP that is not quite working as predicted. It suggests buying more items than we have demand for and ends up with 6 extra units. <img src=""/> Any idea why this would be occuring? I noticed there is a suggestion to get -10 units, not sure if that is a problem. We do run MRP regen every day, so that shouldn't be an issue in this case. Thanks, -Scott If you peg the recommendation for -10 uni...

Change paper size
I am using an Epson R300 printer and I can't seem to be able to alter the paper size in the print properties box, it only has A4 available. I can change the size in page setup, but this does not change the size the printer wants to print on. This only seems to be happen Publisher, if I try it in Adobe Photoshop for instance I have many paper sizes available. Did you try in File, Print Setup? -- Don Vancouver, USA "Hecate" <> wrote in message news:3rfih.19331$ >I am using an Epson R300 printer and I c...

Mail Box Size
Exchange 2000 SP3 + rollup. Is there a limit to the size any one user's mailbox?. I have a client with one user having a 6 Gig mail box. Yes, that is correct 6 GIG for one user. Thanks B the only limit is the limit of your store, ie if standard then 16GB(if hes the only user) enterprise = as much disk space as you have Bob wrote: > Exchange 2000 SP3 + rollup. Is there a limit to the size any one user's > mailbox?. I have a client with one user having a 6 Gig mail box. Yes, that > is correct 6 GIG for one user. > > Thanks B > > On Wed, 13 Jul 2005 ...

Frustrating Backcolor issue
Hi All, On my forms in the database I'm working on, all the combo boxes backcolor are transparent on moving focus to another control. No matter what I try I can't get it to stay the set backcolor whether I leave it as default or set a color. The moment focus moves out of the combo box it's backcolor is that of the form detail. Am I missing something? I'm probably misunderstanding your question, but it sounds like you need to set the combo box's Back Style from Transparent to Normal. If set at Transparent, it doesn't matter what Back Color you specify, ...

IE 8 Parsing issues?
Hello, since a few month we're having strange requests in our web server logs. Example: 2010-01-27 18:00:35 W3SVC183691552 GET /SysRes/GLOBALSkin/Ski/head><body+onload= - 80 - Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+5.1;+Trident/4.0) 200 0 3 21699 757 46 Sometimes embedded resources like Scripts or CSS files are not loaded correctly. The path to the external resources is broken by adding any HTML code snippet of the page which embeds the resources. It happens on different pages / applications on our serv...

Hyperlink issue
I have a couple of anomolies with excel hyperlinks. I have a spreadsheet created by copying text from an HTML file (saved web page). It has some cells with hyperlinks. These hyperlinks work fine. When I create a new hyperlink to similar page on the same site thing work the same as the copied hyperlinks. I create this the same was as I create the malfunctioning one as below. This page yeilds a normal working hyperlink - (see last paragraph) HOWEVER, when I create a new hyperlink, to a different page on the same site (a link to one of the...

Another Issue With A Function
Ron Rothstein suggested and I used this function in my Excel 2003 Workbook: Public Function QBRushYds(W, Q) QBRushYds = Worksheets("Week" & W).Range("C2").Offset(Q).Value / 10 End Function In Worksheet Totals Cell B56 thru B59 I have the following four calculations: =TRUNC(QBRushYds(1,1)) =TRUNC(QBRushYds(1,2)) =TRUNC(QBRushYds(1,3)) =TRUNC(QBRushYds(1,4)) In Worksheet Week1 Cells C3 thru C6 I have the following values: 725 814 283 9 The function correctly calculates the values: 72 81 28 0 If I change any of the values in C3 th...

Multi User Issue's
Access 2003 Split database No Security Front end (Fe) and Back end (Be) are in the same directory on the server "SHORT CUT" to fe on each (2) workstation Opening the DB on each of the 2 workstations does work HOWEVER if it I already open on one workstation it will NOT OPEN on the other workstation. I have tried: STARTING on BOTH workstations - Same results Tried the same set up with an XP server and a win2000 server - Same results Checked to be sure opening mode is "shared" This is my first attempt at a multi user configuration for Access. I called a buddy of mine who...

Limiting size of worksheet
I want to set up a worksheet and limit to 25 columns and 200 rows. I seem to can't find it. Any suggestions are appreciated. Jo -- JB ----------------------------------------------------------------------- JBL's Profile: View this thread: Joe You cannot do away with the unused cells. A worksheet has 256 columns and 65536 rows. You can hide the rows and columns you don't want to see. Select them and Format>Hide. Alternative.........You may want to...

Formatting issue
I have the following formula in one of my cells: =IF(C5<>0,C6 &" Supplied by Marketing - Calculated value is " &C4,C4&" Calculated value") The values in C4, C5, C6 are all in dollar format but the output doesn't show in dollar format. See below: 7500 Supplied by Marketing - Calculated value is 8800 . Any way to get the format like this: $7,500.00 Supplied by Marketing - Calculated value is $8,800.00 Hi, =IF(C5<>0,"$"&C6&" Supplied by Marketing - Calculated value is "&"$"&C...

issue with serial port on module, updating form
Hello, Ive created a serial port instance on a module. In the same module I have the sub data_received. Now I'd like to update a control in a form, how can I do it? Thanks in advance You need to use Control.BeginInvoke or .Invoke to update the UI via a Delegate. You can download the VB2005 Terminal example from my website, which illustrates this. Dick -- Richard Grier, Consultant, Hard & Software 12962 West Louisiana Avenue Lakewood, CO 80228 303-986-2179 (voice) Homepage: Author of Visual Basic Programmer's Guide to Serial Comm...

Standby -- having issues
My computer is running Windows XP Home SP3. I have configured peripherals to allow the keyboard to wake up the computer (from Standby -- I do not use Hibernate), but not the mouse and not the NIC. However, I can still bump the mouse and get the computer to wake up. And other times, I come home or wake up in the morning and see that the computer has woken up on its own. I checked ACPI settings in BIOS -- set to S3, as desired. No other power management settings in BIOS. (I have an older Dell Dimension with PS/2 keyboard & mouse.) Looked through the forums/newsgroups, b...

virus issues
We are using exchange 2003. Apparently we have been hit by a virus. All the users are being constantly hit with emails that are from either: system administrator undeliverable: bla bla bal (password has been updated or account suspended..which is the virus package I think) or from : you have successfully updated your password (this is the virus package) I have antivirus software running on all systems, including the server. I have run the FXmydoom.exe package from symantec on all the servers and many (not all) of the workstations.. ...I did a google on &...

How do I set the size of a chart in excel (without using the mous.
How do I set the size of a chart in excel (without using the mouse)? You can set the size programmatically: With ActiveSheet.ChartObjects(1) .Width = 300 .Height = 200 End With katy wrote: > How do I set the size of a chart in excel (without using the mouse)? -- Debra Dalgleish Excel FAQ, Tips & Book List Hi, If you hold the shift key whilst selecting the chart you can move with the cursor keys. CTRL+1 will display the format dialog which will allow you to alter the height and width. Only thing is I don't know how to select t...

old server removed, now a new synch issue
Hello folks. Today I finally moved the last mailboxes and public folders off our old exchange 2003 server to a new one. I followed all the KB's I could find about properly decomissioning the server, and then uninstalled Exchange 2003 on that system. Since then, all my Outlook 2003 clients are getting the following synch issue whenever you first open outlook with cached mode. And I've tried recreating my profile, that doesn't help at all. This has to be related to something I missed. Anyone have suggestions? 15:54:03 Synchronizer Version 11.0.5604 15:54:03 Synchronizin...

CDateTimeCtrl ideal size #2
Hi, does anyone know a trick how to get the ideal size for the CDateTimeCtrl to display all of its content in all formats it supports? It doesn't resize itself to a proper size for its content and it seems it has alot of internal logic for sizing the various internal edit fields. A simple GetWindowText() and GetOutputTextExent() doesn't work in all cases (i.e. when there are date/time formats set without leading zeros). I know there is a special window message available on vista to fetch the ideal size of the CDateTimeCtrl, but what to do in previous windows versions ? Many t...

Crosstab Row Heading Issues
Hi, I have Access 2003 and when I do a cross tab I cannot bring in more than 3 field values for row headings - my coworker (who has Access 97) can bring in >3 row headings. Is this a paremter setting in Access 2003? Thanks, Mike I believe that the Wizard can't handle more than 3; however, you can do more with SQL. Try creating a crosstab with the three headings, them modifying it at SQL level to add more. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "mike" wrote: > Hi, > > I have Access 2003 and...

Rounding for order size
I'm doing a forecast using some formulas. I want the result to take in consideration the minimun order size. For example if my forecast is 38 I want the result to be expressed as 48 which is the minimun package size. The same for example if forecast is 500 I want it to show 480 or 528 which are the actual amounts that I can request. How can I do this? FA Hi! So, what you want to do is round to the nearest multiple of 48? =ROUND(A1/48,0)*48 Biff "FA" <> wrote in message

Set the initial Frame size from the view size
Hello, I'm writing a Single Document Application and I want for the View client Rectangle a CRect: (0,0,400,300). How can I set the initial Frame size? ( the window rectangle of the frame is larger because of the window border, menu, toolbar and status bar) Thank you, E.A. ...

Overlimit size
Hi, I keep receiving administrative notices that say my mailbox is over it's size limit. I have tried deleting the inbox, sent files, moving files, etc. Is there an easier way to do this? Are there directions somewhere for moving folders and saving them somewhere else? Exchange, POP3, IMAP, HTTP, other...??? Check your webbased mailclient and see what's still stored on-line. -- Roady [MVP] Microsoft Office and Microsoft Office related News Also Outlook FAQ, How To's, Downloads and more... Tips of the month: -Create your own fully customized Toolbar -Cr...

Report Issues
Hi All, Got a Simple Problem, With a Report, The Situation is, I Have A Form Which Opens When a PROJECT No Is Typed Into a Project No Search Dialog Ive Created When The Project No is Typed In The Result Form Is Displayed Shows The Details Of The Project Relating to that Project Number!. To Create This I Created a Qurey. What I Want To do is Be Able is To Print That Just One Record in a Report Form, As The Print Current Record Prints The Form Which Looks Very Un Professional, And I Have Tabs on the form, so So its Not Any Use. The Report Ive Created at Monement Points To The Same Qurey, W...