[Windows Tip] 바탕화면 아이콘 X 표시

Tip 2020. 4. 9. 16:19 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

윈도우 업데이트나

 

특정 프로그램 실행 후

 

바탕화면 아이콘 X 표시가 생겼을때 조치방법입니다.

 

 

마이크로 소프트의

 

Autoruns for Windows v13.96

 

으로 조치가 가능합니다.

 

 

https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns

 

Autoruns for Windows - Windows Sysinternals

See what programs are configured to startup automatically when your system boots and you login.

docs.microsoft.com

 

해당 페이지의

 

링크[Sysinternals Live] 를 클릭하여 다운로드합니다.

 

 

 

다운로드한 autoruns.exe 를 실행 후

 

프로그램 사용 동의를 [Agree] 해주시면

 

 

자동으로 레지스트리를 검사하고 복구합니다.

 

 

복구가 끝나면

 

위와 같이

 

좌측 하단에 'Ready." 가 뜨게 됩니다.

 

 

이제 다시 바탕화면으로 가면 정상적으로 바뀐 아이콘을 확인 할 수 있습니다.

 

 

 

 

 

'Tip' 카테고리의 다른 글

강원도 풀빌라 겨울에도 온수가능  (0) 2018.09.27
Watch Dogs 무료  (0) 2017.12.19
EOS 홈페이지  (0) 2017.12.13
이오스(EOS) 상장 및 이벤트 공지  (0) 2017.12.13
GET TWO UBISOFT PC CLASSICS FOR FREE THIS DECEMBER  (0) 2017.12.11
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

[CPP] Windows Service 간단하게 만들기

















Service.cpp

Service.h




Service 클래스 추가




stdafx.h 에 필요한 헤더파일 추가



#include <iostream>
#include <conio.h>
#include <WinSvc.h>





main.cpp 에 필요한 내용 추가



// ConsoleApplication5.cpp : 콘솔 응용 프로그램에 대한 진입점을 정의합니다.

//

 

#include "stdafx.h"

#include "Service.h"

#include "ConsoleApplication5.h"

 

#ifdef _DEBUG

#define new DEBUG_NEW

#endif

 

 

UINT MTServerThread(LPVOID pParam);

class CUpdateService : public CService{

public:

      CWinThread *_thread;

      void main(void){

            CService::Begin(_T("ConsoleApplication5"));

 

            // TODO : 서비스에서 실행 할 작업을 아래에 작성합니다.

 

            CService::End();

      }

protected:

      void OnStarted(){

            _thread = AfxBeginThread(MTServerThread, 0);

      }

      void OnStopped(){

            DWORD dwExitCode;

            GetExitCodeThread(_thread->m_hThread, &dwExitCode);

            WSACleanup();

      }

};

UINT MTServerThread(LPVOID pParam){

      return 0;

 

}

 

 

// 유일한 응용 프로그램 개체입니다.

 

CWinApp theApp;

 

using namespace std;

 

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])

{

      int nRetCode = 0;

 

      HMODULE hModule = ::GetModuleHandle(NULL);

 

      if (hModule != NULL)

      {

            // MFC를 초기화합니다. 초기화하지 못한 경우 오류를 인쇄합니다.

            if (!AfxWinInit(hModule, NULL, ::GetCommandLine(), 0))

            {

                  // TODO: 오류 코드를 필요에 따라 수정합니다.

                  _tprintf(_T("심각한 오류: MFC를 초기화하지 못했습니다.\n"));

                  nRetCode = 1;

            }

            else

            {

                  // TODO: 응용 프로그램의 동작은 여기에서 코딩합니다.

                  CUpdateService upServ;

                  if (argc == 2){

                        if (_tcscmp(argv[1], _T("-i")) == 0){

                             upServ.Install(_T("ConsoleApplication5"));

                        }

                        else if (_tcscmp(argv[1], _T("-u")) == 0){

                             upServ.Uninstall(_T("ConsoleApplication5"));

                        }

                        return true;

                  }

                  upServ.main();

            }

      }

      else

      {

            // TODO: 오류 코드를 필요에 따라 수정합니다.

            _tprintf(_T("심각한 오류: GetModuleHandle 실패\n"));

            nRetCode = 1;

      }

 

      return nRetCode;

}

 





'Programming > C,CPP,CS' 카테고리의 다른 글

WAVE form wFormatTag IDs  (0) 2018.04.04
CString Tokenize  (0) 2017.10.19
WaitForMultipleObjects  (0) 2017.04.19
How do I add my domain name to my computers host file?  (0) 2017.04.06
[VS2013] 힙이 손상되었습니다.  (0) 2017.04.05

