资源简介
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
相关资源
- ymodem协议源码
- TI MSP430 SD卡 FAT16文件系统源码
- MT4本地跟单系统包含源码
- 型材套料源码,可以直接使用。
- Linux下的飞鸽传书源码(ipmsg、聊天、
- 51单片机A4988驱动源码
- Linux课程设计多线程聊天,有图形界面
- 把bin填充0xFF到指定大小(含源码)
- OpenGL透视投影小程序源码
- OpenGL纹理贴图.jpg格式图片小程序源码
- Qt编写的串口收发数据小程序源码
- 条形码、二维码扫描、生成Demo 完整源
- ACT动作游戏《武士2》源码
- 盗号木马源码.rar
- 网站器
- 2048源码qt4
- 嵌入式linux之mini2440的hc-sr04超声波驱动
- Minix3 源码解析精华!
- Web设计购物网站程序
- MIPS单/多周期CPU设计Verilog源码
- des mac地址 加密 源码
- linux iptables 源码
- EDULINE在线教育系统
- 基于AT89S52的红外巡线小车源码
- 基站定位和WIFI定位完美结合项目源码
- 利用钩子技术控制进程创建(源码)
- 井字棋源码+程序报告
- flash游戏中控制角色移动的源代码
- web页面中的打分源码
- jbig图像压缩算法源码
评论
共有 条评论