Microsoft MVP성태의 닷넷 이야기
오류 유형: 55. Windowless ActiveX controls are not supported [링크 복사], [링크+제목 복사],
조회: 26072
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)


Windowless ActiveX controls are not supported


현상은 간단했습니다.

3rd-party 컨트롤을 WinForm에 올려놓았는데, 아래와 같이 EndInit 메서드 실행에서 예외가 발생하였습니다.

private void InitializeComponent()
{
  ; 생략
  ((System.ComponentModel.ISupportInitialize)(this.axXObject1)).EndInit(); // 예외 발생  
	this.ResumeLayout( false );  
}

"System.Reflection.TargetInvocationException: Unable to get the window
handle for the '<ActiveX name>' control. Windowless ActiveX controls are not
supported. ---> System.NullReferenceException: Object reference not set to
an instance of an object."

물론, 애당초 해당 컨트롤을 Windowsless 모드로 제작된 경우도 있을 수 있겠지만, 위에서 제가 사용한 컨트롤은 분명한 Windowed 컨트롤이었습니다. 오호... 이거 고민입니다. ^^;

이상한 것은, Visual Studio 2005에서는 정상적으로 동작하는데, 2008로 빌드하고 실행시키면 그와 같은 오류가 발생하였습니다.

어쩌겠습니까? 웹을 검색해 봐야지. ^^

검색을 해도... 사실 딱히 별다른 원인이 있어보이진 않았습니다. 어떤 이는 AutoScaleMode를 None으로 설정하라고 하고.

그러다, 보게 된 것. "DEP" 기능을 꺼보라는 것입니다. 휴... 어쩔 수 없군요. 지푸라기라도 잡고 싶은 심정에서 시도를 해보았습니다. 참고로, Vista에서는 boot.ini 설정이 지원되지 않기 때문에 아래와 같이 bcdedit.exe를 이용하셔야 합니다.

bcdedit.exe /set {current} nx AlwaysOff

당연히, "Run as administrator"로 띄운 명령행 대화창에서 실행시켜야 합니다.

결과는... ^^; OK입니다. DEP를 끄고 나니 정상적으로 ActiveX가 활성화되었습니다.




그 외에 다음과 같은 토픽도 있습니다. 이런 걸로 봐서는, 해당 오류가 다양한 원인에 의해서 발생하는 것으로 보인다는.

"Windowless ActiveX controls are not supported"...
and how to fix it
; http://www.petedavis.net/MySite/DynPageView.aspx?pageid=21



[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 6/11/2021]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 76  77  78  79  80  81  82  [83]  84  85  86  87  88  89  90  ...
NoWriterDateCnt.TitleFile(s)
11895정성태5/12/201922574.NET Framework: 832. ML.NET Model Builder - 회귀(Regression), 다중 분류(Multi-class classification) 예제파일 다운로드1
11894정성태5/10/201924532VS.NET IDE: 135. Visual Studio - ML.NET Model Builder 소개 [5]
11893정성태5/10/201920598오류 유형: 535. C# 6.0 이상의 문법을 컴파일 시 오류가 발생한다면?
11892정성태5/10/201920500웹: 38. HTTP Cookie의 expires 시간 형식(RFC7231)
11891정성태5/9/201923628.NET Framework: 831. (번역글) .NET Internals Cookbook Part 12 - Memory structure, attributes, handles
11890정성태5/8/201919296개발 환경 구성: 439. "Visual Studio Enterprise is required to execute the test." 메시지와 관련된 코드 기록
11889정성태5/8/201919339개발 환경 구성: 438. mstest, QTAgent의 로그 파일 설정 방법
11888정성태5/8/201937255.NET Framework: 830. C# - 비동기 호출을 취소하는 CancellationToken의 간단한 예제 코드 [1]파일 다운로드1
11887정성태5/8/201923081.NET Framework: 829. C# - yield 문을 사용할 수 있는 메서드의 조건
11886정성태5/7/201920139오류 유형: 534. mstest.exe 실행 시 "Visual Studio Enterprise is required to execute the test." 오류 [2]
11885정성태5/7/201917608오류 유형: 533. mstest.exe 실행 시 "File extension specified '.loadtest' is not a valid test extension." 오류 발생
11884정성태5/5/201922526.NET Framework: 828. C# DLL에서 Win32 C/C++처럼 dllexport 함수를 제공하는 방법 - 두 번째 이야기
11883정성태5/3/201927528.NET Framework: 827. C# - 인터넷 시간 서버로부터 받은 시간을 윈도우에 적용하는 방법파일 다운로드1
11882정성태5/2/201924001.NET Framework: 826. (번역글) .NET Internals Cookbook Part 11 - Various C# riddles파일 다운로드1
11881정성태4/28/201924098오류 유형: 532. .NET Core 프로젝트로 마이그레이션 시 "CS0579 Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute" 오류 발생
11880정성태4/25/201919852오류 유형: 531. 이벤트 로그 오류 - Task Scheduling Error: m->NextScheduledSPRetry 1547, m->NextScheduledEvent 1547
11879정성태4/24/201928759.NET Framework: 825. (번역글) .NET Internals Cookbook Part 10 - Threads, Tasks, asynchronous code and others파일 다운로드2
11878정성태4/22/201924023.NET Framework: 824. (번역글) .NET Internals Cookbook Part 9 - Finalizers, queues, card tables and other GC stuff파일 다운로드1
11877정성태4/22/201924237.NET Framework: 823. (번역글) .NET Internals Cookbook Part 8 - C# gotchas파일 다운로드1
11876정성태4/21/201922506.NET Framework: 822. (번역글) .NET Internals Cookbook Part 7 - Word tearing, locking and others파일 다운로드1
11875정성태4/21/201924332오류 유형: 530. Visual Studo에서 .NET Core 프로젝트를 열 때 "One or more errors occurred." 오류 발생
11874정성태4/20/201924358.NET Framework: 821. (번역글) .NET Internals Cookbook Part 6 - Object internals파일 다운로드1
11873정성태4/19/201923042.NET Framework: 820. (번역글) .NET Internals Cookbook Part 5 - Methods, parameters, modifiers파일 다운로드1
11872정성태4/17/201923920.NET Framework: 819. (번역글) .NET Internals Cookbook Part 4 - Type members파일 다운로드1
11871정성태4/16/201921804.NET Framework: 818. (번역글) .NET Internals Cookbook Part 3 - Initialization tricks [3]파일 다운로드1
11870정성태4/16/201920690.NET Framework: 817. Process.Start로 실행한 콘솔 프로그램의 출력 결과를 얻는 방법파일 다운로드1
... 76  77  78  79  80  81  82  [83]  84  85  86  87  88  89  90  ...