Alan,
Check Rick's articles at
http://west-wind.com/Articles.asp, in particular
Calling VFP COM components from .Net>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?
>
--sb--