473,411 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

passing strings to ole com server

i need to create a com server dll from some vfp code

i have sucessufly compiled and run one example i found

i am having a problem adapting this to my needs.

basically, i have one function i am calling which needs a string as a prameter
it then does some processing and returns another string

vb.net code
Dim cString As String = ""
cString = oScanData.ValidateShipID(UserInput)

vfp code
PROCEDURE ValidateShipID() AS String

everything shows up fine in the editor, yet the com server thows an datatype
mismatch error and in debuging it thinks its getting a logical value

what is wrong with my calling code?
Apr 6 '07 #1
2 1010
got it...

vfp code was:
PROCEDURE ValidateShipID() AS String
lparameters ShipID

changed to...
PROCEDURE ValidateShipID(ShipID as String) AS String

and it works

continuing to get a .net mindset....

clue now = .02

Apr 6 '07 #2
On Apr 6, 6:20 am, Brad <B...@discussions.microsoft.comwrote:
i need to create a com server dll from some vfp code

i have sucessufly compiled and run one example i found

i am having a problem adapting this to my needs.

basically, i have one function i am calling which needs a string as a prameter
it then does some processing and returns another string

vb.net code
Dim cString As String = ""
cString = oScanData.ValidateShipID(UserInput)

vfp code
PROCEDURE ValidateShipID() AS String
your vfp procedure returns a string - but, it doesn't appear to take
one. If that isn't a typo - then I believe you need to modify your
vfp procedure to take a string (i don't know vfp - so, I can't really
help there :)

--
Tom Shelton

Apr 6 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: harry | last post by:
I have 2 multi-dim arrays double subTotals = null; String rowTitles = null; I want to pass them to a function that initialises & populates them like so - loadData( rowTitles, subTotals);
2
by: muser | last post by:
How can I pass the parameter " long part_num, into a case statement. Case statement follows the function CheckDigit. i.e. CheckDigit( something, temp1 ); Thank you for your help in advance. ...
5
by: Jack | last post by:
Hi, I need to pass multple variables in a link in order to go to a asp page with the two varables. The following are the values of the variables using response.write: <%'Response.Write Mypage...
3
by: Mark | last post by:
Hi From what I understand, you can pass arrays from classic ASP to .NET using interop, but you have to change the type of the.NET parameter to object. This seems to be because classic ASP passes...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
9
by: laurenq uantrell | last post by:
I've gotten sort of fed up with dealing with regional date settings on the client side and am considering the following scheme - just wondering if anyone has a negative view of it or not: ...
61
by: academic | last post by:
When I declare a reference variable I initialize it to Nothing. Now I'm wondering if that best for String variables - is "" better? With Nothing I assume no memory is set aside nor GC'ed But...
7
by: Smokey Grindle | last post by:
For a website that has users logged into it using sessions, its it best to pass data between pages in session variables or through query strings?
6
by: Andy Baker | last post by:
I am attempting to write a .NET wrapper for a C++ DLL file, but am having problems with passing strings as parameters. How should I be writing my C# function call when the C header file is...
4
by: arnuld | last post by:
I am passing an array of struct to a function to print its value. First I am getting Segfaults and weired values. 2nd, is there any elegant way to do this ? /* Learning how to use an array...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.