Is it possible, I have a dll i create it in c#, can i call this dll in vbscript or asp and if possible how?
Loading
Is it possible, I have a dll i create it in c#, can i call this dll in vbscript or asp and if possible how?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
richard limPosted Jun 20, 2007, 11:53 PM
I already read your article it helps, i already registered my dll in my computer maybe the problem is in the server maybe what i need to do is to remotely registered it in the server any idea.
Thank you very much.
Mike GoldPosted Jun 20, 2007, 11:42 PM
richard limPosted Jun 20, 2007, 10:23 PM
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/xotrack_testsite/polo4050/mytest/testme.asp, line 11
800401f3
Above is the error in my internet explorer below is my c# dll code kindly check pls. tnx.
using System;
using System.Collections.Generic;
using System.Text;
using System.EnterpriseServices;
using System.Runtime.InteropServices;
[assembly: ApplicationAccessControl(true)]
namespace clsFunc
{
[Guid("5C63A021-EDEF-4044-B9DE-93036C5FCDD9")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface iInterface
{
[DispId(1)]
int PerformAddition(int a, int b);
int PerformSubtraction(int a, int b);
}
[ProgId("clsFunc.Class1")]
[ClassInterface(ClassInterfaceType.None)]
public class Class1 : ServicedComponent, iInterface
{
public int PerformAddition(int a, int b)
{
try
{
return a + b;
}
catch
{
return 0;
}
}
public int PerformSubtraction(int a, int b)
{
try
{
return a - b;
}
catch
{
return 0;
}
}
}
}
Mike GoldPosted Jun 20, 2007, 3:11 PM
Best,
richard limPosted Jun 5, 2007, 6:00 AM
My c# dll name is clsFunc.dll
No display in my page what seems to be the error?
coreyPosted Jun 4, 2007, 12:21 AM
reference...
using
System.Runtime.InteropServices;//after the namepace name
[ComVisible(true), ProgId("YourClass.Application")]
just do a....in vbscript or asp
set objMydll = CreateObject("YourClass.Application")