Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting COM to ASP.NET
Message
From
24/08/2006 11:52:17
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Converting COM to ASP.NET
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01148253
Message ID:
01148253
Views:
61
I have a VFP function called from a ASP page via. a .dll COM object. The function returns an object from which property values are extracted and displayed on the page.

The web-application is in the process of being converted to ASP.net, and from my reading so far I understand that the function and parameter declarations must be strongly typed, eg. FUNCTION MyFunction(param1 AS String, param2 AS Integer) AS object. I also gather there are difficulties in ASP.net using an object returned by the function, and is easier to use a XML string instead. To this end I would like to change the function declaration to FUNCTION MyFunction AS object/string, depending on the application it is called from. The only way I can think of doing this is to have something like...

lcType = IIF(lcApp='net',[string],[object])
FUNCTION MyFunction AS &lcType

but even if this works in VFP (which doesn't enforce strong typing rules), I have severe doubts that this will work at runtime because the function and its type is already compiled into the .dll.

Can anyone advise me on this, or do I have to resign myself to having two separate functions? Are there any other things I need to look out for?

Any help would be appreciated.

Alan
Next
Reply
Map
View

Click here to load this message in the networking platform