[Openroad-users] StringObject in C/C++
Peter van Bennekom
Peter.vanBennekom at infor.com
Wed Nov 1 03:12:24 EST 2006
Thanks everybody - I will try to figure it out the coming days either with C/C++ or VB
Peter van Bennekom | Senior Technical Architect | Infor | office: +1 (610) 407-8113 | fax: +1 (610) 407-8027
-----Original Message-----
From: Bodo.Bergmann at t-online.de [mailto:Bodo.Bergmann at t-online.de]
Sent: Tuesday, October 31, 2006 8:58 AM
To: openroad-users at peerlessit.com
Cc: Peter van Bennekom; Fabian.Anderson at fintechnix.com
Subject: Re: [Openroad-users] StringObject in C/C++
Peter (and Fabian),
if you are on Windows you can develop a COM/ActiveX class with
attributes/methods using a BSTR type (which is a pointer to Unicode
characters).
This is a COM type, which is represented as "String" in VB.
An OpenROAD StringObject will automatically converted to/from a BSTR
attribute/parameter - without the 2000 byte limitation.
Your C/C++ string handling functions will probably use other types
(e.g. "LPSTR" or "char *" pointers), so you have to convert the BSTR
into the according type.
Use the COM/ActiveX library containing the class as External Class
Libryry in OpenROAD.
Hope this helps.
Regards,
Bodo.
Bodo Bergmann
Client/Server - Consulting & Training
Heinrich-von-Kleist-Str.3
64839 Muenster (b. Dieburg)
Germany
-----Original Message-----
Date: Tue, 31 Oct 2006 01:30:41 +0100
Subject: Re: [Openroad-users] StringObject in C/C++
From: "Fabian Anderson"
To: "International OpenROAD Users"
Hi Peter,
Unless the Ingres C++ Precompiler is an option for the
C++ source, I would not try to pass a stringobject unless you are
sure it is less than 2000 characters.
If the string may be more than 2000 characters, try passing a
filehandle instead or use the C++ precompiler to expose Ingres
datatypes to your C++ project.
Here a few more tips:-
If you need to have access to other stringobject attributes apart
from Value, you will need to pass them separately.
If you need to improve string performance in OpenROAD, ensure it is
always less than 32K.
Passing a longvarchar is also limited to an Ingres installation
limit (usually 4KB) without using the precompiler.
The filehandle option works well/fast with most C++ buffer
processing routines as a small memory allocation is possible.
I hope this helps.
Regards,
Fabian Anderson
Systems Analyst / Programmer
Fintechnix Pty Ltd
-------------------------
FROM: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] ON BEHALF OF Peter van
Bennekom
SENT: Tuesday, 31 October 2006 08:07
TO: OpenROAD Users
SUBJECT: [Openroad-users] StringObject in C/C++
Folks,
I want to pass a stringobject from OpenROAD to C/C++ (we have
certain specific fast c-routines) to manipulate the value. We need
to access the entire string in this routine not just the value
attribute.
How do I do this? Not very familiar with passing OpenROAD system
classes to C/C++. Any help greatly appreciated.
Thanks,
Peter
Peter van Bennekom | Senior Technical Architect | INFOR | office: +1
(610) 407-8113 | fax: +1 (610) 407-8027
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security
System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
Specialist providers of back and front office systems for the
financial services industry.
Featuring: Fintechnix(r)
Disclaimer:
Notice: This message contains privileged and confidential
information intended only for the use of the addressee named above.
If you are not the intended recipient of this message you are hereby
notified that you must not disseminate, copy or take any action in
reliance on it.
Any views expressed in this message are those of the individual
sender,except where the sender specifically states them to be the
views of Fintechnix Pty Ltd.
More information about the Openroad-users
mailing list