Home > Archive > Clarion > April 2004 > API's for REAL dummies
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
API's for REAL dummies
|
|
|
| Hi all,
I have read thru all the API messages but could not make sense out of
it. I know API's are difficult so tell me if i am wasting my (and
your!) time.
I want to use a third-party API. I know the DLL and did create a LIB
file of it. Then i did the normal include in the Global embed.
Module('dcx.lib')
DcxDisplayTermText(*CSTRING TermName, UNSIGNED Acquire, |
UNSIGNED TermRow, UNSIGNED TermColumn, UNSIGNED MessageAttribute,
|
UNSIGNED EraseScreen, UNSIGNED Duration, *CSTRING MessageText),
SHORT, RAW, NAME('_DcxDisplayTermText')
End
This is the C code of an example:
#include "dcx.h"
SHORT rc;
CHAR my_term[] = "SECURITY_TERMINAL";
USHORT row;
USHORT col;
USHORT attribute;
USHORT erase;
USHORT duration;
CHAR show_text[] = "Time to go home, Dean!";
/* The message "Time to go home, Dean" is shown on the */
/* security terminal at row 1 column 1 with normal attributes */
/* after clearing the screen. It is shown indefinitely. */
row = 1;
col = 1;
attribute = DCX_ATTR_NORMAL;
erase = DCX_CLEAR_SCREEN;
duration = DCX_OPERATOR_DURATION;
rc = DcxDisplayTermText(my_term, 0, row, col, attribute, erase,
duration, show_text)
How(if possible at all!) do i now use this call(DcxDisplayTermText) in
Clarion?
If i am treading where i should not, please tell and i'll try to
explore other avenues. :)
Thanx a lot
Evert
| |
| Earl R Coker 2004-04-04, 1:30 pm |
| Hi Evert,
I think I remember some sort of API "managing utility" or something along
that line being talked about on the newsgroups here... Maybe someone will
chime in and let us know what is was and where it is available.
--
Best Regards,
Earl R Coker
ksasales AT machlink DOT com
kwiksys AT kwiksystems DOT net
www.kwiksystems.net
www.kwiksystems.com
www.kwiksystems.com/clarion.htm (BigTamer(tm) Templates)
"Evert" <tracewarehouse@eu.dole.com> wrote in message
news:2274f933.0404040033.2c3a8ccc@posting.google.com...
> Hi all,
> I have read thru all the API messages but could not make sense out of
> it. I know API's are difficult so tell me if i am wasting my (and
> your!) time.
> I want to use a third-party API. I know the DLL and did create a LIB
> file of it. Then i did the normal include in the Global embed.
> Module('dcx.lib')
> DcxDisplayTermText(*CSTRING TermName, UNSIGNED Acquire, |
> UNSIGNED TermRow, UNSIGNED TermColumn, UNSIGNED MessageAttribute,
> |
> UNSIGNED EraseScreen, UNSIGNED Duration, *CSTRING MessageText),
> SHORT, RAW, NAME('_DcxDisplayTermText')
> End
>
> This is the C code of an example:
> #include "dcx.h"
> SHORT rc;
> CHAR my_term[] = "SECURITY_TERMINAL";
> USHORT row;
> USHORT col;
> USHORT attribute;
> USHORT erase;
> USHORT duration;
> CHAR show_text[] = "Time to go home, Dean!";
> /* The message "Time to go home, Dean" is shown on the */
> /* security terminal at row 1 column 1 with normal attributes */
> /* after clearing the screen. It is shown indefinitely. */
> row = 1;
> col = 1;
> attribute = DCX_ATTR_NORMAL;
> erase = DCX_CLEAR_SCREEN;
> duration = DCX_OPERATOR_DURATION;
> rc = DcxDisplayTermText(my_term, 0, row, col, attribute, erase,
> duration, show_text)
>
> How(if possible at all!) do i now use this call(DcxDisplayTermText) in
> Clarion?
> If i am treading where i should not, please tell and i'll try to
> explore other avenues. :)
> Thanx a lot
> Evert
| |
| menno.de.ruiter@wanadoo.nl 2004-04-04, 6:30 pm |
| www.clarionmag.com
lot's of examples !!
a waist of time if you starting only knowing little of it..because
API's and Clarion go very well together
:-)
tracewarehouse@eu.dole.com (Evert) wrote in message news:<2274f933.0404040033.2c3a8ccc@posting.google.com>...
> Hi all,
> I have read thru all the API messages but could not make sense out of
> it. I know API's are difficult so tell me if i am wasting my (and
> your!) time.
> I want to use a third-party API. I know the DLL and did create a LIB
> file of it. Then i did the normal include in the Global embed.
> Module('dcx.lib')
> DcxDisplayTermText(*CSTRING TermName, UNSIGNED Acquire, |
> UNSIGNED TermRow, UNSIGNED TermColumn, UNSIGNED MessageAttribute,
> |
> UNSIGNED EraseScreen, UNSIGNED Duration, *CSTRING MessageText),
> SHORT, RAW, NAME('_DcxDisplayTermText')
> End
>
> This is the C code of an example:
> #include "dcx.h"
> SHORT rc;
> CHAR my_term[] = "SECURITY_TERMINAL";
> USHORT row;
> USHORT col;
> USHORT attribute;
> USHORT erase;
> USHORT duration;
> CHAR show_text[] = "Time to go home, Dean!";
> /* The message "Time to go home, Dean" is shown on the */
> /* security terminal at row 1 column 1 with normal attributes */
> /* after clearing the screen. It is shown indefinitely. */
> row = 1;
> col = 1;
> attribute = DCX_ATTR_NORMAL;
> erase = DCX_CLEAR_SCREEN;
> duration = DCX_OPERATOR_DURATION;
> rc = DcxDisplayTermText(my_term, 0, row, col, attribute, erase,
> duration, show_text)
>
> How(if possible at all!) do i now use this call(DcxDisplayTermText) in
> Clarion?
> If i am treading where i should not, please tell and i'll try to
> explore other avenues. :)
> Thanx a lot
> Evert
| |
| Jason Berkan 2004-04-05, 4:30 pm |
| On 4 Apr 2004 00:33:38 -0800, tracewarehouse@eu.dole.com (Evert)
wrote:
>I want to use a third-party API. I know the DLL and did create a LIB
>file of it. Then i did the normal include in the Global embed.
>Module('dcx.lib')
> DcxDisplayTermText(*CSTRING TermName, UNSIGNED Acquire, |
> UNSIGNED TermRow, UNSIGNED TermColumn, UNSIGNED MessageAttribute,
>|
> UNSIGNED EraseScreen, UNSIGNED Duration, *CSTRING MessageText),
>SHORT, RAW, NAME('_DcxDisplayTermText')
> End
You didn't specify PASCAL or C (the calling convention). A good first
guess is C. You'll know you are wrong when you get a GPF after
calling the function.
>USHORT row;
USHORT = USHORT, not UNSIGNED (which is USHORT if you are compiling
16-bit and ULONG if you are compiling 32-bit).
DcxDisplayTermText(*CSTRING, USHORT, USHORT, USHORT, USHORT, USHORT,
USHORT, *CSTRING),SHORT,RAW,C,NAME('_DcxDisplayT
ermText')
Jason
| |
|
| Hi...
Thanx Jason! Works like a charm!
Cheers
Evert
Jason Berkan <jason_berkan@canada.com> wrote in message news:<duc370pq7tlvolo4fh1erukc9ekkgfvn03@4ax.com>...
> On 4 Apr 2004 00:33:38 -0800, tracewarehouse@eu.dole.com (Evert)
> wrote:
>
> You didn't specify PASCAL or C (the calling convention). A good first
> guess is C. You'll know you are wrong when you get a GPF after
> calling the function.
>
>
> USHORT = USHORT, not UNSIGNED (which is USHORT if you are compiling
> 16-bit and ULONG if you are compiling 32-bit).
>
> DcxDisplayTermText(*CSTRING, USHORT, USHORT, USHORT, USHORT, USHORT,
> USHORT, *CSTRING),SHORT,RAW,C,NAME('_DcxDisplayT
ermText')
>
> Jason
|
|
|
|
|