Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Shawn Ottinger
  Where is Shawn Ottinger?
 Greeneville TN
 Tennessee - United States
 Shawn Ottinger
Subject: Calling object with pass by reference
Thread ID: 21741 Message ID: 21741 # Views: 7 # Ratings: 0
Version: Visual FoxPro 6 Category: Active X Controls & OLE Automation
Date: Monday, March 31, 2003 11:55:26 PM         

I am having a problem with an OLE object I am using. This is a Data aquisition object from National instruments.
Here is the problem. There is a function that is object.singleread. This function accepts a parameterby reference. By reading it looks like it is a long. There is an example of what I want to do but it is in VB. When I run the equivelent code in fox I get an error "type mismatch". I have tried to use the @ operator but it does not work.

Here is the VB Code
Dim Data As Variant
CWAIPoint1.SingleRead Data

I have used both
data = 0
CWAIPoint1.SingleRead (Data)
data = 0
CWAIPoint1.SingleRead (@Data)

I get the same results either way. Can anyone tell me why or help.


Calling object with pass by reference Posted by Shawn Ottinger @ 3/31/2003 11:55:26 PM
RE: Calling object with pass by reference Posted by Yuri Rubinov @ 4/1/2003 9:11:14 PM