Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB type statement using declare statament
Message
From
11/04/1998 17:42:58
 
 
To
11/04/1998 16:50:23
Osmaro Gariando
Michelin Asia Pacific Support Center
Manila, Philippines
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00091341
Message ID:
00091345
Views:
31
>I have a VB Code that has Define Data Structure like this using VB type statement
>
...snip
>type SP_INIT
> istatus As long
> SEnv as String * 10
> Sversion as String * 5
>end type
>
...snip

function declaration:

Declare long SP_initialized in "SP_W32" STRING @ocnitdata

You must passing parameter as string

type definition:

#define SP_INIT ;
( ;
replicate( chr(0), 4) + ; && istatus as long
replicate( chr(0), 10) + ; && SEnv as String * 10
replicate( chr(0), 5) ; && Sversion as String * 5
)

local lcParam, lnResult
lcParam = SP_INIT && lcParam represent SP_INIT type

lnResult = SP_initialized( lcParam)

* ctobin( left( lcParam, 4)) as istatus
* subs( lcParam, 5, 10) as SEnv
* subs( lcParam, 15) as Sversion

Good luck !

Alexander Grigorjev.
Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform