WAVE form wFormatTag IDs

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

 

/* WAVE form wFormatTag IDs */

#define  WAVE_FORMAT_UNKNOWN                    0x0000 /* Microsoft Corporation */

#define  WAVE_FORMAT_ADPCM                      0x0002 /* Microsoft Corporation */

#define  WAVE_FORMAT_IEEE_FLOAT                 0x0003 /* Microsoft Corporation */

#define  WAVE_FORMAT_VSELP                      0x0004 /* Compaq Computer Corp. */

#define  WAVE_FORMAT_IBM_CVSD                   0x0005 /* IBM Corporation */

#define  WAVE_FORMAT_ALAW                       0x0006 /* Microsoft Corporation */

#define  WAVE_FORMAT_MULAW                      0x0007 /* Microsoft Corporation */

#define  WAVE_FORMAT_DTS                        0x0008 /* Microsoft Corporation */

#define  WAVE_FORMAT_DRM                        0x0009 /* Microsoft Corporation */

#define  WAVE_FORMAT_WMAVOICE9                  0x000A /* Microsoft Corporation */

#define  WAVE_FORMAT_WMAVOICE10                 0x000B /* Microsoft Corporation */

#define  WAVE_FORMAT_OKI_ADPCM                  0x0010 /* OKI */

#define  WAVE_FORMAT_DVI_ADPCM                  0x0011 /* Intel Corporation */

#define  WAVE_FORMAT_IMA_ADPCM                  (WAVE_FORMAT_DVI_ADPCM) /*  Intel Corporation */

#define  WAVE_FORMAT_MEDIASPACE_ADPCM           0x0012 /* Videologic */

#define  WAVE_FORMAT_SIERRA_ADPCM               0x0013 /* Sierra Semiconductor Corp */

#define  WAVE_FORMAT_G723_ADPCM                 0x0014 /* Antex Electronics Corporation */

#define  WAVE_FORMAT_DIGISTD                    0x0015 /* DSP Solutions, Inc. */

#define  WAVE_FORMAT_DIGIFIX                    0x0016 /* DSP Solutions, Inc. */

#define  WAVE_FORMAT_DIALOGIC_OKI_ADPCM         0x0017 /* Dialogic Corporation */

#define  WAVE_FORMAT_MEDIAVISION_ADPCM          0x0018 /* Media Vision, Inc. */

#define  WAVE_FORMAT_CU_CODEC                   0x0019 /* Hewlett-Packard Company */

#define  WAVE_FORMAT_YAMAHA_ADPCM               0x0020 /* Yamaha Corporation of America */

#define  WAVE_FORMAT_SONARC                     0x0021 /* Speech Compression */

#define  WAVE_FORMAT_DSPGROUP_TRUESPEECH        0x0022 /* DSP Group, Inc */

#define  WAVE_FORMAT_ECHOSC1                    0x0023 /* Echo Speech Corporation */

#define  WAVE_FORMAT_AUDIOFILE_AF36             0x0024 /* Virtual Music, Inc. */

#define  WAVE_FORMAT_APTX                       0x0025 /* Audio Processing Technology */

#define  WAVE_FORMAT_AUDIOFILE_AF10             0x0026 /* Virtual Music, Inc. */

#define  WAVE_FORMAT_PROSODY_1612               0x0027 /* Aculab plc */

#define  WAVE_FORMAT_LRC                        0x0028 /* Merging Technologies S.A. */

#define  WAVE_FORMAT_DOLBY_AC2                  0x0030 /* Dolby Laboratories */

#define  WAVE_FORMAT_GSM610                     0x0031 /* Microsoft Corporation */

#define  WAVE_FORMAT_MSNAUDIO                   0x0032 /* Microsoft Corporation */

#define  WAVE_FORMAT_ANTEX_ADPCME               0x0033 /* Antex Electronics Corporation */

#define  WAVE_FORMAT_CONTROL_RES_VQLPC          0x0034 /* Control Resources Limited */

#define  WAVE_FORMAT_DIGIREAL                   0x0035 /* DSP Solutions, Inc. */

