No. It is just not consistent see that is the problem as related to VB. WCHAR is always WCHAR but BSTR it depends:
#if defined(WIN32) && !defined(OLE2ANSI)
typedef WCHAR OLECHAR;
#else
typedef char OLECHAR;
#endif
typedef OLECHAR* BSTR;
-pete
>> so where is it coming from?
The same place as all the evils of mankind, human nature. Now i kindly request that you stop asking such easy questions. [lol]
-pete
What do you mean use? You did not provide enough information. As Ion states, if you are refering to a string literal you must escape the backslash character. If you are not familiar with the term "escape sequence" as it pertains to C/C++ you should look it up.
-pete
>> The above code doesn't work on a Win NT machine
NT What version? Your first post does not even indicate NT as a constraint let alone what version. If you have specific constraints for your solution you surely need to provide them in your post right? Otherwise how is anyone out here...
>> All win32 uses inside UNICODE
BSTR is not == to WCHAR array. So while the point about the OS natively using WCHAR is correct, within the context of VB interfacing with C calls it is somewhat misleading.
VB programmers can not effect the way the VB library translates BSTR into LPSTR types...
We have had a surge of posts from people that don't know C++ but are given production assignments to work with C++. We need to make a video; "Managers gone wild" [bugeyed]
And so I wake in the morning
And I step outside
And I take a deep breath and I get real high
And I scream at...
They hide that information in the documentation... i really wish they would stop doing that!
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconpassingstringstodllprocedure.asp
-pete
>> I think you've misunderstood my problem...
I do think i follow your post. I did forget to mention that to simply enable a menu item all you need is a message handler for the command itself. although the ON_COMMAND_UPDATE_UI will also work but of course i typed it backwards so that did not...
Personally i always look to upgrade as the primary option then i proceed to prove it wrong. If i can't prove it flawed i then upgrade. Of course the proving involves testing.
The reason i have a bias towards upgrading is to accommodate future application enhancements. If you find you are...
>> I seem to remember a recent benchmark test .....
Make sure you read up on those benchmark test scenarios real well if you intend to put any stock in them. From what I have seen they are almost never performed in equal fashion. That is why for one that places RED as the winner you can find...
This compiles for me.
vector<double> c;
vector< vector<double> > mat(0,c);
make sure you have the space between '>' '>'characters right?
vector< vector<double>space> mat(0,c);
-pete
Well actually you do have a problem. You need to initiailize the "i" variable in your for loops or it could be anything, for example -200, which might indeed cause an access violation.
for(int i=0; ....)
Always initialize variables... ALWAYS.
-pete
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.