-1

Based on the challenge I asked on this forum through the link Consuming .NET dll in VB6 application I was successfully able to consume my .NET dll within VB6 by registering the dll and it's .tlb files, referencing the tlb file within my application and using the code below:

Dim dObject as new DllName.ClassName
dObject.MethodName(filename)

The issue is I want to be able to use the code below

Declare Sub MethodNameLib "DllName" (ByVal ff As String) 
MethodName(filename)

However, I get the error "Run-time error 453: Cannot find dll entry-point. Please could any help as this is urgent?

4

2 回答 2

1

请检查 Microsoft 链接,它将告诉您如何开发一个 Dot Net DLL,它将与 COM Objects(VB6) 一起使用 链接

和其他一些解决方案在这里链接

于 2012-09-18T09:22:05.170 回答
1

您不能使用Declare ...调用 COM(或 .NET/COM 互操作)库。Dim Obj As LibName.ClassName这些需要使用等来创建。

如果要使用,Declare ...则需要查看使用 StdCall 在导出表中公开 .NET DLL 中的各个方法。

于 2012-09-18T09:50:07.763 回答