Board index » cppbuilder » ActiveX, BSTR, UNICODE problems

ActiveX, BSTR, UNICODE problems

I have glanced through many of the problems plaguing the developers using
Borland C++ Builder 4.0.  It appears obvious that the new ActiveX import
functions contain some bugs.  I am very appreciative of all the new work
that has been put into the OLE, COM, and ActiveX interfacing in Builder.  I
have not yet had a chance to run into the event problems that others speak
of but have found a different but related bug/problem.

Builder 1 imported an OCX control that I have and implemented two functions
using normal ASCIIZ character strings.  This is the correct implementation
of the object.  Builder 4 imported the OCX control declaring the parameters
as BSTR (ultimately wchar_t*).  Why does Builder assume the new WIDE UNICODE
standard to be what is needed in this case?  Executing the application will
cause an access violation.  When I manually modify the auto-generated code
to be (char*) instead of (BSTR) the code executes correctly again.

I'm sure others are having similar problems.  Is there a way to turn off
UNICODE implementation all together until the importer is fixed or will I
have to manually edit the CPP and HPP files.

 

Re:ActiveX, BSTR, UNICODE problems


: "Clayton Arends" <care...@evisions.com> wrote:

Quote
>Builder 1 imported an OCX control that I have and implemented two functions
>using normal ASCIIZ character strings.  This is the correct implementation
>of the object.  Builder 4 imported the OCX control declaring the parameters
>as BSTR (ultimately wchar_t*).  Why does Builder assume the new WIDE UNICODE
>standard to be what is needed in this case?  

Clayton, I am sorry that I don't have a solution, but could you please
go to

  http://www.borland.com/devsupport/bugs/bug_reports.html

and submit a bug report on this? Thanks!

Please mention which control you are using, too, so that someone can
try to reproduce the problem.

--
Stefan Hoffmeister (TeamB)     http://www.econos.de/
Please do apply judgement when sending email.

Other Threads