Category (302) 썸네일형 리스트형 [C++/CLI] #pragma managed, #pragma unmanaged, Windows API #include #include void foo(); #pragma managed #pragma comment(lib, "user32.lib") using namespace System; int main(array ^args) { // Call Managed Code Console::WriteLine(L"Managed Code"); // Call Windows API Code ::MessageBox(NULL, _T("Win32 API in Managed Area"), _T("Hello"), MB_OK); // Call Unmanaged Code foo(); return EXIT_SUCCESS; } #pragma unmanaged using namespace std; void foo() { cout GdiPlus::Image to CBitmap conversion http://www.codeguru.com/forum/showthread.php?t=344315 Draw the image in a memory device context in which the CBitmap object is selected. Like in next example: using namespace Gdiplus; Image* pImage = Image::FromFile(L"c:\\test.gif"); Status status = pImage->GetLastStatus(); if(Ok == status) { CDC dc; dc.CreateCompatibleDC(NULL); CBitmap bitmap; bitmap.CreateCompatibleBitmap(&dc, pImage->GetWidth.. [C++] 16진수 문자열을 2진수 문자열로 변환 CString strhex = _T("8CEF"); _tprintf(_T("hex: %s \n"), (LPCTSTR)strhex); unsigned long dec = _tcstoul(strhex, NULL, 16); _tprintf(_T("dec: %d \n"), dec); CString bin; CString buf; TCHAR mod[2]; do { _ultot(dec % 2, mod, 2); buf = mod; buf += bin; bin = buf; } while (dec = dec / 2); _tprintf(_T("bin: %s \n"), (LPCTSTR)bin); CString strhex = _T("8CEF"); _tprintf(_T("hex: %s \n"), (LPCTSTR)strhex).. Detours : DetouredRegistry 2009-04-14 오후 2:59:03 Registry Key Handle로 Registry Key Path 얻는데 성공했다. ZwQueryKey 함수를 Dynamic Linking 해서 사용한다. RegSetValueEx 함수만 후킹했다. 2009-04-14 오후 9:20:40 2009-04-15 오후 10:48:46 RegQueryValueEx, RegSetValueEx 각각 Hooking 한다. RegCreateKeyEx, RegOpenKeyEx 함수가 RegGetKeyPath 함수 call 할 때 문제가 있어서 주석처리했다. 2009-04-18 오후 4:37:57 출력파일에서 한글이 깨지는 문제 수정 _wsetlocale(LC_ALL, L"korean"); 사용함. 2009-04-20 오전 7:1.. Detours : DetouredSample 2009-04-13 오후 8:39:47 Detours 2.1 Express 216 , VS2005 withdll 포함 모든 프로젝트를 /MT 옵션으로 컴파일함 __declspec(dllexport) VOID WINAPI TimedSleep(DWORD dwMilliseconds) // Watch Out!!! { DWORD dwBeg = GetTickCount(); TrueSleep(dwMilliseconds); DWORD dwEnd = GetTickCount(); InterlockedExchangeAdd(&dwSlept, dwEnd - dwBeg); printf("Slept %d ticks.\n", dwSlept); fflush(stdout); } Mircrosoft Detours 2.1 Build 216.. OSD.BeeTextOut PowerPro Plug-in bee.dll 과 함께 사용하는 프로그램입니다. #include "stdafx.h"#include "CmdLineParser.h" void WINAPI initializeDefault();void WINAPI parseCommandLine();COLORREF WINAPI parseColor(CString); HINSTANCE hInstanceMain; int cxScreen; // The width of the screen, in pixels.int cyScreen; // The height of the screen, in pixels. CString m; // Notice Messageint x; // x-coordinate of starting positionint y;.. PowerPro Plugin bee.dll bee.dll is an OSD + File/Color/Font Dialog plugin for PowerPro.Copy bee.dll into the PowerPro plugin folder.Copy *.exe into the PowerPro installation folder. OSD.BeeNotice PowerPro Plug-in Project 이다 bee.dll is an OSD + File/Color/Font Dialog plugin for PowerPro.Copy bee.dll into the PowerPro plugin folder.Copy *.exe into the PowerPro installation folder. 이전 1 ··· 8 9 10 11 12 13 14 ··· 38 다음