vfp中的c#dll,无法使用
我已经用c#编写了代码,并构建了dll。当我在vfp中创建对象时,我得到了一个错误 我在vfp中使用以下代码vfp中的c#dll,无法使用,c#,.net,visual-foxpro,C#,.net,Visual Foxpro,我已经用c#编写了代码,并构建了dll。当我在vfp中创建对象时,我得到了一个错误 我在vfp中使用以下代码 SET LIBRARY TO bt_print.tlb hh=CREATEOBJECT("bt_print.bt") 我的c#代码是 我已选中“注册COM互操作”复选框 请纠正我,我做错了什么 提前感谢。选中“使组件COM可见”-项目设置、应用程序页面、组件信息 在C#中,添加ClassInterface和ProgId using System; using System.Runtim
SET LIBRARY TO bt_print.tlb
hh=CREATEOBJECT("bt_print.bt")
我的c#代码是
我已选中“注册COM互操作”复选框
请纠正我,我做错了什么
提前感谢。选中“使组件COM可见”-项目设置、应用程序页面、组件信息
在C#中,添加ClassInterface和ProgId
using System;
using System.Runtime.InteropServices;
namespace bt_print
{
[ClassInterface(ClassInterfaceType.AutoDual)]
[ProgId("bt_print.bt")]
public class bt
{
public void search_bt()
{
}
public void sendfile(String fl)
{
}
}
}
在VFP中,使用NEWOBJECT()函数
hh = NEWOBJECT("bt_print.bt")
选中“使组件COM可见”-项目设置、应用程序页面、组件信息
在C#中,添加ClassInterface和ProgId
using System;
using System.Runtime.InteropServices;
namespace bt_print
{
[ClassInterface(ClassInterfaceType.AutoDual)]
[ProgId("bt_print.bt")]
public class bt
{
public void search_bt()
{
}
public void sendfile(String fl)
{
}
}
}
在VFP中,使用NEWOBJECT()函数
hh = NEWOBJECT("bt_print.bt")
我猜您的操作系统是64位的,这意味着因为VFP不支持也永远不会支持64位的操作系统,所以您必须强制您的应用程序是32位的应用程序。当然,如果没有错误,我们无法确认这种情况。我猜您的操作系统是64位的。这意味着因为VFP不支持也永远不会支持64位操作系统,所以您必须强制您的应用程序为32位应用程序。当然,如果没有错误,我们无法确认情况是否如此。