#define  WAVE_FORMAT_DIGIADPCM                  0x0036 /* DSP Solutions, Inc. */

#define  WAVE_FORMAT_CONTROL_RES_CR10           0x0037 /* Control Resources Limited */

#define  WAVE_FORMAT_NMS_VBXADPCM               0x0038 /* Natural MicroSystems */

#define  WAVE_FORMAT_CS_IMAADPCM                0x0039 /* Crystal Semiconductor IMA ADPCM */

#define  WAVE_FORMAT_ECHOSC3                    0x003A /* Echo Speech Corporation */

#define  WAVE_FORMAT_ROCKWELL_ADPCM             0x003B /* Rockwell International */

#define  WAVE_FORMAT_ROCKWELL_DIGITALK          0x003C /* Rockwell International */

#define  WAVE_FORMAT_XEBEC                      0x003D /* Xebec Multimedia Solutions Limited */

#define  WAVE_FORMAT_G721_ADPCM                 0x0040 /* Antex Electronics Corporation */

#define  WAVE_FORMAT_G728_CELP                  0x0041 /* Antex Electronics Corporation */

#define  WAVE_FORMAT_MSG723                     0x0042 /* Microsoft Corporation */

#define  WAVE_FORMAT_MPEG                       0x0050 /* Microsoft Corporation */

#define  WAVE_FORMAT_RT24                       0x0052 /* InSoft, Inc. */

#define  WAVE_FORMAT_PAC                        0x0053 /* InSoft, Inc. */

#define  WAVE_FORMAT_MPEGLAYER3                 0x0055 /* ISO/MPEG Layer3 Format Tag */

#define  WAVE_FORMAT_LUCENT_G723                0x0059 /* Lucent Technologies */

#define  WAVE_FORMAT_CIRRUS                     0x0060 /* Cirrus Logic */

#define  WAVE_FORMAT_ESPCM                      0x0061 /* ESS Technology */

#define  WAVE_FORMAT_VOXWARE                    0x0062 /* Voxware Inc */

#define  WAVE_FORMAT_CANOPUS_ATRAC              0x0063 /* Canopus, co., Ltd. */

#define  WAVE_FORMAT_G726_ADPCM                 0x0064 /* APICOM */

#define  WAVE_FORMAT_G722_ADPCM                 0x0065 /* APICOM */

#define  WAVE_FORMAT_DSAT_DISPLAY               0x0067 /* Microsoft Corporation */

#define  WAVE_FORMAT_VOXWARE_BYTE_ALIGNED       0x0069 /* Voxware Inc */

#define  WAVE_FORMAT_VOXWARE_AC8                0x0070 /* Voxware Inc */

#define  WAVE_FORMAT_VOXWARE_AC10               0x0071 /* Voxware Inc */

#define  WAVE_FORMAT_VOXWARE_AC16               0x0072 /* Voxware Inc */

#define  WAVE_FORMAT_VOXWARE_AC20               0x0073 /* Voxware Inc */

#define  WAVE_FORMAT_VOXWARE_RT24               0x0074 /* Voxware Inc */

#define  WAVE_FORMAT_VOXWARE_RT29               0x0075 /* Voxware Inc */

#define  WAVE_FORMAT_VOXWARE_RT29HW             0x0076 /* Voxware Inc */

#define  WAVE_FORMAT_VOXWARE_VR12               0x0077 /* Voxware Inc */

#define  WAVE_FORMAT_VOXWARE_VR18               0x0078 /* Voxware Inc */

#define  WAVE_FORMAT_VOXWARE_TQ40               0x0079 /* Voxware Inc */

#define  WAVE_FORMAT_SOFTSOUND                  0x0080 /* Softsound, Ltd. */

#define  WAVE_FORMAT_VOXWARE_TQ60               0x0081 /* Voxware Inc */

#define  WAVE_FORMAT_MSRT24                     0x0082 /* Microsoft Corporation */

#define  WAVE_FORMAT_G729A                      0x0083 /* AT&T Labs, Inc. */

