http://hanhead.tistory.com/entry/닷넷으로-작성해서-asp에서-사용하기
먼저 아래와 같이 c#을 작성하여 test.cs로 저장합니다.
콘솔에서 해당 경로로 이동 아래와 같이 컴파일 합니다.
csc /nologo /t:library test.cs
그리고 어셈블리에 등록 합니다.
regasm /nologo /codebase test.dll
그리고 아래와 같이 test.vbs를 작성합니다.
test.vbs를 실행합니다. :)
먼저 아래와 같이 c#을 작성하여 test.cs로 저장합니다.
public class testvbscriptcallabledll
{
public string testmethod()
{
return "this is a string returned from .net compiled library";
}
}
콘솔에서 해당 경로로 이동 아래와 같이 컴파일 합니다.
csc /nologo /t:library test.cs
그리고 어셈블리에 등록 합니다.
regasm /nologo /codebase test.dll
그리고 아래와 같이 test.vbs를 작성합니다.
Dim f
Set f = CreateObject("testvbscriptcallabledll")
msgbox f.testmethod
Set f = Nothing
test.vbs를 실행합니다. :)
'asp' 카테고리의 다른 글
| ADO CreateParameter Method (0) | 2010.08.24 |
|---|---|
| ADO 사용하여 Access 데이터베이스에 매개 변수가 있는 쿼리 호출 방법 (0) | 2010.08.24 |
| Calculate Distance and Radius in ASP (0) | 2010.08.24 |
| Class implementation for using webservices in ASP (0) | 2010.08.24 |
| generate GUID (0) | 2010.08.24 |
test.vbs