473,322 Members | 1,540 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,322 software developers and data experts.

BSTR conversion

Below is a class method that puts a new string
in place of the old one!

I am new to this environment!
But if I am in the write area to begin with!
I am trying to iterate thru the string passed to this
method! Encrypt it and put it back into newVal.

Maybe a for/next or loop here around newVal.
I would like to rebuild the string(newVal)
character by character to a new string!
and put an encypted string in it's place.
Your help is greatly appreciated!!!
John

STDMETHODIMP Cwmlclass::put_Encrypt(BSTR newVal)
{

//poor code below!
newVal = _bstr_t("test");
//myEncryptPwd is my return string
myEncryptPwd = newVal;
return S_OK;
}

Nov 17 '05 #1
0 961

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

Similar topics

1
by: Chris | last post by:
I am not sure if this is the right newsgroup. But does anyone know what is the difference between a BSTR and a LPOLESTR? The only thing I could find out is that the advantage of taking BSTR...
7
by: Gilad Walden | last post by:
I use C# in .NET framework. I have an ActiveX implemented in C++ that has a COM interface method that gets as it’s out parameter a BSTR* . The interop translates this BSTR* into C# string. From...
0
by: Digifox | last post by:
I am new to this environment! But if I am in the write area to begin with! In my atl dll I am creating a functions that pass information back and forth to access, vb and csharp. I am trying to...
8
by: Michael Tissington | last post by:
I have a C++ function in a DLL of the form BSTR WINAPI DoSomeWork(LPCSTR szConnection, LPCSTR szGUID) I use SysAllocStringByteLen to return a BSTR. For the most part this works accept when...
5
by: Karthik | last post by:
Hello! I am not a wizard in this area! Just need some help out in this. I am trying to convert bstr string to new character string. Here is the snippet of my code. **** Code Start**** ...
5
by: bluter | last post by:
We have server components which were created by a third party and compiled in VC++5 (sp3). They run fine on NT4 and 2000, however during testing of our migration to Server 2003, these components...
37
by: Egbert Nierop \(MVP for IIS\) | last post by:
In win32 mode, a BSTR was UINT length prefixed and terminated exactly by a zero char. So if you allocated "Hello World" that would allocate 28 bytes. In x64 and (IA64 as well) it would become...
4
by: Abubakar | last post by:
Hi, Lets say I write this line: BSTR b = m_pdoc->Getxml (); where m_pdoc is MSXML2::IXMLDOMDocumentPtr. Now "b" contains the xml text. When I exit the function in which this line is written,...
2
by: mzdude | last post by:
I need to interface with a windows DLL that has the following signature extern "C" void Foo( BSTR in, BSTR *out ) Code so far Traceback (most recent call last): File "<pyshell#14>", line...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.