#define  WAVE_FORMAT_MVI_MVI2                   0x0084 /* Motion Pixels */

#define  WAVE_FORMAT_DF_G726                    0x0085 /* DataFusion Systems (Pty) (Ltd) */

#define  WAVE_FORMAT_DF_GSM610                  0x0086 /* DataFusion Systems (Pty) (Ltd) */

#define  WAVE_FORMAT_ISIAUDIO                   0x0088 /* Iterated Systems, Inc. */

#define  WAVE_FORMAT_ONLIVE                     0x0089 /* OnLive! Technologies, Inc. */

#define  WAVE_FORMAT_SBC24                      0x0091 /* Siemens Business Communications Sys */

#define  WAVE_FORMAT_DOLBY_AC3_SPDIF            0x0092 /* Sonic Foundry */

#define  WAVE_FORMAT_MEDIASONIC_G723            0x0093 /* MediaSonic */

#define  WAVE_FORMAT_PROSODY_8KBPS              0x0094 /* Aculab plc */

#define  WAVE_FORMAT_ZYXEL_ADPCM                0x0097 /* ZyXEL Communications, Inc. */

#define  WAVE_FORMAT_PHILIPS_LPCBB              0x0098 /* Philips Speech Processing */

#define  WAVE_FORMAT_PACKED                     0x0099 /* Studer Professional Audio AG */

#define  WAVE_FORMAT_MALDEN_PHONYTALK           0x00A0 /* Malden Electronics Ltd. */

#define  WAVE_FORMAT_RAW_AAC1                   0x00FF /* For Raw AAC, with format block AudioSpecificConfig() (as defined by MPEG-4), that follows WAVEFORMATEX */

#define  WAVE_FORMAT_RHETOREX_ADPCM             0x0100 /* Rhetorex Inc. */

#define  WAVE_FORMAT_IRAT                       0x0101 /* BeCubed Software Inc. */

#define  WAVE_FORMAT_VIVO_G723                  0x0111 /* Vivo Software */

#define  WAVE_FORMAT_VIVO_SIREN                 0x0112 /* Vivo Software */

#define  WAVE_FORMAT_DIGITAL_G723               0x0123 /* Digital Equipment Corporation */

#define  WAVE_FORMAT_SANYO_LD_ADPCM             0x0125 /* Sanyo Electric Co., Ltd. */

#define  WAVE_FORMAT_SIPROLAB_ACEPLNET          0x0130 /* Sipro Lab Telecom Inc. */

#define  WAVE_FORMAT_SIPROLAB_ACELP4800         0x0131 /* Sipro Lab Telecom Inc. */

#define  WAVE_FORMAT_SIPROLAB_ACELP8V3          0x0132 /* Sipro Lab Telecom Inc. */

#define  WAVE_FORMAT_SIPROLAB_G729              0x0133 /* Sipro Lab Telecom Inc. */

#define  WAVE_FORMAT_SIPROLAB_G729A             0x0134 /* Sipro Lab Telecom Inc. */

#define  WAVE_FORMAT_SIPROLAB_KELVIN            0x0135 /* Sipro Lab Telecom Inc. */

#define  WAVE_FORMAT_G726ADPCM                  0x0140 /* Dictaphone Corporation */

#define  WAVE_FORMAT_QUALCOMM_PUREVOICE         0x0150 /* Qualcomm, Inc. */

#define  WAVE_FORMAT_QUALCOMM_HALFRATE          0x0151 /* Qualcomm, Inc. */

#define  WAVE_FORMAT_TUBGSM                     0x0155 /* Ring Zero Systems, Inc. */

#define  WAVE_FORMAT_MSAUDIO1                   0x0160 /* Microsoft Corporation */

#define  WAVE_FORMAT_WMAUDIO2                   0x0161 /* Microsoft Corporation */

#define  WAVE_FORMAT_WMAUDIO3                   0x0162 /* Microsoft Corporation */

#define  WAVE_FORMAT_WMAUDIO_LOSSLESS           0x0163 /* Microsoft Corporation */

