Search

'Programming/C,CPP,CS'에 해당되는 글 111건

  1. 2016.11.07 임계영역 설정 Ctirical Section
  2. 2016.11.01 Jsoncpp 주의 사항
  3. 2016.10.28 OpenSSL x86 Build
  4. 2016.10.14 pjproject-2.5.5
  5. 2016.10.12 pjsip Building for Microsoft Windows 1
  6. 2016.10.11 oRTP
  7. 2016.09.27 log4cxx dll build 1
  8. 2016.09.27 OpenSSL x64 Build
  9. 2016.09.19 debug_crt_heap table
  10. 2016.09.19 Programming Memory Error Magic Number

임계영역 설정 Ctirical Section

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

임계영역 설정 Ctirical Section








CreateMutex
Critical Section Objects
DeleteCriticalSection
EnterCriticalSection
InitializeCriticalSectionAndSpinCount
LeaveCriticalSection
Synchronization Functions
TryEnterCriticalSection






void WINAPI InitializeCriticalSection( LPCRITICAL_SECTION lpCriticalSection );

void WINAPI DeleteCriticalSection( LPCRITICAL_SECTION lpCriticalSection );

void WINAPI EnterCriticalSection( LPCRITICAL_SECTION lpCriticalSection );

void WINAPI LeaveCriticalSection( LPCRITICAL_SECTION lpCriticalSection );

BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION lpCriticalSection );








1. 임계영역 변수선언

CRITICAL_SECTION cs;


2. 초기화

InitializeCriticalSection( &cs );


3. 사용


임계영역 진입

EnterCriticalSection( &cs );


임계영역 탈출

LeaveCriticalSection( &cs );


4. 삭제

DeleteCriticalSection( &cs );






Jsoncpp 주의 사항

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





Json::Value  retrieve_list= NULL;



둘은 다르다.


Json::Value  retrieve_list;

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

[jsoncpp] getList Names  (0) 2017.02.06
임계영역 설정 Ctirical Section  (0) 2016.11.07
OpenSSL x86 Build  (0) 2016.10.28
pjproject-2.5.5  (0) 2016.10.14
pjsip Building for Microsoft Windows  (1) 2016.10.12

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

pjproject-2.5.5

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

pjproject-2.5.5





pjproject-2.5.5\pjsip-apps\bin\samples\i386-win32-vc8-debug



아주 많은 sample 이 있습니다.






정말 많은 기능이 있네요...................................




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

Jsoncpp 주의 사항  (0) 2016.11.01
OpenSSL x86 Build  (0) 2016.10.28
pjsip Building for Microsoft Windows  (1) 2016.10.12
oRTP  (0) 2016.10.11
log4cxx dll build  (1) 2016.09.27

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

oRTP

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

oRTP 참고자료 : 



http://blog.daum.net/knightofelf/184



http://download.savannah.gnu.org/releases/linphone/ortp/docs/


http://www.linphone.org/eng/documentation/dev/ortp.html


http://icapeople.epfl.ch/thiran/CoursED/RTP.pdf


http://vip.cs.utsa.edu/classes/cs6593f2002/laboratories/rtpInfo/Example1.html


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

pjproject-2.5.5  (0) 2016.10.14
pjsip Building for Microsoft Windows  (1) 2016.10.12
log4cxx dll build  (1) 2016.09.27
OpenSSL x64 Build  (0) 2016.09.27
debug_crt_heap table  (0) 2016.09.19

log4cxx dll build

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

log4cxx dll build




log4cxx.zip


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

pjsip Building for Microsoft Windows  (1) 2016.10.12
oRTP  (0) 2016.10.11
OpenSSL x64 Build  (0) 2016.09.27
debug_crt_heap table  (0) 2016.09.19
Programming Memory Error Magic Number  (0) 2016.09.19

OpenSSL x64 Build

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

OpenSSL x64 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 x64 Native Tools Command Prompt





change directory to D:\openssl-1.0.2j


3. Setting Target openssldir


perl Configure VC-WIN64A --openssldir=C:\OpenSSL-x64 no-shared no-asm threads





4. Setting complie enviroment


ms\do_win64a.bat








5. Complie


nmake -f ms\ntdll.mak install





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

oRTP  (0) 2016.10.11
log4cxx dll build  (1) 2016.09.27
debug_crt_heap table  (0) 2016.09.19
Programming Memory Error Magic Number  (0) 2016.09.19
openssl error LNK2019: 외부 기호 에러  (0) 2016.09.19

debug_crt_heap table

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


http://www.nobugs.org/developer/win32/debug_crt_heap.html#table




Address  Offset After HeapAlloc() After malloc() During free() After HeapFree() Comments
0x00320FD8  -40    0x01090009    0x01090009     0x01090009    0x0109005A     Win32 heap info
0x00320FDC  -36    0x01090009    0x00180700     0x01090009    0x00180400     Win32 heap info
0x00320FE0  -32    0xBAADF00D    0x00320798     0xDDDDDDDD    0x00320448     Ptr to next CRT heap block (allocated earlier in time)
0x00320FE4  -28    0xBAADF00D    0x00000000     0xDDDDDDDD    0x00320448     Ptr to prev CRT heap block (allocated later in time)
0x00320FE8  -24    0xBAADF00D    0x00000000     0xDDDDDDDD    0xFEEEFEEE     Filename of malloc() call
0x00320FEC  -20    0xBAADF00D    0x00000000     0xDDDDDDDD    0xFEEEFEEE     Line number of malloc() call
0x00320FF0  -16    0xBAADF00D    0x00000008     0xDDDDDDDD    0xFEEEFEEE     Number of bytes to malloc()
0x00320FF4  -12    0xBAADF00D    0x00000001     0xDDDDDDDD    0xFEEEFEEE     Type (0=Freed, 1=Normal, 2=CRT use, etc)
0x00320FF8  -8     0xBAADF00D    0x00000031     0xDDDDDDDD    0xFEEEFEEE     Request #, increases from 0
0x00320FFC  -4     0xBAADF00D    0xFDFDFDFD     0xDDDDDDDD    0xFEEEFEEE     No mans land
0x00321000  +0     0xBAADF00D    0xCDCDCDCD     0xDDDDDDDD    0xFEEEFEEE     The 8 bytes you wanted
0x00321004  +4     0xBAADF00D    0xCDCDCDCD     0xDDDDDDDD    0xFEEEFEEE     The 8 bytes you wanted
0x00321008  +8     0xBAADF00D    0xFDFDFDFD     0xDDDDDDDD    0xFEEEFEEE     No mans land
0x0032100C  +12    0xBAADF00D    0xBAADF00D     0xDDDDDDDD    0xFEEEFEEE     Win32 heap allocations are rounded up to 16 bytes
0x00321010  +16    0xABABABAB    0xABABABAB     0xABABABAB    0xFEEEFEEE     Win32 heap bookkeeping
0x00321014  +20    0xABABABAB    0xABABABAB     0xABABABAB    0xFEEEFEEE     Win32 heap bookkeeping
0x00321018  +24    0x00000010    0x00000010     0x00000010    0xFEEEFEEE     Win32 heap bookkeeping
0x0032101C  +28    0x00000000    0x00000000     0x00000000    0xFEEEFEEE     Win32 heap bookkeeping
0x00321020  +32    0x00090051    0x00090051     0x00090051    0xFEEEFEEE     Win32 heap bookkeeping
0x00321024  +36    0xFEEE0400    0xFEEE0400     0xFEEE0400    0xFEEEFEEE     Win32 heap bookkeeping
0x00321028  +40    0x00320400    0x00320400     0x00320400    0xFEEEFEEE     Win32 heap bookkeeping
0x0032102C  +44    0x00320400    0x00320400     0x00320400    0xFEEEFEEE     Win32 heap bookkeeping


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

log4cxx dll build  (1) 2016.09.27
OpenSSL x64 Build  (0) 2016.09.27
Programming Memory Error Magic Number  (0) 2016.09.19
openssl error LNK2019: 외부 기호 에러  (0) 2016.09.19
openssl AES encrypt (AES_ctr128_encrypt)  (0) 2016.09.19

Programming Memory Error Magic Number

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

Programming Memory Error Magic Number


from: 

https://en.wikipedia.org/wiki/Magic_number_(programming)

http://stackoverflow.com/questions/127386/in-visual-studio-c-what-are-the-memory-allocation-representations






Mainly Used Code


* 0xABABABAB : Used by Microsoft's HeapAlloc() to mark "no man's land" guard bytes after allocated heap memory
* 0xABADCAFE : A startup to this value to initialize all free memory to catch errant pointers
* 0xBAADF00D : Used by Microsoft's LocalAlloc(LMEM_FIXED) to mark uninitialised allocated heap memory
* 0xBADCAB1E : Error Code returned to the Microsoft eVC debugger when connection is severed to the debugger
* 0xBEEFCACE : Used by Microsoft .NET as a magic number in resource files
* 0xCCCCCCCC : Used by Microsoft's C++ debugging runtime library to mark uninitialised stack memory
* 0xCDCDCDCD : Used by Microsoft's C++ debugging runtime library to mark uninitialised heap memory
* 0xDEADDEAD : A Microsoft Windows STOP Error code used when the user manually initiates the crash.
* 0xFDFDFDFD : Used by Microsoft's C++ debugging heap to mark "no man's land" guard bytes before and after allocated heap memory
* 0xFEEEFEEE : Used by Microsoft's HeapFree() to mark freed heap memory





CodeDescription
..FACADE"Facade", Used by a number of RTOSes
1BADB002"1 bad boot"Multiboot header magic number[16]
8BADF00D"Ate bad food", Indicates that an Apple iOS application has been terminated because a watchdog timeout occurred.[17]
A5A5A5A5Used in embedded development because the alternating bit pattern (1010 0101) creates an easily recognized pattern on oscilloscopes andlogic analyzers.
A5Used in FreeBSD's PHK malloc(3) for debugging when /etc/malloc.conf is symlinked to "-J" to initialize all newly allocated memory as this value is not a NULL pointer or ASCII NUL character. (It may be a play on Russian "опять", pronounced "a piat'" which is A5 read aloud, meaning "again")[citation needed]
ABABABABUsed by Microsoft's debug HeapAlloc() to mark "no man's land" guard bytes after allocated heap memory.[18]
ABADBABE"A bad babe", Used by Apple as the "Boot Zero Block" magic number
ABBABABE"ABBA babe", used by Driver Parallel Lines memory heap.
ABADCAFE"A bad cafe", Used to initialize all unallocated memory (Mungwall, AmigaOS)
0DEFACED"Defaced", Required by Microsoft's Hyper-V hypervisor to be used by Linux guests as their "guest signature", after changing from original 0xB16B00B5 ("Big Boobs")
BAADF00D"Bad food", Used by Microsoft's debug HeapAlloc() to mark uninitialized allocated heap memory[18]
BAAAAAAD"Baaaaaad", Indicates that the Apple iOS log is a stackshot of the entire system, not a crash report[17]
BAD22222"Bad too repeatedly", Indicates that an Apple iOS VoIP application has been terminated because it resumed too frequently[17]
BADBADBADBAD"Bad bad bad bad"Burroughs large systems "uninitialized" memory (48-bit words)
BADC0FFEE0DDF00D"Bad coffee odd food", Used on IBM RS/6000 64-bit systems to indicate uninitialized CPU registers
BADDCAFE"Bad cafe", On Sun MicrosystemsSolaris, marks uninitialised kernel memory (KMEM_UNINITIALIZED_PATTERN)
BBADBEEF"Bad beef", Used in WebKit[clarification needed]
BEEFCACE"Beef cake", Used by Microsoft .NET as a magic number in resource files
C00010FF"Cool off", Indicates Apple iOS app was killed by the operating system in response to a thermal event[17]
CAFEBABE"Cafe babe", Used by Java for class files
CAFED00D"Cafe dude", Used by Java for their pack200 compression
CAFEFEED"Cafe feed", Used by Sun MicrosystemsSolaris debugging kernel to mark kmemfree() memory
CCCCCCCCUsed by Microsoft's C++ debugging runtime library and many DOS environments to mark uninitialized stack memory. CC resembles the opcode of the INT 3 debug breakpoint interrupt on x86 processors.
CDCDCDCDUsed by Microsoft's C/C++ debug malloc() function to mark uninitialized heap memory, usually returned from HeapAlloc()[18]
D15EA5E"Disease", Used as a flag to indicate regular boot on the Nintendo GameCube and Wii consoles
DDDDDDDDUsed by MicroQuill's SmartHeap and Microsoft's C/C++ debug free() function to mark freed heap memory[18]
DEAD10CC"Dead lock", Indicates that an Apple iOS application has been terminated because it held on to a system resource while running in the background[17]
DEADBABE"Dead babe", Used at the start of Silicon GraphicsIRIX arena files
DEADBEEF"Dead beef", Famously used on IBM systems such as the RS/6000, also used in the original Mac OS operating systemsOPENSTEP Enterprise, and the Commodore Amiga. On Sun MicrosystemsSolaris, marks freed kernel memory (KMEM_FREE_PATTERN)
DEADCAFE"Dead cafe", Used by Microsoft .NET as an error number in DLLs
DEADC0DE"Dead code", Used as a marker in OpenWRT firmware to signify the beginning of the to-be created jffs2 file system at the end of the static firmware
DEADFA11"Dead fail", Indicates that an Apple iOS application has been force quit by the user[17]
DEADF00D"Dead food", Used by Mungwall on the Commodore Amiga to mark allocated but uninitialized memory [19]
DEFEC8ED"Defecated", Used for OpenSolaris core dumps
EBEBEBEBFrom MicroQuill's SmartHeap
FADEDEAD"Fade dead", Comes at the end to identify every AppleScript script
FDFDFDFDUsed by Microsoft's C/C++ debug malloc() function to mark "no man's land" guard bytes before and after allocated heap memory[18]
FEE1DEAD"Feel dead", Used by Linux reboot() syscall
FEEDFACE"Feed face", Seen in PowerPC Mach-O binaries on Apple Inc.'s Mac OS X platform. On Sun MicrosystemsSolaris, marks the red zone (KMEM_REDZONE_PATTERN)

Used by VLC player and some IP cameras in RTP/RTCP protocol, VLC player sends four bytes in the order of the endianness of the system. Some IP cameras expecting that the player sends this magic number and do not start the stream if no magic number received.

FEEEFEEE"Fee fee", Used by Microsoft's debug HeapFree() to mark freed heap memory. Some nearby internal bookkeeping values may have the high word set to FEEE as well.[18]


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

OpenSSL x64 Build  (0) 2016.09.27
debug_crt_heap table  (0) 2016.09.19
openssl error LNK2019: 외부 기호 에러  (0) 2016.09.19
openssl AES encrypt (AES_ctr128_encrypt)  (0) 2016.09.19
openssl AES Mode : ECB, CBC, CFB, OFB, CTR  (0) 2016.09.05