If you understand how a stored procedure is established, you have a grasp of how to utilize STDCALL and DLCALL. The STDCALL keyword is the insertion of the particular custom DLL or Windows API DLL into the address space of the RBase session.

The particulars of how to establish a declaration using STDCALL is pretty well explained in the helpfile, with a couple of important points.

The parameter order (if any) of a function or procedure when using STDCALL is reversed from the order of the DLL. This is just the way it is implemented because of the way variables are sequenced in memory of the original DLL.

When using TEXT or VARCHAR datatypes, always use the PTR modifieer. PTR is shorthand for POINTER, which just means that the RBase variable that is passed is passed By Reference (it's memory address) and not By Value (not another variable with the value assigned from the original).

After the declaration is made, the Function or Procedure is available in the RBase session with the same speed as any RBase native function. This was light years better than the old UDF, because with UDF each time you called a function in a DLL, the DLL had to be LOADED into memory, then the function was called and then the DLL was released from memory, so you can imagine the performance hit if you used a UDF in a Select statement with a very lengthy rowset, but with DLCall, you get the same performance as native functions.

This really looks more forboding than it is. If someone had presented you with all the property commands and nuances of the Latest and Greatest back when you were running 6.5, you would have likely thought you would never get the hang of it, but since you were slowly indoctrinated into the current paradigm, it seems like second nature to you, as would the utilization of these advanced features once you start using them.



----- Original Message ----- From: "Javier Valencia" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Wednesday, April 28, 2010 9:29 PM
Subject: [RBASE-L] - RE: STDCALL Declarations for any APIs (was Re: ON CONNECT)


The DLCALL help in 7.6 is the same as the 2 FTE articles. I was hoping there
was something more along the lines of DLCALL for dummies...er...I mean
beginners. LOL.

Javier,

Javier Valencia, PE
913-829-0888 Office
913-915-3137 Cell
913-649-2904 Fax
[email protected]


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mike Byerley
Sent: Wednesday, April 28, 2010 1:27 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: STDCALL Declarations for any APIs (was Re: ON
CONNECT)

In 7.6 / 9.0 help file, lookup DLCall. There is pretty extensive help and
examples there to lay the groundwork.

----- Original Message ----- From: "Javier Valencia" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Wednesday, April 28, 2010 12:25 PM
Subject: [RBASE-L] - RE: STDCALL Declarations for any APIs (was Re: ON
CONNECT)


R:azzak,

Other than the two FTE DLCALL articles, is there any additional
information
on the STDCALL implementation? Inquiring minds want to know...

Javier,

Javier Valencia, PE
913-829-0888 Office
913-915-3137 Cell
913-649-2904 Fax
[email protected]


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak
Memon
Sent: Wednesday, April 28, 2010 10:12 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - STDCALL Declarations for any APIs (was Re: ON
CONNECT)

At 01:45 PM 4/27/2010, Mike Byerley wrote:

In the RUN SELECT, I can set all the Global Vars and in the
latest and greatest, I can set all the STDCALL declarations
for any APIs I want to run in the session.


Latest and greatest : R:BASE eXtreme 9.0 (32/64)

www.rbaseextreme.com

May you all enjoy and benefit from the implementation of
STDCALL declarations for any APIs and more ...

The best is yet to come!

Very Best R:egards,

Razzak.

P.S.

Implementation of STDCALL declarations is the brain child
of Mike Byerley (member of R:BASE Consulting Group) and
Alex Ageev (member of R:Dream Team).






Reply via email to