windows-nt/Source/XPSP1/NT/drivers/wdm/input/client/hclient/hclient.rc
2020-09-26 16:20:57 +08:00

370 lines
16 KiB
Plaintext

#include <windows.h>
#include <commctrl.h>
#include <ntverp.h>
#define VER_FILETYPE VFT_APP
#define VER_FILESUBTYPE VFT2_UNKNOWN
#define VER_FILEDESCRIPTION_STR "HID Sample Client"
#define VER_INTERNALNAME_STR "hclient\0"
#define VER_ORIGINALFILENAME_STR "HCLIENT.EXE"
#include <common.ver>
#include "resource.h"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
MAIN_DIALOG DIALOG DISCARDABLE 0, 0, 384, 277
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Sample HID client app"
FONT 8, "MS Shell Dlg"
BEGIN
COMBOBOX IDC_DEVICES,4,18,373,99,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_TYPE,4,48,373,99,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LISTBOX IDC_ITEMS,4,81,373,44,LBS_SORT | LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
LISTBOX IDC_ATTRIBUTES,4,143,373,89,LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
PUSHBUTTON "Extended Client Calls...",IDC_EXTCALLS,20,241,78,14
PUSHBUTTON "Modify Features...",IDC_FEATURES,20,256,78,14
PUSHBUTTON "Blocked Write Data...",IDC_WRITE,128,241,78,14
PUSHBUTTON "Blocked Read Data...",IDC_READ,128,256,78,14
DEFPUSHBUTTON "About...",IDC_ABOUT,236,241,50,14
PUSHBUTTON "Logical Device",IDC_LOAD_LOGICAL_DEVICE,236,256,50,14
DEFPUSHBUTTON "Exit",IDOK,316,241,50,14
PUSHBUTTON "Start Tests",IDC_START_TESTS,316,256,50,14,NOT
WS_VISIBLE
LTEXT "HID Device to Examine",IDC_STATIC,6,6,255,9
LTEXT "Item Type to examine",IDC_STATIC,5,36,357,11
LTEXT "Items",IDC_STATIC,6,67,156,12
LTEXT "Item attributes",IDC_STATIC,5,129,176,9
END
READDATA DIALOG DISCARDABLE 0, 0, 387, 173
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Shell Dlg"
BEGIN
PUSHBUTTON "Continuous Asynchronous Read",IDC_READ_ASYNCH_CONT,50,
146,106,14
PUSHBUTTON "One Asynchronous Read",IDC_READ_ASYNCH_ONCE,164,146,84,
14
PUSHBUTTON "Synchronous Read",IDC_READ_SYNCH,256,146,66,14
DEFPUSHBUTTON "OK",IDOK,330,146,50,14
LISTBOX IDC_OUTPUT,7,6,373,126,LBS_NOINTEGRALHEIGHT | WS_VSCROLL
END
WRITEDATA DIALOG DISCARDABLE 0, 0, 387, 196
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Write to device"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Cancel",IDCANCEL,325,177,50,14
PUSHBUTTON "Send to device",ID_SEND,255,177,59,14
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL1,9,17,241,11
EDITTEXT IDC_OUT_EDIT1,255,16,105,12,ES_AUTOHSCROLL
GROUPBOX "Output Buttons && Values",box,5,0,375,176
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL2,10,34,241,
11
EDITTEXT IDC_OUT_EDIT2,255,33,105,12,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL3,9,52,241,11
EDITTEXT IDC_OUT_EDIT3,255,51,105,12,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL4,9,68,241,11
EDITTEXT IDC_OUT_EDIT4,255,67,105,12,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL5,9,85,241,11
EDITTEXT IDC_OUT_EDIT5,255,84,105,12,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL6,10,101,241,
11
EDITTEXT IDC_OUT_EDIT6,256,100,105,12,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL7,10,118,241,
11
EDITTEXT IDC_OUT_EDIT7,256,117,105,12,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL8,10,135,241,
11
EDITTEXT IDC_OUT_EDIT8,256,134,105,12,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL9,10,153,241,
11
EDITTEXT IDC_OUT_EDIT9,256,152,105,12,ES_AUTOHSCROLL
SCROLLBAR IDC_SCROLLBAR,363,5,12,167,SBS_VERT
END
WRITEFEATURE DIALOG DISCARDABLE 0, 0, 412, 215
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Modify Features"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Cancel",IDCANCEL,351,190,50,14
PUSHBUTTON "Send to device",ID_SEND,281,190,59,14
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL1,17,26,192,
11
EDITTEXT IDC_OUT_EDIT1,211,24,169,15,ES_AUTOHSCROLL
GROUPBOX "Feature Buttons && Values",box,13,14,376,171
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL2,18,43,192,
11
EDITTEXT IDC_OUT_EDIT2,211,41,169,15,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL3,17,61,194,
11
EDITTEXT IDC_OUT_EDIT3,211,59,169,15,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL4,17,77,194,
11
EDITTEXT IDC_OUT_EDIT4,211,76,169,15,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL5,17,94,194,
11
EDITTEXT IDC_OUT_EDIT5,211,93,169,15,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL6,18,110,194,
11
EDITTEXT IDC_OUT_EDIT6,212,110,169,15,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL7,18,127,194,
11
EDITTEXT IDC_OUT_EDIT7,212,127,169,15,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL8,18,144,194,
11
EDITTEXT IDC_OUT_EDIT8,212,144,169,15,ES_AUTOHSCROLL
LTEXT "abcdefghijklmonopqrstuvwayz",IDC_OUT_LABEL9,18,162,194,
11
EDITTEXT IDC_OUT_EDIT9,212,162,169,15,ES_AUTOHSCROLL
SCROLLBAR IDC_SCROLLBAR,389,18,12,167,SBS_VERT
END
FEATURES DIALOG DISCARDABLE 0, 0, 323, 173
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Feature Data"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,260,146,50,14
LISTBOX IDC_OUTPUT,7,6,309,126,LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_TABSTOP
PUSHBUTTON "Read Features",IDC_READ,193,146,59,13
PUSHBUTTON "Modify Features",IDC_WRITE,126,146,59,13
END
EXTCALLS DIALOG DISCARDABLE 0, 0, 355, 290
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Extended Client Calls"
FONT 8, "MS Shell Dlg"
BEGIN
COMBOBOX IDC_EXTCALLS,7,18,341,71,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_REPORTID,53,54,31,12,WS_GROUP
EDITTEXT IDC_USAGEPAGE,137,54,31,12,WS_GROUP
EDITTEXT IDC_USAGE,211,54,31,12,WS_GROUP
EDITTEXT IDC_LINKCOLL,303,54,21,12,ES_NUMBER | WS_GROUP
CONTROL "Input Report",IDC_INPUT,"Button",BS_AUTORADIOBUTTON |
WS_GROUP | WS_TABSTOP,23,84,52,10
CONTROL "Output Report",IDC_OUTPUT,"Button",BS_AUTORADIOBUTTON |
WS_TABSTOP,135,84,57,10
CONTROL "Feature Report",IDC_FEATURE,"Button",BS_AUTORADIOBUTTON |
WS_TABSTOP,249,84,61,10
COMBOBOX IDC_INPUT_SELECT,19,118,88,30,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_OUTPUT_SELECT,130,118,87,30,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_FEATURE_SELECT,240,118,84,30,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_INPUT_BUFFER,20,140,87,21,ES_MULTILINE |
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_OUTPUT_BUFFER,130,140,86,21,ES_MULTILINE |
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_FEATURE_BUFFER,239,140,84,21,ES_MULTILINE |
ES_AUTOHSCROLL | ES_READONLY
LISTBOX IDC_CALLOUTPUT,7,185,341,64,NOT LBS_NOTIFY |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL |
WS_TABSTOP
PUSHBUTTON "Start Synchronous Read Thread",IDC_READ_SYNCH,10,255,
110,14
PUSHBUTTON "Start Asynchronous Read Thread",IDC_READ_ASYNCH,10,270,
110,14
PUSHBUTTON "Set Params",IDC_SET_PARAMS,135,255,50,14
PUSHBUTTON "Execute",IDC_EXECUTE,205,255,58,14
PUSHBUTTON "Cancel",IDC_CANCEL,285,255,50,14
LTEXT "DLL Call to Execute",IDC_STATIC,7,7,64,8
GROUPBOX "Report Type",IDC_STATIC,17,74,308,24
LTEXT "Call Output",IDC_STATIC,7,175,36,8
LTEXT "Report ID:",IDC_STATIC,15,57,34,8
LTEXT "Usage Page:",IDC_STATIC,95,57,42,8
LTEXT "Usage:",IDC_STATIC,183,57,23,8
RTEXT "Link Collection:",IDC_STATIC,249,57,53,8
GROUPBOX "Parameters",IDC_STATIC,7,38,341,129
END
IDD_SET_BUTTONS DIALOG DISCARDABLE 0, 0, 185, 79
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Set Button Usages"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,128,57,50,14
PUSHBUTTON "Cancel",IDCANCEL,65,57,50,14
LTEXT "Usage Page:",IDC_STATIC,7,7,42,8
LTEXT "",IDC_USAGE_PAGE,54,7,34,8
LTEXT "Usages (hex):",IDC_STATIC,7,29,44,8
EDITTEXT IDC_USAGE_LIST,54,26,124,13,ES_AUTOHSCROLL
END
IDD_SET_SCALED_VALUE DIALOG DISCARDABLE 0, 0, 185, 82
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Set Scaled Usage Value"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,128,60,50,14
PUSHBUTTON "Cancel",IDCANCEL,65,60,50,14
LTEXT "Usage Page:",IDC_STATIC,7,7,42,8
LTEXT "",IDC_USAGE_PAGE,54,7,34,8
LTEXT "Value:",IDC_STATIC,27,37,21,8
EDITTEXT IDC_VALUE,53,34,62,13,ES_AUTOHSCROLL
LTEXT "Usage:",IDC_STATIC,25,21,24,8
LTEXT "",IDC_USAGE,54,21,34,8
END
IDD_SET_USAGE_VALUE DIALOG DISCARDABLE 0, 0, 185, 82
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Set Usage Value"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,128,60,50,14
PUSHBUTTON "Cancel",IDCANCEL,65,60,50,14
LTEXT "Usage Page:",IDC_STATIC,7,7,42,8
LTEXT "",IDC_USAGE_PAGE,54,7,34,8
LTEXT "Value:",IDC_STATIC,27,37,21,8
EDITTEXT IDC_VALUE,53,34,62,13,ES_AUTOHSCROLL
LTEXT "Usage:",IDC_STATIC,25,21,24,8
LTEXT "",IDC_USAGE,54,21,34,8
END
IDD_SET_USAGE_VALUE_ARRAY DIALOG DISCARDABLE 0, 0, 185, 82
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Set Usage Value Array"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,128,60,50,14
PUSHBUTTON "Cancel",IDCANCEL,65,60,50,14
LTEXT "Usage Page:",IDC_STATIC,7,7,42,8
LTEXT "",IDC_USAGE_PAGE,54,7,34,8
LTEXT "Value:",IDC_STATIC,27,37,21,8
EDITTEXT IDC_VALUE,53,34,125,13,ES_AUTOHSCROLL
LTEXT "Usage:",IDC_STATIC,25,21,24,8
LTEXT "",IDC_USAGE,54,21,34,8
END
IDD_USAGE_LIST_DIFFERENCE DIALOG DISCARDABLE 0, 0, 227, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Usage List Difference"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,170,73,50,14
PUSHBUTTON "Cancel",IDCANCEL,111,73,50,14
LTEXT "Previous Usage List (hex):",IDC_STATIC,7,19,83,8
EDITTEXT IDC_USAGE_LIST1,96,16,124,13,ES_AUTOHSCROLL
LTEXT "Current Usage List (hex):",IDC_STATIC,12,44,78,8
EDITTEXT IDC_USAGE_LIST2,96,41,124,13,ES_AUTOHSCROLL
END
IDD_UNSET_BUTTONS DIALOG DISCARDABLE 0, 0, 185, 79
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Unset Button Usages"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,128,57,50,14
PUSHBUTTON "Cancel",IDCANCEL,65,57,50,14
LTEXT "Usage Page:",IDC_STATIC,7,7,42,8
LTEXT "",IDC_USAGE_PAGE,54,7,34,8
LTEXT "Usages (hex):",IDC_STATIC,7,29,44,8
EDITTEXT IDC_USAGE_LIST,54,26,124,13,ES_AUTOHSCROLL
END
IDD_UNSET_USAGES DIALOG DISCARDABLE 0, 0, 185, 79
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "'Unset Usages"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,128,57,50,14
PUSHBUTTON "Cancel",IDCANCEL,65,57,50,14
LTEXT "Usage Page:",IDC_STATIC,7,7,42,8
LTEXT "",IDC_USAGE_PAGE,54,7,34,8
LTEXT "Usages (hex):",IDC_STATIC,7,29,44,8
EDITTEXT IDC_USAGE_LIST,54,26,124,13,ES_AUTOHSCROLL
END
IDD_SET_DATA DIALOG DISCARDABLE 0, 0, 188, 159
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Set Data"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,131,137,50,14
PUSHBUTTON "Cancel",IDCANCEL,65,137,50,14
LTEXT "Value:",-1,30,33,21,8
EDITTEXT IDC_VALUE,55,32,28,13,ES_AUTOHSCROLL
LTEXT "Data Index:",-1,13,8,38,8
EDITTEXT IDC_INDEX,55,6,28,14,ES_AUTOHSCROLL
PUSHBUTTON "Add Data",IDC_ADD_DATA,19,58,63,15
PUSHBUTTON "Remove Data",IDC_REMOVE_DATA,101,58,63,15
LISTBOX IDC_DATA_LIST,7,85,174,49,LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
END
IDD_SET_BUFFER_LENGTH DIALOG DISCARDABLE 0, 0, 170, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Set Buffer Length"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,113,44,50,14
PUSHBUTTON "Cancel",IDCANCEL,51,44,50,14
LTEXT "Data Buffer Length (in bytes):",IDC_STATIC,8,20,93,8
EDITTEXT IDC_BUFFER_LENGTH,109,18,54,13,ES_AUTOHSCROLL
END
IDD_SET_INPUT_BUFFERS DIALOG DISCARDABLE 0, 0, 170, 79
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Set Number Input Buffers"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,98,57,50,14
PUSHBUTTON "Cancel",IDCANCEL,35,57,50,14
LTEXT "Number Of Input Buffers:",IDC_STATIC,8,20,79,8
EDITTEXT IDC_INPUT_BUFFERS,91,17,54,13,ES_AUTOHSCROLL
END
IDD_GET_INDEX_STRING DIALOG DISCARDABLE 0, 0, 170, 81
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Get Indexed String"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,113,59,50,14
PUSHBUTTON "Cancel",IDCANCEL,51,59,50,14
LTEXT "Data Buffer Length (in bytes):",IDC_STATIC,8,33,93,8
EDITTEXT IDC_BUFFER_LENGTH,109,31,54,13,ES_AUTOHSCROLL
LTEXT "String Index:",IDC_STATIC,61,14,40,8
EDITTEXT IDC_INDEX,109,13,39,12,ES_AUTOHSCROLL
END
IDD_SET_USAGES DIALOG DISCARDABLE 0, 0, 185, 79
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Set Usages"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,128,57,50,14
PUSHBUTTON "Cancel",IDCANCEL,65,57,50,14
LTEXT "Usage Page:",IDC_STATIC,7,7,42,8
LTEXT "",IDC_USAGE_PAGE,54,7,34,8
LTEXT "Usages (hex):",IDC_STATIC,7,29,44,8
EDITTEXT IDC_USAGE_LIST,54,26,124,13,ES_AUTOHSCROLL
END
IDD_GET_EXT_ATTRIB DIALOG DISCARDABLE 0, 0, 170, 81
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Get Extended Attributes"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,113,59,50,14
PUSHBUTTON "Cancel",IDCANCEL,51,59,50,14
LTEXT "Data Buffer Length (in bytes):",IDC_STATIC,8,33,93,8
EDITTEXT IDC_BUFFER_LENGTH,109,31,54,13,ES_AUTOHSCROLL
LTEXT "Data Index:",IDC_STATIC,61,14,38,8
EDITTEXT IDC_INDEX,109,13,39,12,ES_AUTOHSCROLL
END