小编Jon*_*tes的帖子

如何将数组/列表/对象集合从C#返回到VB6

我正在创建一个COM Visible C#对象来代理对VB6应用程序的Web服务的调用.我有一个返回对象数组的方法.

public DocActionReport[] DocActionReportByDateRange(System.DateTime reportStartDate, System.DateTime reportEndDate)
    {
        object[] results = this.Invoke("DocActionReportByDateRange", new object[] {
                    reportStartDate,
                    reportEndDate});
        return ((DocActionReport[])(results[0]));
    }
Run Code Online (Sandbox Code Playgroud)

当我通过VB6调用此方法时,如下所示:

Dim proxy As New QueueMovementServiceClient.ReadQueueInfo
Dim report() As QueueMovementServiceClient.DocActionReport

report = proxy.DocActionReportByDateRange(startDate, reportEndDate)
Run Code Online (Sandbox Code Playgroud)

它成功执行(我可以看到通过登录Web服务)但没有数据返回到VB6中的对象(LBound(报告)== 0,UBound(报告)== -1).

我尝试了几种不同的方法(将方法更改为void方法并将集合作为ref参数传递)但到目前为止没有任何乐趣.

我需要做什么才能将对象数组(列表,集合等)返回给VB6使用者?

arrays vb6 com-interop

11
推荐指数
1
解决办法
3107
查看次数

IIS中的<authentication mode ="windows">有什么影响?

我想知道<authentication mode="windows">在web.config 中设置的效果是在不同版本的IIS中.

我相信在IIS 5中,它几乎没有效果,因为所有这些都是由Web服务器集成和控制的.

在IIS 6和7上,我相信我可以将Web服务器设置为匿名访问,然后每个托管的Web应用程序可以通过设置模式来确定是否要使用Windows身份验证.也就是说,web.config控制这些IIS版本中的ASP.NET并覆盖服务器.

我正在寻找一份白皮书或某种类型的参考资料,这将不仅仅是我的观察经验

iis-7 iis-6 web-config iis-5 windows-authentication

6
推荐指数
1
解决办法
5953
查看次数