MFC Dialog Position Save & Load

Programming/MFC 2016. 11. 10. 11:45 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

MFC Dialog Position Save & Load


참조 : http://www.codeproject.com/Articles/1154/Saving-a-windows-size-position-and-state-in-MFC


Saving the window placement








BOOL CMainFrame::DestroyWindow() 
{
    WINDOWPLACEMENT wp;
    GetWindowPlacement(&wp);
    AfxGetApp()->WriteProfileBinary("MainFrame", "WP", (LPBYTE)&wp, sizeof(wp));

    return CMDIFrameWnd::DestroyWindow();
}






Restoring the window placement









void CMainFrame::OnShowWindow(BOOL bShow, UINT nStatus) 
{
    CMDIFrameWnd::OnShowWindow(bShow, nStatus);

    static bool bOnce = true;

    if(bShow && !IsWindowVisible()
        && bOnce)
    {
        bOnce = false;

        WINDOWPLACEMENT *lwp;
        UINT nl;

        if(AfxGetApp()->GetProfileBinary("MainFrame", "WP", (LPBYTE*)&lwp, &nl))
        {
            SetWindowPlacement(lwp);
            delete [] lwp;
        }
    }
}







'Programming > MFC' 카테고리의 다른 글

[MFC] Dialog 닫기 (OnOK/EndDialog)  (0) 2017.02.08
CWnd::Invalidate  (0) 2016.11.15
MFC - 다이얼로그 생성시 발생되는 메세지들...  (0) 2016.11.07
MFC x64 ADO msado15.dll  (0) 2016.10.28
x64 ADO import  (0) 2016.10.28

OpenSSL x86 Build

Programming/C,CPP,CS 2016. 10. 28. 15:39 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

OpenSSL x86 Build


Windows7 64bit


Visual Studio 2013






1. download openssl 

openssl-1.0.2j.tar.gz


http://openssl.org/source/





extract to D:\openssl-1.0.2j






2. download/install ActivePerl for Win64 


http://www.activestate.com/activeperl/downloads





C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts


execute VS2013 x86 네이티브 도구 명령 프롬프트, VS2013 x86 Native Tools Command Prompt





change directory to D:\openssl-1.0.2j


3. Setting Target openssldir


perl Configure VC-WIN32 no-idea no-mdc2 no-rc5 --prefix=d:\openssl32bit no-shared no-asm threads



no-asm 옵션을 추가하지 않으면 nasm 을 설치하여야 하므로.....


no-idea, no-mdc2, no-rc5 옵션은 특허가 포함되어있는 모듈이므로


꼭 필요하지 않다면 사용하지 않는 것이 좋습니다.



참고 : http://greenfishblog.tistory.com/81



사진은 64비트 버전의 것을 복붙을 하여서 명령어가 다릅니다. 참고바랍니다.








4. Setting complie enviroment


ms\do_ms








5. Complie


nmake -f ms\ntdll.mak install






설치 명령어는 사실


openssl 폴더에 있는



INSTALL.W64 , INSTALL.W32 만 따라하셔도 충분히 가능합니다.








'Programming > C,CPP,CS' 카테고리의 다른 글

임계영역 설정 Ctirical Section  (0) 2016.11.07
Jsoncpp 주의 사항  (0) 2016.11.01
pjproject-2.5.5  (0) 2016.10.14
pjsip Building for Microsoft Windows  (1) 2016.10.12
oRTP  (0) 2016.10.11

MSSQL 테이블명, 컬럼명 검색

Programming/MFC 2016. 10. 27. 16:54 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

MSSQL 테이블명, 컬럼명 검색








-- 테이블명 검색

SELECT * FROM information_schema.TABLE_CONSTRAINTS WHERE TABLE_NAME = '테이블명'





-- 컬럼명 검색

SELECT * FROM information_schema.COLUMNS WHERE COLUMN_NAME = '컬럼명'





-- PK 검색

SELECT * FROM information_schema.KEY_COLUMN_USAGE

'Programming > MFC' 카테고리의 다른 글

MFC x64 ADO msado15.dll  (0) 2016.10.28
x64 ADO import  (0) 2016.10.28
Visual Studio 2013 클래스뷰, 리소스뷰 가 보이지 않을때  (0) 2016.10.27
CEdit control의 font 바꾸기  (0) 2016.10.25
CTextProgressCtrl hide Edge  (0) 2016.10.25

pjsip Building for Microsoft Windows

Programming/C,CPP,CS 2016. 10. 12. 14:10 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

pjsip Building for Microsoft Windows


출처 : https://trac.pjsip.org/repos/wiki/Getting-Started/Windows





