Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a COM
Message
 
To
03/02/2002 05:11:23
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00614431
Message ID:
00614531
Views:
28
Michael,
If you're not already doing so, you should use Application.ServerName to establish where your files and paths are. This is the most reliable way to do this for COM servers. For example, you could do this in your Init method:

THIS.cAppStartPath = JustPath(Application.ServerName)+"\"
SET DEFA TO THIS.cappstartpath+'data\'+THIS.cAppName+'\'
THIS.cHTMLpath=THIS.cappstartpath+THIS.cAppName+'\HTML\'

Also, you should always use ComReturnError in your Error method...

>David. Thank you for your reply. I have inserted the code calling the COM and it is working but has a bug. I get the following errors:
>
>1) Invlid path or filename
>2) OLE error code 0x80080005 : Server execution failed
>
>Could the first problem of
>
> "Error locating config file-bad path"
>
>be causing this problem.
>
>The startup programs I am running are firewall type software. I am not sure that is the problem. I did uninstall Visual Studio and then re-install it on a different hard drive. Since doing this, the error message is displayed everytime I run VFP. I considered the possibility of a rogue INI file having an influence on the system. I have looked around, but found nothing. I have also checked the file locations in the setting of the IDE. Nothing seems out of order there. Any other ideas?
>
>Michael
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform