일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- RNN
- Splunk
- SPL
- 알고리즘
- Lotto
- imread
- pycharm
- dataframe
- mean
- ipad
- Numpy
- pandas
- Python
- DFS
- pip
- keras
- LSTM
- javascript
- E-P1
- index
- install
- 삼성소프트웨어멤버십
- GitHub
- GT-S80
- mariadb
- synology
- Series
- SciPy
- CNN
- Button
- Today
- Total
목록공부/API (24)
잠토의 잠망경
#undef UNICODE #include #include int main(void) { //파일을 생성하였다. HANDLE hFile = CreateFileA( "C:\\love01.txt",//파일의 이름 GENERIC_READ|GENERIC_WRITE,//접근할 타입 0,//공유모드 NULL, //always CREATE_ALWAYS, //파일을 언제나 새로 만든다. FILE_ATTRIBUTE_NORMAL, //파일의 속성정의 NULL//always ); //메모리 멥을 만들어주었다. 크기를 10K 바이트로 하였다. HANDLE hFileMap=CreateFileMapping( hFile, //파일의 핸들 CreateFile() NULL,//always PAGE_READWRITE,//해당 페이지의 ..
#undef UNICODE #include #include int main(void) { //파일의 핸들을 얻어온다. HANDLE hFile = CreateFileA("c:\\love.txt",GENERIC_READ, 0,NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL); if(NULL==hFile) printf("error\n"); //파일의 핸들을 기반으로 memorymapping을 한다. HANDLE hFileMaped=CreateFileMapping(hFile,NULL,PAGE_READONLY,0,0,NULL); if(NULL==hFileMaped) printf("error\n"); //파일 멥을 메모리에 올리자. char* pfile=(char*)MapVie..
아래의 두 함수 GetSystemDirectoryA와 GetWindowsDirectoryA를 사용해야 한다. #include #include int main(void) { char szSystemDirectoryPath[100]={0,}; //시스템 버버를 저장하기 위한 버퍼 char szDllPath[100]={0,}; // Dll의 경로를 저장하기 위한 버퍼이다. char szWindowsDirectoryPath[100]={0,}; UINT ret = GetSystemDirectoryA(szSystemDirectoryPath,100); // Ansi기준으로 작성된 함수이다. unicode 방식으로 하면 잘못된 결과가 도출된다. sprintf(szDllPath, "%s\\WSock32.dll",szSy..
코드 입니다. LRESULT FAR WINAPI WndProc(HWND hwnd, UINT message, UINT wParam, LONG lParam) { HDC hdc; PAINTSTRUCT ps; RECT rect; HWND hiwnd; //실행시키고자하는 program의 이름이다. 절대경로 상대경로 모두 사용가능 TCHAR *command= TEXT("c:\\ForMobileToKimGM"); HWND child; switch (message) { case WM_PAINT: hdc=BeginPaint(hwnd, &ps); GetClientRect(hwnd,&rect); DrawText(hdc,TEXT("hello, windows!"), -1, &rect, DT_SINGLELINE|DT_CENTER..
마우스 커서를 옮기는 API SetCursorPos(x,y); 마우스 커서의 현재 포지션 API POINT pt; GetCursorPos(&pt); 현재 화면의 해상도를 알아오는 함수 int nScreenWidth = GetSystemMetrics(SM_CXSCREEN); int nScreenHeight = GetSystemMetrics(SM_CYSCREEN);
BMP 이미지를 PNG로 변환시키는 루틴 VS 2008을 사용하여야 작동합니다. ㅡㅡ; 그지같은 VS6.0 #include #include #include #include #include #define CAPTUREBLT (DWORD)0x40000000 /* Include layered windows */ #define false 0 void CaptureScreen(); void SaveBitmap(char *szFilename,HBITMAP hBitmap); int main(void) { CaptureScreen(); LPCTSTR filename=_T("c:\\test.bmp"); LPCTSTR changefilename=_T("c:\\test01.png"); CImage myImage; myIma..
API hooking for hotpatchable operating systems 간단한 hooking skill http://www.codeproject.com/KB/winsdk/0xF9EB_Hooking.aspx
Win32 API에서는 File의 내용을 읽고 쓸때 CreateFile을 우선 사용하여 File의 HANDLE을 얻게 된다. 이때 CreateFile() 함수의 첫인자인 FileName은 파일의 완전경로를 의미하며 이 완전경로는 C:\\를 기준으로 하는 절대 경로 이다. 그리고 \\을 붙여서 쓸경우 C:을 쓴것과 동일한 효과를 갖는다. file의 위치는 c:\에 있다. ReadFile은 보는 바와 같이 정의 되어 있다. WriteFile은 ReadFile과 거의 같은 느낌이다. 이 글은 스프링노트에서 작성되었습니다.