#define  WAVE_FORMAT_WMASPDIF                   0x0164 /* Microsoft Corporation */

#define  WAVE_FORMAT_UNISYS_NAP_ADPCM           0x0170 /* Unisys Corp. */

#define  WAVE_FORMAT_UNISYS_NAP_ULAW            0x0171 /* Unisys Corp. */

#define  WAVE_FORMAT_UNISYS_NAP_ALAW            0x0172 /* Unisys Corp. */

#define  WAVE_FORMAT_UNISYS_NAP_16K             0x0173 /* Unisys Corp. */

#define  WAVE_FORMAT_CREATIVE_ADPCM             0x0200 /* Creative Labs, Inc */

#define  WAVE_FORMAT_CREATIVE_FASTSPEECH8       0x0202 /* Creative Labs, Inc */

#define  WAVE_FORMAT_CREATIVE_FASTSPEECH10      0x0203 /* Creative Labs, Inc */

#define  WAVE_FORMAT_UHER_ADPCM                 0x0210 /* UHER informatic GmbH */

#define  WAVE_FORMAT_QUARTERDECK                0x0220 /* Quarterdeck Corporation */

#define  WAVE_FORMAT_ILINK_VC                   0x0230 /* I-link Worldwide */

#define  WAVE_FORMAT_RAW_SPORT                  0x0240 /* Aureal Semiconductor */

#define  WAVE_FORMAT_ESST_AC3                   0x0241 /* ESS Technology, Inc. */

#define  WAVE_FORMAT_GENERIC_PASSTHRU           0x0249

#define  WAVE_FORMAT_IPI_HSX                    0x0250 /* Interactive Products, Inc. */

#define  WAVE_FORMAT_IPI_RPELP                  0x0251 /* Interactive Products, Inc. */

#define  WAVE_FORMAT_CS2                        0x0260 /* Consistent Software */

#define  WAVE_FORMAT_SONY_SCX                   0x0270 /* Sony Corp. */

#define  WAVE_FORMAT_FM_TOWNS_SND               0x0300 /* Fujitsu Corp. */

#define  WAVE_FORMAT_BTV_DIGITAL                0x0400 /* Brooktree Corporation */

#define  WAVE_FORMAT_QDESIGN_MUSIC              0x0450 /* QDesign Corporation */

#define  WAVE_FORMAT_VME_VMPCM                  0x0680 /* AT&T Labs, Inc. */

#define  WAVE_FORMAT_TPC                        0x0681 /* AT&T Labs, Inc. */

#define  WAVE_FORMAT_OLIGSM                     0x1000 /* Ing C. Olivetti & C., S.p.A. */

#define  WAVE_FORMAT_OLIADPCM                   0x1001 /* Ing C. Olivetti & C., S.p.A. */

#define  WAVE_FORMAT_OLICELP                    0x1002 /* Ing C. Olivetti & C., S.p.A. */

#define  WAVE_FORMAT_OLISBC                     0x1003 /* Ing C. Olivetti & C., S.p.A. */

#define  WAVE_FORMAT_OLIOPR                     0x1004 /* Ing C. Olivetti & C., S.p.A. */

#define  WAVE_FORMAT_LH_CODEC                   0x1100 /* Lernout & Hauspie */

#define  WAVE_FORMAT_NORRIS                     0x1400 /* Norris Communications, Inc. */

#define  WAVE_FORMAT_SOUNDSPACE_MUSICOMPRESS    0x1500 /* AT&T Labs, Inc. */

#define  WAVE_FORMAT_MPEG_ADTS_AAC              0x1600 /* Microsoft Corporation */

#define  WAVE_FORMAT_MPEG_RAW_AAC               0x1601 /* Microsoft Corporation */

#define  WAVE_FORMAT_MPEG_LOAS                  0x1602 /* Microsoft Corporation (MPEG-4 Audio Transport Streams (LOAS/LATM) */

#define  WAVE_FORMAT_NOKIA_MPEG_ADTS_AAC        0x1608 /* Microsoft Corporation */

