Date: Fri, 9 Jun 2000 07:24:42 GMT
Reply-To: autretx@MY-DEJA.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: autretx@MY-DEJA.COM
Organization: Deja.com - Before you buy.
Subject: Re: API call to VB routine?
Well there's (perhaps?!) a way to find
arguments:
for example:
data _NULL_;
rc=modulen('*i',"keybd_event", 44, 1, 0, 0);
run;
will show a more detailed log like this:
SAS log:
7 data _NULL_;
8 rc=modulen('*i',"keybd_event", 44, 1, 0,
0);
9 run;
---PARM LIST FOR MODULEN ROUTINE---
CHR PARM 1 021B0124 2A69 (*i)
CHR PARM 2 021B0118 6B657962645F6576656E74
(keybd_event)
NUM PARM 3 021B0108 0000000000004640
NUM PARM 4 021B00E8 000000000000F03F
NUM PARM 5 021B00E0 0000000000000000
NUM PARM 6 021B00E0 0000000000000000
---ROUTINE keybd_event LOADED AT ADDRESS
BFF6108E (PARMLIST AT 025F33A0)---
PARM 1 2C000000 <CALL-BY-VALUE>
PARM 2 01000000 <CALL-BY-VALUE>
PARM 3 00000000 <CALL-BY-VALUE>
PARM 4 00000000 <CALL-BY-VALUE>
---VALUES UPON RETURN FROM keybd_event ROUTINE---
PARM 1 2C000000 <CALL-BY-VALUE>
PARM 2 01000000 <CALL-BY-VALUE>
PARM 3 00000000 <CALL-BY-VALUE>
PARM 4 00000000 <CALL-BY-VALUE>
---VALUES UPON RETURN FROM MODULEN ROUTINE---
NUM PARM 3 021B0108 0000000000004640
NUM PARM 4 021B00E8 000000000000F03F
NUM PARM 5 021B00E0 0000000000000000
NUM PARM 6 021B00E0 0000000000000000
NOTE: The DATA statement used 0.27 seconds.
or perhaps use 'quickview' in your explorer.
In article <393F72CD.18AA@vyh.fi>,
Arjen.Raateland@vyh.fi wrote:
> I need to call a function from an external DLL
that has been written in
> Visual Basic 6.0 by somebody else.
>
> SAS' documentation doesn't give details about
formats to be used with
> Visual Basic routines. The types of arguments
used are: String, Integer
> & Double. No string length given in the DLL
doc's. The last argument is
> optional. The function returns an Integer.
>
> Would anybody here have any information about
suitable formats?
>
> I've written the following tentative attribute
table, in which some
> attributes may be wrong because of a lack of
information/documentation.
>
> routine transformone
> minarg=7
> maxarg=8
> callseq=byaddr
> stackorder=R2L
> stackpop=called
> arch=BIT32
> module=env_Global_Komu * DLL module
must be found in PATH ;
> returns=ushort * Type of value
returned by DLL routine ;
> ;
> arg 1 char input format=$cstr20. ;
> arg 2 char input format=$cstr20. ;
> arg 3 num input format=pib4. ;
> arg 4 num output format=rb8. ;
> arg 5 num output format=rb8. ;
> arg 6 num input format=rb8. ;
> arg 7 num input format=rb8. ;
> arg 8 num input format=rb8. notreqd ;
>
> Another problem is where to place the DLL. It
needs to be in a directory
> listed in the environment variable PATH. SAS
documentation doesn't say
> whether SAS or Windows environment variable.
IMO, it would be safer to
> manipulate the user's SAS environment variable
PATH instead of the
> Windows environment variable, but would it work?
>
> BTW, the purpose of the API call is to convert
a pair of map coordinates
> from a (Finnish) national grid system to
European Datum 1950
> geographical coordinates.
>
> Any help is greatly appreciated,
> --
> Arjen Raateland
> Finnish Environment Institute
> SAS Support
> phone +358 9 4030 0350
>
Sent via Deja.com http://www.deja.com/
Before you buy.
|