ATL 에서 VC++ DLL로드 질문입니다

anaud2의 이미지

안녕하세요

ATL DLL을 만들어서 ASP연동을 하려고 공부하고 있는 사람입니다.

여러가지 궁금한 사항이나 막히는 부분을 여기 계신 여러분들에게 도움을 많이 받고 있습니다.

우선 감사한 마음을 먼저 전합니다.

이번에 질문은

ATL에서 만든 메소드는 ASP에서 정상적으로 실행이 되더라구요~

제 업무에 필요한부분이라서 혹시 VC++에서 만든 DLL을 ATL 포르젝트의 메소드가 로드를 하고 그 결과값을

리턴해주면 ASP 에서 받을수 있지 않을까 해서 시험을 해봤습니다.

그런데 결과는

서버 개체, ASP 0177 (0x8007007E)
8007007e
/test/test5.asp, line 9 (//라인9: Set obj = Server.CreateObject("TestDllATL2.TestCom"))

이렇게 알수 없는 오류가 나오더라구요

ATL 내부의 메소드 부분은 아래와 같습니다.

/*VS 6.0환경 ATL 프로젝트 COM-> activeX server page
/* ATL 메소드 -> Method*/
STDMETHODIMP CTestCom::Method(int a, int b, int *c)
{
*c = TestMethod(a,b);
//*c = a + b;
return S_OK;
}
/*VC++ DLL 내용 */

#include

extern "C" __declspec(dllexport)int
TestMethod(int a, int b)
{
return a + b;
}

ATL에서 로드 방법은 암묵적인 로드를 하기때문에 컴파일상에는 아무런 문제가 없습니다.
다만 ASP에서 로드 시점에서 문제가 되더라구요 그리고 주석을
STDMETHODIMP CTestCom::Method(int a, int b, int *c)
{
//*c = TestMethod(a,b);
*c = a + b;
return S_OK;
}
이렇게 바꾸어서 ATL 에서 VC++ DLL의 함수를 호출하지 않으면 ASP에서 정상적으로 동작이 됩니다.

이 원인은 제 머리로는 이해가 안되어서 질문을 드립니다. 어떤 요인일까요?

PS. 마지막으로 VS 6.0에서 지금 ATL프로젝트 처럼 activeX로 컴퍼넌트를 등록하고 컴파일을 하고 ASP에서 한번이라도 DLL을 호출하면 그다음부터 ATL 프로젝트 메소드같은걸 바꾸려고 하면 DLL로드가 안된다고 에러가 발생합니다 레지스트리에 등록이 되어서 그런거 같은데 매번 새 프로젝트를 생성할수도 없고 방법이 없을까요?

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.