Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# COM Intertop Not Right With VFP?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
C# COM Intertop Not Right With VFP?
Miscellaneous
Thread ID:
00651339
Message ID:
00651339
Views:
108
Take this code and save it as str.cs :
using System;

public class T
{
public string A(string s)
{
return s+" from C#";
}
} 
Take this code and save it as strmake.cmd:
csc /t:library str.cs
tlbexp str.dll /out:str.tlb
regasm str.dll 
Copy str.dll and str.tlb into c:\winnt\system32. Take this code and save it as str.vbs:
	Set o = CreateObject("T")
	MsgBox o.A("Hello"), , "VBS test"
If you run the .vbs, it runs fine. But in VFP7/SP1, if you just do a CreateObject(), you get "OLE error code 0x80131522: Unknown COM status code".

What happened?

Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform