AnsiStrings in 3rd party VCL's???

Hi all,

I've been using a 3rd-party VCL called NativeXML.  Its a really good, fast 
and solid XML parser.  Unfortunately, the author has suffered a serious 
accident and has not been able to update or support the package.  Therefore 
it doesn't work, as is, in BDS 2009.

It is written in Delphi and uses the standard string data type.  When this 
is compiled in BDS 2009 it does work because the string defaults from 
AnsiString to UnicodeString.  However, in my particular situation, I do not 
need Unicode support because I have a wrapper class that can interface 
between the Ansi XML parser and my Unicode system.

With this in mind, one of the other users of this parser has attempted to 
convert over the authors code so that it will work in an Ansi mode in BDS 
2009.  He has successfully done this in Delphi 2009 and I am trying to do 
the same thing in BCB 2009.  I have his modified source code which I have 
added to a new package and tried to build / install.

However, I getting lots of DCC compile errors stating "Undeclared 
Identifier: 'AnsiStrings'", for example:

Offset := AnsiStrings.AnsiPos('&', SearchStr);

Can anyone point me in the right direction to enable / enforce this 
namespace in his Delphi source?

Hope this makes sense,

Mike C
0
Mike
4/6/2009 1:31:40 AM
embarcadero.cppbuilder.using 1848 articles. 1 followers. Follow

4 Replies
738 Views

Similar Articles

[PageSpeed] 41

"Mike Collins" <its@TheBottomOfThePost> wrote in message 
news:101767@forums.codegear.com...

> However, I getting lots of DCC compile errors stating "Undeclared 
> Identifier: 'AnsiStrings'", for example:
>
> Offset := AnsiStrings.AnsiPos('&', SearchStr);

"AnsiStrings" is a new VCL unit in 2009.  It contains the legacy Ansi-based 
string functions.  In Delphi, "AnsiStrings" needs to be declared in the 
calling unit's "uses" clause, ie:

{code:delphi}
uses
    AnsiStrings;

Offset := AnsiStrings.AnsiPos('&', SearchStr);
{code}

In C++, you need to include the AnsiStrings.hpp header file, and then use 
the "Ansistrings" namespace, ie:

{code:cpp}
#include <AnsiStrings.hpp>

Offset = Ansistrings::AnsiPos("&", SearchStr);
{code}

-- 
Remy Lebeau (TeamB)
0
Remy
4/6/2009 5:15:28 PM
Cheers Remy.

Its really weird because the guy who did this conversation seems to think 
that the code works, as is, for him.

I add in the AnsiStrings to the uses section but then it throws errors 
complaining about Windows not being defined.  I add that in and again I get 
a whole host more errors.  I'm thinking maybe I'm going to have to do this 
conversation manually myself :-(

Thanks again,

Mike C

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:101956@forums.codegear.com...
> "Mike Collins" <its@TheBottomOfThePost> wrote in message
0
Mike
4/6/2009 6:20:46 PM
"Mike Collins" <its@TheBottomOfThePost> wrote in message 
news:101988@forums.codegear.com...

> I add in the AnsiStrings to the uses section but then it throws
> errors complaining about Windows not being defined.
> I add that in and again I get a whole host more errors.

Such as?

-- 
Remy Lebeau (TeamB)
0
Remy
4/6/2009 10:33:11 PM
Actually Remy,

I think I'm wasting your time.  I looked closer at the errors ( to be honest 
I was being lazy and as soon as I saw all the errors I switched off ) it is 
because the forward definitions for the functions are different to the 
actually functions.

The guy who did the conversion didn't want to risk breaching any licensing 
so he didn't publish his complete port - instead he made a patch file.  I 
applied the patch and it obviously didn't make all the necessary changes.  I 
have since e-mailed him and he has sent me his copy - which appears to have 
all the necessary *uses* defined.  I'm going to look at this closer - if I 
run into any more problems I will post back.

Many thanks again

Mike C

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
0
Mike
4/7/2009 12:36:31 AM
Reply:

Similar Artilces:

how to use mailto: in 3rd party app that let's TB use attachments.
Name: Shawn Email: shawndotcummingsatgmail.com Product: Firefox Summary: how to use mailto: in 3rd party app that let's TB use attachments. Comments: mailto: works great with thunderbird - but I can't seem to get thunderbird to parse our the attach/attachment tags in the protocol. Any thoughts? or is it not supported? Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 ...

who's using 3rd party graphs?
Hi all I've come to the point where PB graphs just can't deliver the ability and/or polish the clients expect(pie chart specifically). So, I've been doing some Googling on what's out there but would really appreciate any feedback on what controls(activex) are beings used by you and any pros and cons associated with them TIA Hello GW, i have the same problem. You should consult the article made by Bruce Armstrong called "Using Visual .NET Components", dated 8th October. I still have some fear of implementing this kind of solution, as i ...

Where's the page of useful 3rd party stuff?
Hi all The changes to the site are nice, but did something fall through the cracks? Where's the page that has all of the links to Steve's favorite 3rd party apps (like the Vault and TClock), and the links to Assem tools and tuts? It's probably right under my nose. I've looked around, but I haven't seen it. I think the site would benefit greatly from an overall site map and a search function. I always have a little trouble finding just the article that I'm looking for. Thanks Dear Miss Understanding, > The changes to the site are nice, but d...