#define  WAVE_FORMAT_NOKIA_MPEG_RAW_AAC         0x1609 /* Microsoft Corporation */

#define  WAVE_FORMAT_VODAFONE_MPEG_ADTS_AAC     0x160A /* Microsoft Corporation */

#define  WAVE_FORMAT_VODAFONE_MPEG_RAW_AAC      0x160B /* Microsoft Corporation */

#define  WAVE_FORMAT_MPEG_HEAAC                 0x1610 /* Microsoft Corporation (MPEG-2 AAC or MPEG-4 HE-AAC v1/v2 streams with any payload (ADTS, ADIF, LOAS/LATM, RAW). Format block includes MP4 AudioSpecificConfig() -- see HEAACWAVEFORMAT below */

#define  WAVE_FORMAT_DVM                        0x2000 /* FAST Multimedia AG */

#define  WAVE_FORMAT_DTS2                       0x2001

 

 


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

ffmpeg sample  (0) 2018.06.20
중복 실행 방지 코드 (Mutex)  (0) 2018.04.18
CString Tokenize  (0) 2017.10.19
[CPP] Windows Service 간단하게 만들기  (0) 2017.10.17
WaitForMultipleObjects  (0) 2017.04.19

CString Tokenize

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

CString Tokenize



문자열을 어떠한 구분자에 의해 나누고 싶을 때

 예를 들어, "6000,A2301BA81301,Sensor1" -> "6000" / "A2301BA81301" / "Sensor1"


1. Tokenize 이용 (.net 함수..6.0에서는 사용을 못 한다.)


CString strFullText = _T("6000,A2301BA81301,Sensor1");

 CString token;

 CString strPortNumber, strName, strSensor;

 int pos = 0;

 int index = 0;


while ((token  = strFullText.Tokenize(_T(","), pos)) != _T(""))

 {

     // 6000

     if(index == 0)

     {

         strPortNumber = token;

         index++;

     }

     // A2301BA81301

     else if(index == 1)

     {

         strName = token;

         index++;

     }

     // Sensor1

     else if(index == 2)

     {

         strSensor = token;

         index++;

     }

 }


2. AfxExtractSubString 이용


CString strFullText = _T("6000,A2301BA81301,Sensor1");

 CString token;

 CString strPortNumber, strName, strSensor;


for( int k=0; k<3; k++ )

 {

     AfxExtractSubString(token, strFullText, k, ',');

     // Port에 정보 넣어준다.

     // 6000

     if(k == 0)

         strPortNumber = token;

     // A2301BA81301

     else if(k == 1)

         strName = token;

     // Sensor1

     else if(k == 2)

         strSensor = token;

 }




출처: http://endlessthirst.tistory.com/418 [세상살이]

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

WaitForMultipleObjects

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

WaitForMultipleObjects function


WaitForMultipleObjects는 뜻 그대로 여러개의 object handle이 지정된 상태나 일정 시간이 지날때까지 기다리는 함수이다. 예를들면 복수개의 thread가 모두 종료되기를 기다릴 때 사용할 수 있다. 사용방법은 다음과 같다.



DWORD WINAPI WaitForMultipleObjects( _In_       DWORD  nCount, _In_ const HANDLE *lpHandles, _In_       BOOL   bWaitAll, _In_       DWORD  dwMilliseconds );



  - nCount : lpHandles에 들어있는 object handle의 갯수이다. 최대 MAXIMUM_WAIT_OBJECTS (64개)만을 지정할 수 있다.
  - lpHandles : 함수가 기다릴 object handle의 배열이다. 이 배열은 서로 다른 종류의 obejct의 handle들이 들어갈 수 있다.
  - bWaitAll : TRUE이면 lpHandles의 모든 handle의 signal을 기다리고, TRUE이면 하나라도 signal이 오면 리턴된다. 후자의 경우 리턴값은 signal을 준 object가 된다.
  - dwMilliSeconds : bWaitAll에 의한 조건이 만족되지 않더라도 이 값에 의한 시간이 흐르면 함수는 리턴된다. 0이라면 즉시 리턴되고, INFINITE이면 무한정 기다린다.




