asp
닷넷으로 작성해서 classic asp에서 사용하기.
duraboys
2010. 8. 24. 23:04
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를 실행합니다. :)