What's using each CPU
Hi, I have a NW65SP7 server running with a single quad core processor, and 8GB of RAM. If I go into NRM and choose "Profiling and Debug Information", and click on "Execution Profiling by NLM", the list is empty? I was guessing this would show me which threads or processes are using which CPU's. I can see in the health monitor and then clicking on each of the 4 CPU's that they are all being used, but I was curious what NLM's are using which and perhaps an average usage stat. Is there a simple way to accomplish this? Also if I go to "View...

Problem running local Functions that use 3rd party DLL's
Hello, We recently received an evaluation copy of video editing software from a vendor and I'm having fits trying to access even the simplest functions. The DLL's were written in C++. Initially we received an error attempting to open the DLL and resolved that quickly. Now no matter what function or DLL we use we get the following error: System Error Error Number: 15 Error Message: Error calling external function DetectKey This is followed by Error Number 21 Error Message: Bad runtime function reference And then the application crashes. The local...

Re: [perl #112916] please enhance 'use' and "use parent" to use 'base's modfind ability
Hello, as the author of parent.pm, I think that some historical context will be beneficial. Most of this can be found by using Google or another search engine with the appropriate search terms. Please read these links to familiarize yourself with the reasons why base.pm is as it is, and why parent.pm exists: http://www.nntp.perl.org/group/perl.perl5.porters/2007/07/msg127273.html Also, a short description of some situations where base.pm fails to load a file when you touch a namespace in the wrong place: http://perlmonks.org/?node_id=738152 I also gave a talk at the Ge...

What's useful and what's fluff?
I've started reading ASP.Net Unleashed and the first chapter deals w/ ASP.Net Controls (e.g.: button, label, input, etc). As I read, it got me wondering about where to best focus my attention during my migration to ASP.Net. One of the things I've experienced over the years is that development languages, especially those tied to any visual RAD interface, tend to include a bunch of "neato" type features and controls that aren't used in day to day development. Most of the time, its because these "features" are actually quite constraining and add little to no value. I'm...

[PATCH] When using a GitHub fork advice the use of Perl's Git, not GitHub's mirror
This bit me when `git pull upstream blead' didn't pull commits I knew had been commited, turned out GitHub's mirror was out of date. --- pod/perlrepository.pod | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pod/perlrepository.pod b/pod/perlrepository.pod index 9b0292b..30d2cc2 100644 --- a/pod/perlrepository.pod +++ b/pod/perlrepository.pod @@ -725,7 +725,7 @@ you should clone: The same patch as above, using github might look like this: % cd perl-github - % git remote add upstream git://github.com/github/perl.git + % git remote add...

multiple SMTP's and different IP's, domain names to send email from this server using different SMTP's
Is anybody can help me with this 2 issues we have: 1. We need to have multiple SMTP's installed on our server - how do you do that 2. We need to rotate different IP's, domain names to send email from this server using different SMTP's          Thanks   Third party mail server.  Look at Smartermail or iMail, Exchange if you need that much. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue. Is this only option? &n...

Using 3rd party control over network generates 'System.Web.AspNetHostingPermission' error
Hi, all. I've seen this error before and have had to move the code to LOCALHOST to get around it,Error    9    Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.    \\myserver\www-sec\housing_dep\Default.aspx    48    I've got the web site open in VS 2005 via the network. Whenever I add a 3rd party component, Visual Studio starts having with this error. I've looked into setting the permissions, but don't k...

why CSK's Admin Module didn't use CSK'S skin and SkinnedCommunityControl .
For example: EditUsers admin module is made by 3 .aspx "Default.aspx, EditRoles.aspx, EditUser.aspx" it did not divide to skin and SkinnedCommunityControl . Did the author think it 's too complex to write in this way? Why would you need the admin section to be themed? It isn't a user area of the site so there is little reason to have it skinnable on a per-community basis. Also, the admin tools do not require any of the standard controls used in the regular content areas of the site, so there was little incentive to use the theme design pattern on them. It would ...

superreview cancelled: [Bug 292464] event listeners added using addEventListener() listen only trusted events : [Attachment 182447] Use the document's principals to check whether it's chrome or not.
Johnny Stenback <jst@mozilla.org> has cancelled Johnny Stenback <jst@mozilla.org>'s request for superreview: Bug 292464: event listeners added using addEventListener() listen only trusted events https://bugzilla.mozilla.org/show_bug.cgi?id=292464 Attachment 182447: Use the document's principals to check whether it's chrome or not. https://bugzilla.mozilla.org/attachment.cgi?id=182447&action=edit ...

Using dddw's on html dw's
I've posted this to the powerbuilder.datawindow forum but was not quite sure if that was the correct forum. Here's the problem: I've created an html dw that uses 2 dddw's. It is invoked by the passing of 2 arguments that are passed when then user signs on to the system. These arguments are captured in the DynaScript of the html page via the session variable. Here are the questions: (1) How do I pass the initial arguments - company # and user # - to the primary dddw so that only those records on the table that the dddw is using are available and (2) when the use...

superreview requested: [Bug 292464] event listeners added using addEventListener() listen only trusted events : [Attachment 182447] Use the document's principals to check whether it's chrome or not.
Johnny Stenback <jst@mozilla.org> has asked Peter Van der Beken <peterv@propagandism.org> for superreview: Bug 292464: event listeners added using addEventListener() listen only trusted events https://bugzilla.mozilla.org/show_bug.cgi?id=292464 Attachment 182447: Use the document's principals to check whether it's chrome or not. https://bugzilla.mozilla.org/attachment.cgi?id=182447&action=edit ...

Web resources about - AnsiStrings in 3rd party VCL's??? - embarcadero.cppbuilder.using

Resources last updated: 1/11/2016 8:49:05 AM