WaitForMultipleObjects function

Waits until one or all of the specified objects are in the signaled state or the time-out interval elapses.

To enter an alertable wait state, use the WaitForMultipleObjectsEx function.

Syntax

DWORD WINAPI WaitForMultipleObjects(
  _In_       DWORD  nCount,
  _In_ const HANDLE *lpHandles,
  _In_       BOOL   bWaitAll,
  _In_       DWORD  dwMilliseconds
);

Parameters

nCount [in]

The number of object handles in the array pointed to by lpHandles. The maximum number of object handles is MAXIMUM_WAIT_OBJECTS. This parameter cannot be zero.

lpHandles [in]

An array of object handles. For a list of the object types whose handles can be specified, see the following Remarks section. The array can contain handles to objects of different types. It may not contain multiple copies of the same handle.

If one of these handles is closed while the wait is still pending, the function's behavior is undefined.

The handles must have the SYNCHRONIZE access right. For more information, see Standard Access Rights.

bWaitAll [in]

If this parameter is TRUE, the function returns when the state of all objects in the lpHandles array is signaled. If FALSE, the function returns when the state of any one of the objects is set to signaled. In the latter case, the return value indicates the object whose state caused the function to return.

dwMilliseconds [in]

The time-out interval, in milliseconds. If a nonzero value is specified, the function waits until the specified objects are signaled or the interval elapses. If dwMilliseconds is zero, the function does not enter a wait state if the specified objects are not signaled; it always returns immediately. If dwMilliseconds is INFINITE, the function will return only when the specified objects are signaled.

Return value

If the function succeeds, the return value indicates the event that caused the function to return. It can be one of the following values. (Note thatWAIT_OBJECT_0 is defined as 0 and WAIT_ABANDONED_0 is defined as 0x00000080L.)

Return code/valueDescription
WAIT_OBJECT_0 to (WAIT_OBJECT_0 +nCount– 1)

If bWaitAll is TRUE, the return value indicates that the state of all specified objects is signaled.

If bWaitAll is FALSE, the return value minus WAIT_OBJECT_0 indicates the lpHandles array index of the object that satisfied the wait. If more than one object became signaled during the call, this is the array index of the signaled object with the smallest index value of all the signaled objects.

WAIT_ABANDONED_0to (WAIT_ABANDONED_0nCount– 1)

If bWaitAll is TRUE, the return value indicates that the state of all specified objects is signaled and at least one of the objects is an abandoned mutex object.

If bWaitAll is FALSE, the return value minus WAIT_ABANDONED_0 indicates the lpHandles array index of an abandoned mutex object that satisfied the wait. Ownership of the mutex object is granted to the calling thread, and the mutex is set to nonsignaled.

If a mutex was protecting persistent state information, you should check it for consistency.

WAIT_TIMEOUT
0x00000102L

The time-out interval elapsed and the conditions specified by the bWaitAll parameter are not satisfied.

WAIT_FAILED
(DWORD)0xFFFFFFFF

The function has failed. To get extended error information, call GetLastError.

 



336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
How do I add my domain name to my computers host file?
Posted by Support, Last modified by Support on 12 September 2013 01:44 PM

Windows

    • Open Notepad and then open the "Hosts" file on your computer. The location of the "Hosts" file is as follows:

      Windows 95/98/Me:  c:\windows\hosts 
      Windows NT/2000/XP Pro:  c:\winnt\system32\drivers\etc\hosts
      Windows XP Home: c:\windows\system32\drivers\etc\hosts
      Windows Vista/7/8: c:\windows\system32\drivers\etc\hosts

      You may need administrator access for Windows NT/2000/XP/Vista/7/8, you can gain this by logging in as an Administrator or by right clicking on Notepad in the start menu and then clicking on Run As Administrator. Then open the file listed above.

      NOTE: Hosts is the name of the hosts file and not another directory name. It does not have an file extension (extensions are the .exe, .txt, .doc, etc. endings to filenames) and so appears to be another directory in the example above.

      This file should be edited with a text editor, such as Notepad, and not a word processor, such as Microsoft Word.

    • Add this line to the Hosts file at the bottom where 0.0.0.0 is the IP address and your-domain-name.com is the domain name.
      0.0.0.0     your-domain-name.com

 

  • Save your changes.
  • Once you are done with this entry you can delete the line from your Hosts file and save it.

    NOTE: Windows users should verify that they are showing extensions for all file types. This will help verify that the Hosts file is named correctly. To reset Windows to show all file extensions, double click on My Computer. Go to View Menu (Win95/98/ME) or Tools Menu (Win2000/XP), and select Folder Options. Click the View tab. In the Files and Folders section, DESELECT (uncheck) the item named "Hide file extensions for known file types". Click Apply, and then click OK.



