sudoku solve with C

//#include "stdafx.h"

#include<stdio.h>

FILE *fin=fopen("input.txt", "r");
FILE *fout=fopen("output.txt", "w");

void back(int point);

int data[9][9];
int row_chk[9][9], col_chk[10][10];
int square_num[9][9], square_chk[9][9], square_cnt;
int zero_point[81][2], zero_cnt;

int main(){
    int i, j, k, l;
    for(i=0; i<9; i+=3){
        for(j=0; j<9; j+=3){
            for(k=i; k<i+3; k++){
                for(l=j; l<j+3; l++){
                    square_num[k][l] = square_cnt; // 3*3 square array
                }
            }
            square_cnt++;
        }
    }
    for(i=0;i<9;i++)
    {
        for(j=0;j<9;j++)
            printf("%d",square_num[i][j]);
        printf("\n");
    }        
    for(i=0; i<9; i++){
        for(j=0; j<9; j++){
            fscanf(fin, "%d", &data[i][j]); // input data[i][j]
            if(data[i][j]){
                row_chk[i][data[i][j]]=1; // checking row data[i][j]
                col_chk[j][data[i][j]]=1; // checking col data[i][j]
                square_chk[square_num[i][j]][data[i][j]]=1; // checking square data[i][j]
            }
            else{
                zero_point[zero_cnt][0] = i; // count 0 and save 0's row
                zero_point[zero_cnt++][1] = j; // and save 0's col too
            }
        }
    }
    back(0); // start backtracking
    fclose(fin);
    fclose(fout);
    return 0;
}
void back(int point)
{
    printf("back tracking %d is started\n",point);
    int i, j;
    int x, y;
    if(point == zero_cnt){ // 0 is all filled
        for(i=0; i<9; i++){
            for(j=0; j<9; j++){
                fprintf(fout, "%d ", data[i][j]); // printing!!
            }
            fprintf(fout, "\n");
        }
        exit(0); // and teminate program
    }
    x = zero_point[point][0]; // (point+1)th 0's row (array is start from 0, so +1th is just "point")
    y = zero_point[point][1]; // (point+1)th 0's col
    for(i=1; i<=9; i++){
        if(!row_chk[x][i-1] && !col_chk[y][i-1] && !square_chk[square_num[x][y]][i-1]){ // check data[x][y] is already used
            row_chk[x][i-1] = col_chk[y][i-1] = square_chk[square_num[x][y]][i-1] = 1; // checking data[x][y] is used
            data[x][y] = i; // and input i at data[x][y]
            back(point + 1); // we have more work...
            data[x][y] = row_chk[x][i-1] = col_chk[y][i-1] = square_chk[square_num[x][y]][i-1] = 0; // if "back() is failed, init cell
        }
    }
    printf("back tracking %d is ends\n",point);
}

extract Resouce to file

BOOL save_payload()
{
	char *filepath=".\\filename.ext";
	DWORD dwResSize,dwByteWrite;
	HRSRC hResource=0;
	HGLOBAL hResData=0;
	LPVOID lpdata=NULL;
	HANDLE hFile=NULL;

	hResource=FindResource(NULL,MAKEINTRESOURCE(IDR_RESOURCE_NAME),"exe");
	dwResSize=SizeofResource(NULL,hResource);
	hResData=LoadResource(NULL,hResource);
	if(hResData ==NULL || dwResSize ==0)
		return false;
	lpdata=LockResource(hResData);
	hFile=CreateFile(filepath,GENERIC_WRITE,3,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_HIDDEN,NULL);
	if(hFile==INVALID_HANDLE_VALUE)
		return false;
	SetFilePointer(hFile,0,0,FILE_BEGIN);
	WriteFile(hFile,(LPBYTE)lpdata,dwResSize,&dwByteWrite,NULL);
	CloseHandle(hFile);
	MAKEINTRESOURCE(IDR_RESOURCE_NAME);
	return true;
}

Virtual Keyboard On/Off toggle for WinCE

// KeyBoard.cpp : 응용 프로그램에 대한 진입점을 정의합니다.
// Code writed by Kjwon15
// (Kjwon15's K is Capital K)

#include "stdafx.h"
#include "KeyBoard.h"

//#include <ShellAPI.h>

#define MAX_LOADSTRING 100

// 전역 변수:
HINSTANCE			g_hInst;			// 현재 인스턴스입니다.
HWND				g_hWndCommandBar;	// 명령 모음 핸들입니다.


// 이 코드 모듈에 들어 있는 함수의 정방향 선언입니다.
ATOM			MyRegisterClass(HINSTANCE, LPTSTR);
BOOL			InitInstance(HINSTANCE, int);
LRESULT CALLBACK	WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK	About(HWND, UINT, WPARAM, LPARAM);

BOOL CheckSip()
{
	HWND hWnd=NULL;
	for(int i=0;i<3&&hWnd==NULL;i++)
	{
		hWnd=FindWindow(_T("SipWndClass"),NULL);
		Sleep(150);
	}
	if(hWnd==NULL)
		return FALSE;
	
	LONG winstyle=GetWindowLong(hWnd,GWL_STYLE);
	if((winstyle&WS_VISIBLE) == WS_VISIBLE)
		return TRUE;
	else
		return FALSE;
}
void ShowSip(BOOL show)
{
	HWND hWnd=NULL;
	for(int i=0;i<3&&hWnd==NULL;i++)
	{
		hWnd=FindWindow(_T("SipWndClass"),NULL);
		Sleep(150);
	}
	if(hWnd==NULL)
		return;

	if(show==TRUE)
		ShowWindow(hWnd,SW_SHOW);
	else
		ShowWindow(hWnd,SW_HIDE);
}


int WINAPI WinMain(HINSTANCE hInstance,
                   HINSTANCE hPrevInstance,
                   LPTSTR    lpCmdLine,
                   int       nCmdShow)
{
	ShowSip(!CheckSip());
	return 0;
}