gettingstarted
[Top] [All Lists]

Use of Declare statements

To: <gettingstarted at lists dot realsoftware dot com>
Subject: Use of Declare statements
From: Alan Jacques <alan dot jacques1 at ntlworld dot com>
Date: Mon, 27 Sep 2004 10:16:43 +0100
Delivered-to: gettingstarted at lists dot realsoftware dot com
I am new to this group but have been using Real Basic for about two years
(version 3.5.2 with Mac OS 9.1) and am reasonably familiar with it. It is
also pertinent to say that I do not know Pascal and have only a rudimentary
knowledge of C.

I have just started to look at Declare statements and I am finding it hard
going. As a preliminary I went through the chapter in Matt Neuberg's Real
Basic book and that was ok. I then downloaded the various Inside Macintosh
volumes and started to try out some of the Text utilities. I got EqualString
to work but ran into trouble with IdenticalText. This has the form:

Function IdenticalText (
            aPtr, bPtr : ptr    (pointers to first character of text string)
            alen, blen : Integer
            it12handle : handle): handle to string  manipulation resource
            Integer;

My first attempt at the declare statement was:

declare function IdenticalText lib "InterfaceLib" (aPtr as cstring,  bPtr as
cstring, aLen as integer, bLen as integer, byref it12Handle as integer) as
integer. 

This resulted in the message "Illegal entry point IdenticalText export from
InterfaceLib".

>From other results I am pretty sure that the a and b strings are correctly
defined and that the problem is the handle. I have tried without the byref,
as a string even as an osType etc with no result. Thus I have not even got
the Declare statement to work let alone use it.

I really have three questions.

First where am I going wrong with the Declare statement.

Second do I need to understand either Pascal or C to work with the Inside
Macintosh literature in this way

Third is there any other documentation available that is worth getting hold
of. 



Finally, I have the horrible feeling that all this will sound very
elementary but believe me, that is not how it appears to me. I feel as if I
am banging my head against a brick wall.



Regards

Alan Jacques

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>
  • Use of Declare statements, Alan Jacques <=