随笔分类 -  WINDOWS

摘要:使用LoadLibrary显式链接,那么在函数的参数中可以指定DLL文件的完整路径;如果不指定路径,或者进行隐式链接,Windows将遵循下面的搜索顺序来定位DLL:(1)包含EXE文件的目录(2)工程目录(3)Windows系统目录(4)Windows目录(5)列在Path环境变量中的一系列目录 阅读全文
posted @ 2014-02-04 11:27 IAmAProgrammer 编辑
摘要:http://zh.wikipedia.org/wiki/X86%E8%B0%83%E7%94%A8%E7%BA%A6%E5%AE%9A这里描述了在x86芯片架构上的调用约定(calling conventions)。 调用约定描述了被调用代码的接口:原子(标量)参数,或复杂参数独立部分的分配顺序;参数是如何被传递的(放置在栈上,或是寄存器中,亦或两者混合);被调用者应保存调用者的哪个寄存器;调用函数时如何为任务准备堆栈,以及任务完成如何恢复;这与编程语言中对于大小和格式的分配紧密相关。另一个密切相关的是名称修饰,这决定了代码中的符号名称如何映射到链接器中的符号名。调用约定,类型表示和名称修饰 阅读全文
posted @ 2013-09-15 21:09 IAmAProgrammer 编辑
摘要:http://www.cnblogs.com/westsource/archive/2012/12/26/2834876.htmlIf you have Windows Server 2012 iso file or DVD,you can install .net framework 3.5 on Windows Server 2012 easly.1. You have to insertWindows Server 2012 DVD or isoto D drive.2. Open Add Roles and Features Wizard3. Select .NET Framework 阅读全文
posted @ 2013-09-10 07:44 IAmAProgrammer 编辑
摘要:http://stackoverflow.com/questions/14363152/send-custom-commands-to-mass-storage-deviceI have developed a mass-storage device, and I'd a like a PC application to send/receive some custom commands to it. Normally one would create a composite USB device for this (MSC+HID) and send the commands ove 阅读全文
posted @ 2013-06-30 23:20 IAmAProgrammer 编辑
摘要:http://social.msdn.microsoft.com/Forums/windowsdesktop/zh-CN/35620a05-43be-46a8-8cbe-846bc8295d85/usb-mass-storage-cWe have an USB mass storage / Memory Stick device with an additional device on it. We communicate with PassThrough mechanism to the device.Normally USB spec says that on USB level not 阅读全文
posted @ 2013-06-30 23:04 IAmAProgrammer 编辑
摘要:http://code.msdn.microsoft.com/SCSI-Pass-Through-a906ceef/sourcecode?fileId=59048&pathId=1919073465http://code.msdn.microsoft.com/SCSI-Pass-Through-a906ceef/file/59048/13/SCSI%20Pass-Through%20Interface%20Tool.zip/*++ Copyright (c) 1992 Microsoft Corporation Module Name: spti.h Abstract: ... 阅读全文
posted @ 2013-06-30 22:49 IAmAProgrammer 编辑
摘要:http://www.ezblog.idv.tw/Download/USBStorage.rar這是一個不透過檔案系統,去讀寫USB Mass Storage 任何位置(包含FAT)的方式首先需安裝微軟的DDK並include "usbioctl.h" , "usbdi.h" , "ntddscsi.h"有幾個資料結構要定義typedef struct _SCSI_Device_Info_{ SCSI_PASS_THROUGH Spt; BYTE Sense[ 18 ]; BYTE Data[ 36 ];} SCSI_Device_I 阅读全文
posted @ 2013-06-30 22:44 IAmAProgrammer 编辑
摘要:http://cutebunny.blog.51cto.com/301216/674443最近碰到了个新问题,记录下来作为windows的磁盘操作那个系列的续篇吧。一些时候我们的程序需要区分本地存储设备和USB存储设备。在网上搜一搜一般会找到一个最直接的API,GetDriveType,其原型为UINT GetDriveType(LPCTSTR lpRootPathName)参数lpRootPathName是存储设备的根目录,例如C:\,返回值即为设备类型。Return codeDescriptionDRIVE_REMOVABLEThe drive has removable media; f 阅读全文
posted @ 2013-06-30 22:27 IAmAProgrammer 编辑
摘要:http://bbs3.driverdevelop.com/simple/?t84347.html{ BOOL status = 0; DWORD accessMode = 0, shareMode = 0; HANDLE fileHandle = NULL;//PUCHAR dataBuffer = NULL; SCSI_PASS_THROUGH_WITH_BUFFERS sptwb; SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER sptdwb; UCHAR buffer[ 2048 ]; UCHAR string[ 25 ]; ULONG len... 阅读全文
posted @ 2013-06-30 22:21 IAmAProgrammer 编辑
摘要:http://flyxxtt.blogbus.com/logs/43181576.html函数原型:UINTGetDriveType(LPCTSTR lpRootPathName)参数lpRootPathName是根目录,如"C:\",一定要加上反斜杠。如果给此参数传入NULL将返回程序当前目录的驱动器类型。返回值所代表的类型请看下面的例子。使用例子:wstring getDriveType( LPCTSTR lpRootPathName ){ wstring typename; unsigned int type = GetDriveType( _T( "C:\ 阅读全文
posted @ 2013-06-30 22:19 IAmAProgrammer 编辑
摘要:http://banderlogi.blogspot.com/2011/06/enum-drive-letters-attached-for-usb.htmltypedef enum _STORAGE_BUS_TYPE { BusTypeUnknown = 0x00, BusTypeScsi = 0x01, BusTypeAtapi = 0x02, BusTypeAta = 0x03, BusType1394 = 0x04, BusTypeSsa = 0x05, BusTypeFibre... 阅读全文
posted @ 2013-06-30 22:15 IAmAProgrammer 编辑
摘要:http://www.jubao163.com/it/bianchengwendang/2007-06-17/14948.shtmltypedef struct _SCSI_PASS_THROUGH{ USHORT Length; UCHAR ScsiStatus; UCHAR PathId; UCHAR TargetId; UCHAR Lun; UCHAR CdbLength; UCHAR SenseInfoLength; UCHAR DataIn; ULONG DataTransferLength; ULONG TimeOutValue; ULONG_PTR Data... 阅读全文
posted @ 2013-06-30 22:12 IAmAProgrammer 编辑
摘要:struct tagDrives{ WCHAR letter; WCHAR volume[ BUFFER_SIZE ];} g_drives[ 26 ];//WCHAR GetUSBDrive( ){ LPTSTR lpDevID; WCHAR cDrive; DWORD dwSize = BUFFER_SIZE; // Get all removable disks on user laptop. if ( !GetAllRemovableDisks( ) ) { WRITELOG( "Error - GetAllRemovableDisks failed\n" ); . 阅读全文
posted @ 2013-06-16 16:08 IAmAProgrammer 编辑
摘要:WaitForSingleObject Function ***************************************************Waits until the specified object is in the signaled state or the time-out interval elapses.To enter an alertable wait state, use the WaitForSingleObjectEx function.To wait for multiple objects, use the WaitForMultipleObj 阅读全文
posted @ 2013-05-30 21:20 IAmAProgrammer 编辑
摘要:http://bbs.pediy.com/showthread.php?p=446641http://book.51cto.com/art/201107/275240.htm驱动程序和客户应用程序经常需要进行数据交换,但我们知道驱动程序和客户应用程序可能不在同一个地址空间,因此操作系统必须解决两者之间的数据交换。驱动层和应用层通信,主要是靠DeviceIoControl函数,下面是该函数的原型:BOOL DeviceIoControl ( HANDLE hDevice, // 设备句柄 DWORD dwIoControlCode, // IOCTL请求操作代码 LPVOID lpI... 阅读全文
posted @ 2013-05-30 14:13 IAmAProgrammer 编辑
摘要:CodePagecharset语种708ASMO-708阿拉伯字符(ASMO708)720DOS-720阿拉伯字符(DOS)28596iso-8859-6阿拉伯字符(ISO)1256windows-1256阿拉伯字符(Windows)1257windows-1257波罗的海字符(Windows)852ibm852中欧字符(DOS)28592iso-8859-2中欧字符(ISO)1250windows-1250中欧字符(Windows)936gb2312简体中文(GB2312)950big5繁体中文(Big5)862DOS-862希伯来字符(DOS)866cp866西里尔字符(DOS)874wi 阅读全文
posted @ 2013-05-14 17:51 IAmAProgrammer 编辑
摘要:所谓代码页 (codepage) 就是各国的文字编码和 Unicode 之间的映射表。例如 GBK 和 Unicode 的映射表就是 CP936,所以也常用 cp936 来指代 GBK。Code Pages Supported by WindowsThe lists below provide links to graphical representations and textual listings of each of the Windows codepages.SBCS (Single Byte Character Set) Codepages1250 (Central Europe) 阅读全文
posted @ 2013-05-13 03:04 IAmAProgrammer 编辑
摘要:点阵字体http://zh.wikipedia.org/wiki/%E7%82%B9%E9%98%B5%E5%AD%97%E4%BD%93点阵字体也叫位图字体,其中每个字形都以一组二维像素信息表示。这种文字显示方式于较早前的电脑系统(例如未有图形接口时的 DOS 操作系统)被普遍采用。由于位图的缘故,点阵字体很难进行缩放,特定的点阵字体只能清晰地显示在相应的字号下,否则文字只被强行放大而有损字形,产生成马赛克式的锯齿边缘。但对于字号 8-14px 的尺寸较小的汉字字体(即现今操作系统大多采用的默认字号)现今亦仍然被使用于荧幕显示上,能够提供更高的显示效果;不过现今该种点阵字体主要只作为“辅助” 阅读全文
posted @ 2013-05-12 12:57 IAmAProgrammer 编辑
摘要:http://www.codeguru.com/cpp/g-m/bitmap/specialeffects/article.php/c1739/Invert-mirror-a-bitmap-inplace.htmPosted byRoger OnslowonAugust 5th, 1998It is possible to invert a bitmap (laterally or vertically) IN-PLACE - ie. without creating any intermediate or temporary bitmaps. You can modify the origi 阅读全文
posted @ 2013-05-10 14:44 IAmAProgrammer 编辑
摘要:http://www.codeguru.com/cpp/g-m/bitmap/specialeffects/article.php/c1725/Invert-mirror-a-bitmap.htmInvert (mirror) a bitmaphttp://www.efg2.com/Lab/ImageProcessing/RotateScanline.htmDiscussionIf one attempts to rotate a bitmap in the "forward" direction by selection Pixel (i, j) and rotating 阅读全文
posted @ 2013-05-09 22:19 IAmAProgrammer 编辑

点击右上角即可分享
微信分享提示