Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameters data type declaration for calling an Active X
Message
From
03/02/2002 10:24:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Parameters data type declaration for calling an Active X
Miscellaneous
Thread ID:
00614540
Message ID:
00614540
Views:
74
Hi there

I dropped an ActiveX on a form. It's a driver for a USB data acquisition board.
I see its methods in properties window. When I go in the code of its methods I see only something like:

*** ActiveX Control Method ***
LPARAMETERS dllversion, ocxversion

--------
So, I do not see the code. I suppose it's normal. (Is it?) But, When I use it I get 'type mismatch' error. Is there a way in VFP to declare the vars with proper type before using them as parameters? (i.e. word, long, unsigned long, float, string, etc.)

Here is an exemple of the available methods:
_________________________________________________
In the documentation we read:

Uses a Windows API function to get the OS version.
Declaration:
long __cdecl GetWinVersion ( unsigned long *majorVersion,
unsigned long *minorVersion,
unsigned long *buildNumber,
unsigned long *platformID,
unsigned long *servicePackMajor,
unsigned long *servicePackMinor )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
_________________________________________________
In the method we see:

*** ActiveX Control Method ***
LPARAMETERS majorversion, minorversion, buildnumber, platformid, servicepackmajor, servicepackminor

(and no other code lines)
_________________________________________________
I do it in the command window:

loWinVer=1000000 *I suppose that that way a long will be declared
loMajVer=1000000 * same thing for the other vars
loMinVer=1000000
loBuiltNum=1000000
loPlatID=1000000
loSPmaj=1000000
loSPmin=1000000

loWinVer=Form1.LJ.GetWinVersionX(@loMajVer,@loMinVer,@loBuiltNum,@loPlatID,@loSPmaj,@loSPmin)

__________________________________________________
I get a Type mismatch.
Can anybody help on that?

Thanks
MarcT
Marc Tétreault (pronounced Tatro, a like in way)
Next
Reply
Map
View

Click here to load this message in the networking platform