Build Preparation for Windows

  1. Get the source code, if you haven't already.
  2. It is important that you create a config_site.h as described in Build Preparation

Building the Projects

Follow the steps below to build the libraries/application using Visual Studio:

  1. For Visual Studio 6/2002/2003: open pjproject.dsw workspace file. (No longer supported since pjsip 2.0)
  2. For Visual Studio 8 (VS 2005): open pjproject-vs8.sln solution file.
  3. For Visual Studio 9 (VS 2008): open pjproject-vs8.sln solution file. One-time conversion of projects to VS 2008 format will done automatically.
  4. For Visual Studio 11 (VS 2012): open pjproject-vs8.sln solution file. One-time conversion of projects to VS 2012 format will done automatically.
    1. Warnings about Windows Mobile projects/configurations can be safely ignored, VS 2012 does not support Windows Mobile
    2. Additional tips from pjsip mailing list
  5. Set pjsua as Active or Startup Project.
  6. Set Win32 as the platform.
  7. Select Debug or Release build as appropriate.
  8. Build the project. This will build pjsua application and all libraries needed by pjsua.
  9. After successful build, the pjsua application will be placed in pjsip-apps/bin directory, and the libraries in lib directory under each projects.

To build the samples:

  1. (Still using the same workspace)
  2. Set samples project as Active Project
  3. Select Debug or Release build as appropriate. See Visual Studio Build Configuration page for explanation of each provided build configuration
  4. Build the project. This will build all sample applications and all libraries needed.
  5. After successful build, the sample applications will be placed in pjsip-apps/bin/samples directory, and the libraries in lib directory under each projects.



'Programming > C,CPP,CS' 카테고리의 다른 글

OpenSSL x86 Build  (0) 2016.10.28
pjproject-2.5.5  (0) 2016.10.14
oRTP  (0) 2016.10.11
log4cxx dll build  (1) 2016.09.27
OpenSSL x64 Build  (0) 2016.09.27

Windows7 Redis 설치 및 실행

Programming/Redis 2016. 9. 27. 14:21 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Redis


Redis is an open source (BSD licensed), in-memory data structure store, used as database, cache and message broker. It supports data structures such as stringshasheslistssets,sorted sets with range queries, bitmapshyperloglogs and geospatial indexes with radius queries. Redis has built-in replicationLua scriptingLRU evictiontransactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.



1. Windows 용 redis


https://github.com/dmajkic/redis/downloads





2. execute redis-server.exe



3. execute redis-cli.exe




'Programming > Redis' 카테고리의 다른 글

Redis Client Connect Test  (0) 2016.10.26
Hiredis Subscribe/Publish with CWinThread  (0) 2016.10.05
How to use Pub/sub with hiredis in C++?  (0) 2016.09.29
hiredis fatal error C1853:  (0) 2016.09.29
hiredis MFC import Visual Studio 2013  (0) 2016.09.28

Log4cxx ChainSaw Appender

Programming/C,CPP,CS 2016. 8. 22. 11:01 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Log4cxx ChainSaw Appender






Log4cxx 에 발생하는 Log 를 ChainSaw 서버로 보내면 쉽게 Log를 관리 할 수 있다.


https://logging.apache.org/chainsaw/





Apache Chainsaw configured for two XML socket receivers






Windows 의 경우 


Unix/Dos Standalone 버전을 받아서



chainsaw.bat 파일을 실행시키면



ChainSaw 화면이 뜬다.