https://support.aiso.net/index.php?/Knowledgebase/Article/View/240/2/how-do-i-add-my-domain-name-to-my-computers-host-file

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

[CPP] Windows Service 간단하게 만들기  (0) 2017.10.17
WaitForMultipleObjects  (0) 2017.04.19
[VS2013] 힙이 손상되었습니다.  (0) 2017.04.05
Visual Studio 2013 갑자기 느려질때  (0) 2017.04.04
AES Block cipher modes  (0) 2017.03.29

[VS2013] 힙이 손상되었습니다.

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

[VS2013] 힙이 손상되었습니다.



프로그램이 사용하던 메모리를 해제한 후에 다음과 같이 에러가 발생하는 경우



처음에 메모리 할당시 적절한 크기를 할당하지 못하여 발생하는 경우가 있다.




최고 malloc 시 제대로 크기 계산을 못하여 



해당 메모리를 해제 할때 다음과 같은 에러가 발생 함.











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

Visual Studio 2013 갑자기 느려질때




Microsoft SQL Server 를 지우면서


관련 프로그램을 모두 지웠더니


Visual Studio 가 엄청 느려졌다





재설치를 하려고 보니





다음과 같은 에러 발생



Microsoft SQL Server Compact 4.0


https://www.microsoft.com/ko-kr/download/details.aspx?id=17876



를 설치하고 나니 원래의 속도로 작동 됨.



AES Block cipher modes

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

AES Block cipher modes




Electronic Codebook (ECB)



Cipher Block Chaining (CBC)





Propagating Cipher Block Chaining (PCBC)




Cipher Feedback (CFB)




Counter (CTR)






Output Feedback (OFB)







출처 : https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation










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


1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(518,5): error MSB8008: 지정된 플랫폼 도구 집합(v120)이 설치되지 않았거나 올바르지 않습니다. 지원되는 플랫폼 도구 집합 값이 선택되었는지 확인하십시오.







프로젝트를 Visual Studio 2013 에서 빌드를 하다가


Visual Studio 2010 에서 빌드를 시도하니



이렇게 에러가 발생한다.










플랫폼 도구 집합이 빌드할 Visual Studio와 버전이 맞지 않다










플랫폼 도구 집합을 <부모 또는 프로젝트 기본값에서 상속> 으로 바꾸면 잘 돌아간다.












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

Visual Studio 2013 갑자기 느려질때  (0) 2017.04.04
AES Block cipher modes  (0) 2017.03.29
[jsoncpp] getList Names  (0) 2017.02.06
임계영역 설정 Ctirical Section  (0) 2016.11.07
Jsoncpp 주의 사항  (0) 2016.11.01

[jsoncpp] getList Names

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


"List" : {

         "value1" : "10.1.1.1",

         "value2" : "0.0.0.0"

      }




위의 경우에서 "10.1.1.1" , "0,0,0,0" 을 얻을 때에는,




for (auto itr : configuration_value.get("List", ""))

{

char* buf = (char*)malloc(BUFSIZE);

try{

sprintf_s(buf, BUFSIZE, "%s", itr.asString().c_str());

}

   }




위의 경우에서 "value1" , "value2" 을 얻을 때에는,



for ( auto const& id : configuration_value.get("List", "").getMemberNames() ) {

std::cout << id << std::endl;

}