노무현 전 대통령 서거 - 삼가 고인의 명복을 빕니다


'2009/12'에 해당되는 글 4건

  1. 2009/12/26 How to load string from resources in C#
  2. 2009/12/09 안전하게 프로세스 종료하는 방법
  3. 2009/12/04 PCHelpWare DLL 로드 오류 관련 해결책
  4. 2009/12/03 How to sign an ActiveX control with cert file
2009/12/26 12:20

How to load string from resources in C#

namespace ApplicationForm
{
public partial class MainForm : Form
{
ResourceManager resMgr = null;
public MainForm()
{
InitializeComponent();
resMgr = new ResourceManager("ApplicationForm.Properties.Resources", Assembly.GetExecutingAssembly());
TestResourceString();
}

public void TestResourceString()
{
Debug.WriteLine(resMgr.GetString("IDS_MSG_DEBUG"));
}
}
}
Trackback 0 Comment 0
2009/12/09 11:11

안전하게 프로세스 종료하는 방법

일반적으로 프로세스를 종료하는 방법은 다음과 같다.

  1. ::FindWindow() 함수를 이용해 HWND 검색
  2. 해당 HWND가 유효한지 확인한 후 WM_CLOSE 메시지 전송

하지만, 위의 방법을 사용할 수 없거나 (ex. 윈도우가 없는 콘솔 어플리케이션),
즉시 프로세스를 종료해야 할 경우 프로세스 핸들을 얻은 후에 ::TerminateProcess() 함수를 이용한다.

그런데, TerminateProcess 함수를 사용할 경우, 강제 종료되는 프로세스가 사용하던 리소스에 대한 처리가 제대로 이루어지지 않는 문제가 있다.

그래서 사용할 수 있는 대안이, 해당 프로세스에 대해 Remote thread를 실행해서
ExitProcess 함수를 호출해주는 것.

자세한 내용은 아래 링크 참조.
Dr. Dobb's Journal - A Safer Anternative to TerminateProcess()
http://www.ddj.com/windows/184416547


Trackback 0 Comment 0
2009/12/04 01:33

PCHelpWare DLL 로드 오류 관련 해결책

http://forum.ultravnc.info/viewtopic.php?p=45372

결론은, DEP때문에 1SCDLL.dll이 제대로 동작하지 않는다는 것.
해결책은 아래 참조.

The solution that GF posted worked for me. Here is what I did. 

1. Right Click on My Computer > Properties > Advanced > Performance > Settings > Data Execution Prevention Tab 

2. Check: Turn on DEP for essential Windows programs and services only 

3. Reboot 
Trackback 0 Comment 0
2009/12/03 16:06

How to sign an ActiveX control with cert file


아래 링크 참조...

나이를 먹으니 까먹는 게 많아서..

http://www.certkorea.co.kr/doc.asp?g_dev_guisign
Trackback 0 Comment 0