336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Windows 버전별 기본 포함 .NET Framework


  • Windows XP Media Center Edition (Windows XP SP1) includes the .NET Framework 1.0 + SP2 as an OS component
  • Windows XP Media Center Edition (Windows XP SP2 and higher) includes the .NET Framework 1.0 + SP3 as an OS component.  On Windows XP Media Center Edition, the only way to get the .NET Framework 1.0 SP3 is to install Windows XP SP2 or higher.  There is not a standalone 1.0 SP3 installer for this edition of Windows XP.
  • Windows XP Tablet PC Edition (Windows XP SP1) includes the .NET Framework 1.0 + SP2 as an OS component
  • Windows XP Tablet PC Edition (Windows XP SP2 and higher) includes the .NET Framework 1.0 + SP3 as an OS component.  On Windows XP Tablet PC Edition, the only way to get the .NET Framework 1.0 SP3 is to install Windows XP SP2 or higher.  There is not a standalone 1.0 SP3 installer for this edition of Windows XP.
  • Windows Server 2003 (all x86 editions) includes the .NET Framework 1.1 as an OS component; 64-bit versions of Windows Server 2003 do not include a version of the .NET Framework as an OS component
  • Windows Vista (all editions) includes the .NET Framework 2.0 and 3.0 as OS components  3.0 can be added or removed via the Programs and Fatures control panel.
  • Windows Vista SP1 (all editions) includes the .NET Framework 2.0 SP1 and 3.0 SP1 as OS components.  3.0 SP1 can be added or removed via the Programs and Features control panel.
  • Windows Server 2008 and Windows Server 2008 SP1 (all editions) includes the .NET Framework 2.0 SP1 and 3.0 SP1 as OS components.  The .NET Framework 3.0 SP1 is not installed by default and must be added via the Programs and Features control panel though.
  • Windows Server 2008 SP2 (all editions) includes the .NET Framework 2.0 SP2 and 3.0 SP2 as OS components.  The .NET Framework 3.0 SP2 is not installed by default and must be added via the Programs and Features control panel though.
  • Windows Server 2008 R2 (all editions) includes the .NET Framework 3.5.1 as an OS component.  This means you will get the.NET Framework 2.0 SP2, 3.0 SP2 and 3.5 SP1 plus a few post 3.5 SP1 bug fixes.  3.0 SP2 and 3.5 SP1 can be added or removed via the Programs and Features control panel.
  • Windows 7 (all editions) includes the .NET Framework 3.5.1 as an OS component.  This means you will get the .NET Framework 2.0 SP2, 3.0 SP2 and 3.5 SP1 plus a few post 3.5 SP1 bug fixes.  3.0 SP2 and 3.5 SP1 can be added or removed via the Programs and Features control panel.
  • Windows 8 (all editions) includes the .NET Framework 4.5 as an OS component, and it is installed by default.  It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default.  The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
  • Windows 8.1 (all editions) includes the .NET Framework 4.5.1 as an OS component, and it is installed by default.  It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default.  The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
  • Windows Server 2012 (all editions) includes the .NET Framework 4.5 as an OS component, and it is installed by default except in the Server Core configuration.  It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default.  The .NET Framework 3.5 SP1 can be added or removed via the Server Manager.
  • Windows Server 2012 R2 (all editions) includes the .NET Framework 4.5.1 as an OS component, and it is installed by default except in the Server Core configuration.  It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default.  The .NET Framework 3.5 SP1 can be added or removed via the Server Manager.
  • Windows 10 (all editions) includes the .NET Framework 4.6 as an OS component, and it is installed by default.  It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default.  The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.


.NET Framework product version



.NET Framework product version


Service pack level


Version


.NET Framework 1.0


Original release


1.0.3705.0 and 7.0.9466.0


.NET Framework 1.0


Service pack 1


1.0.3705.209


.NET Framework 1.0


Service pack 2


1.0.3705.288 and 7.0.9502.0


.NET Framework 1.0


Service pack 3


1.0.3705.6018 and 7.0.9951.0


.NET Framework 1.1


Original release


1.1.4322.573 and 7.10.3052.4


.NET Framework 1.1


Service pack 1


1.1.4322.2032 (if you have the MSI-based 1.1 SP1 installed) or 1.1.4322.2300 (if you have the OCM-based 1.1 SP1 installed on Windows Server 2003) and 7.10.6001.4


.NET Framework 2.0


Beta 1


2.0.40607.16 and 8.0.40607.16


.NET Framework 2.0


Beta 2


2.0.50215.44 and 8.0.50215.44


.NET Framework 2.0


Original release


2.0.50727.42 and 8.0.50727.42


.NET Framework 2.0


Service pack 1


2.0.50727.1433 and 8.0.50727.1433


.NET Framework 2.0


Service pack 2


2.0.50727.3053 and 8.0.50727.3053


.NET Framework 3.0


Original release


3.0.04506.26 (on Windows Vista) and 3.0.04506.30 (on downlevel operating systems)


.NET Framework 3.0


Service pack 1


3.0.04506.648


.NET Framework 3.0


Service pack 2


3.0.04506.2152


.NET Framework 3.5


Original release


3.5.21022.8 and 9.0.21022.8


.NET Framework 3.5


Service pack 1


3.5.30729.1 and 9.0.30729.1


.NET Framework 4


Original release


4.0.30319.1 and 10.0.30319.1





source : https://blogs.msdn.microsoft.com/astebner/2007/03/14/mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os/


'Programming > C,CPP,CS' 카테고리의 다른 글

ATL,CPP,C# dll 배포  (0) 2016.05.27
Free Dia Diagram Editor  (0) 2016.04.28
c# dll ClassLibrary 에서 MessageBox.Show(text,title);  (0) 2016.04.06
.Net FrameWork 버전 확인 방법  (0) 2016.04.05
C# Class Library use in script  (1) 2016.04.05