资源简介
WINCE的SD卡程序可实现读写的代码 WINCE的SD卡程序可实现读写的代码

代码片段和文件信息
// SDTest.cpp : Defines the entry point for the application.
//
#include “stdafx.h“
#include “SDTest.h“
#include
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // The current instance
HWND hwndCB; // The command bar handle
// Forward declarations of functions included in this code module:
ATOM MyRegisterClass (HINSTANCE LPTSTR);
BOOL InitInstance (HINSTANCE int);
LRESULT CALLBACK WndProc (HWND UINT WPARAM LPARAM);
LRESULT CALLBACK About (HWND UINT WPARAM LPARAM);
HANDLE g_hFile ;
DWORD g_dwNumber ;
BYTE* g_buffer ;
int g_length ;
BOOL bRet ;
int WINAPI WinMain( HINSTANCE hInstance
HINSTANCE hPrevInstance
LPTSTR lpCmdLine
int nCmdShow)
{
MSG msg;
HACCEL hAccelTable;
// Perform application initialization:
if (!InitInstance (hInstance nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hInstance (LPCTSTR)IDC_SDTEST);
g_hFile = NULL ;
g_buffer = NULL ;
g_buffer = (unsigned char *)malloc(64) ;
if ( NULL == g_buffer )
RETAILMSG(1(TEXT(“Malloc failed\r\n“)));
// Main message loop:
while (GetMessage(&msg NULL 0 0))
{
if (!TranslateAccelerator(msg.hwnd hAccelTable &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
// COMMENTS:
//
// It is important to call this function so that the application
// will get ‘well formed‘ small icons associated with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance LPTSTR szWindowClass)
{
WNDCLASS wc;
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = (WNDPROC) WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(hInstance MAKEINTRESOURCE(IDI_SDTEST));
wc.hCursor = 0;
wc.hbrBackground = (HBRUSH) GetStockobject(WHITE_BRUSH);
wc.lpszMenuName = 0;
wc.lpszClassName = szWindowClass;
return RegisterClass(&wc);
}
//
// FUNCTION: InitInstance(HANDLE int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance int nCmdShow)
{
HWND hWnd;
TCHAR sztitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // The window class name
hInst = hInstance; // Store instance handle in our global variable
// Initialize global strings
LoadString(hInstance IDC_SDTEST szWindowClass MAX_LOADSTRING);
MyRegisterClass(hInstance szWindowClass);
LoadString(hInstance IDS_APP_title sztitle MAX_LOADSTRING);
hWnd = CreateWindow(szWindowClass sztitle WS_VISIBLE
CW_USEDEFAULT CW_USEDEFAULT CW_USEDEFAULT CW_USEDEFAULT NULL NULL hInstan
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 799 2005-12-22 11:48 SDTest\newres.h
....... 2049 2005-12-22 11:48 SDTest\ReadMe.txt
....... 865 2005-12-22 11:52 SDTest\resource.h
文件 196560 2008-09-24 07:28 SDTest\SDTest.aps
....... 6554 2005-12-22 14:26 SDTest\SDTest.cpp
....... 326 2005-12-22 11:48 SDTest\SDTest.h
....... 1078 2005-12-22 11:48 SDTest\SDTest.ico
....... 3629 2005-12-22 11:52 SDTest\SDTest.rc
文件 58368 2008-09-24 07:36 SDTest\SDTest.vcb
....... 1382 2005-12-22 11:53 SDTest\SDTest.vcl
文件 48640 2008-09-24 07:36 SDTest\SDTest.vco
....... 11890 2005-12-22 11:48 SDTest\SDTest.vcp
....... 540 2005-12-22 11:48 SDTest\SDTest.vcw
....... 293 2005-12-22 11:48 SDTest\StdAfx.cpp
....... 831 2005-12-22 11:48 SDTest\StdAfx.h
目录 0 2008-09-24 07:27 SDTest\ARMV4IRel
目录 0 2008-09-24 07:36 SDTest
----------- --------- ---------- ----- ----
333804 17
相关资源
- Scratch源码
- E4A无障碍跨程序操作类库(带源码、
- 设备管理系统源码
- 安卓wifi直连app源码
- 我的世界源码(易语言版)
- labview编程软件滤波器以及编写程序设
- 我的界面(visual foxpro)源码
- 易语言:一键cf基址源码
- The Secret Path 3D 3D魔方迷宫[源码][scra
- scratch垃圾分类源码(最终版本).sb
- SD卡,TF卡修复工具 能够恢复SD卡的真
- 安卓QQ6.71协议源码易语言,qq协议源码
- 编译原理实验工具及参考源码(lex&
- E盾偷后台工具源码
- UNIX/LINUX编程实践教程的源码
- 十以内加减法练习 powerbuilder源码
- 农场开发项目
- OCR源码
- PLC上位机编程软件
- 用foobar2000听google音乐[更新一下]
- 学生信息管理系统源码
- WinCE下CP210x的驱动程序
- 用VC 编写的仿QQ聊天室程序源代码
- 毕业论文之温度传感器DS18B20(源码
- 可自定义导航网站源码
- 栅栏填充算法源码(VC)
- msp430F149操作红外接收模块源码
- [免费]图像识别c 源码
- 51模拟SPI读写SD卡(包括Fat和Fat32文件
- 周易排盘源码
评论
共有 条评论