mirror of
https://github.com/reactos/reactos
synced 2025-10-06 08:22:58 +02:00
Compare commits
25 Commits
kcb-deref-
...
ReactOS-0.
Author | SHA1 | Date | |
---|---|---|---|
|
8bc336bb52 | ||
|
af29a2d08f | ||
|
ec2a51c60b | ||
|
7b9ba7223b | ||
|
1a73ee0827 | ||
|
0ebd77ec18 | ||
|
41526a34a8 | ||
|
ba03bee5f1 | ||
|
4f535bb823 | ||
|
1c9164d13b | ||
|
0832b2405a | ||
|
4d99e3c26c | ||
|
57ccd69b13 | ||
|
35bae40dd6 | ||
|
86d1c25a8a | ||
|
5b07f4c4a8 | ||
|
4b9da374c4 | ||
|
b65469fa2d | ||
|
0735ac1b40 | ||
|
9aea16047d | ||
|
eb4ee4c80c | ||
|
1e09ca2838 | ||
|
b5f03b3099 | ||
|
4330ca7bf6 | ||
|
434a25b063 |
@@ -337,7 +337,7 @@ static const conv_t conv_TIME[] = {
|
||||
DECLARE_CONV_UNIT(TIME, MINUTES, "$*60", "$/60")
|
||||
DECLARE_CONV_UNIT(TIME, DAYS, "$*86400", "$/86400")
|
||||
DECLARE_CONV_UNIT(TIME, HOURS, "$*3600", "$/3600")
|
||||
DECLARE_CONV_UNIT(TIME, MILLISECONDS, "$*0.001", "$/0.001")
|
||||
DECLARE_CONV_UNIT(TIME, MILISECONDS, "$*0.001", "$/0.001")
|
||||
DECLARE_CONV_UNIT(TIME, MICROSECONDS, "$*0.000001", "$/0.000001")
|
||||
DECLARE_CONV_UNIT(TIME, SECONDS, "$", "$")
|
||||
DECLARE_CONV_UNIT(TIME, WEEKS, "$*604800", "$/604800")
|
||||
|
@@ -640,7 +640,7 @@ BEGIN
|
||||
IDS_TIME_DAYS "<22><><EFBFBD>"
|
||||
IDS_TIME_HOURS "<22><><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MICROSECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MILLISECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MILISECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MINUTES "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_SECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_WEEKS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
|
@@ -462,9 +462,9 @@ END
|
||||
// TYPES OF ANGLES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ANGLE_GRADIANS "Grady"
|
||||
IDS_ANGLE_RADIANS "Radi<64>ny"
|
||||
IDS_ANGLE_DEGREES "Stupn<70>"
|
||||
IDS_ANGLE_GRADIANS "Grady"
|
||||
IDS_ANGLE_RADIANS "Radi<64>ny"
|
||||
IDS_ANGLE_DEGREES "Stupn<70>"
|
||||
END
|
||||
|
||||
// TYPES OF AREAS
|
||||
@@ -518,6 +518,7 @@ END
|
||||
// TYPES OF CURRENCIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
|
||||
IDS_CURRENCY_BELGIAN_FRANC "Belgick<63> frank"
|
||||
IDS_CURRENCY_CZECH_KORUNA "<22>esk<73> koruna"
|
||||
IDS_CURRENCY_EURO "Euro"
|
||||
@@ -645,7 +646,7 @@ BEGIN
|
||||
IDS_TIME_DAYS "Dny"
|
||||
IDS_TIME_HOURS "Hodiny"
|
||||
IDS_TIME_MICROSECONDS "Mikrosekundy"
|
||||
IDS_TIME_MILLISECONDS "Milisekundy"
|
||||
IDS_TIME_MILISECONDS "Milisekundy"
|
||||
IDS_TIME_MINUTES "Minuty"
|
||||
IDS_TIME_SECONDS "Sekundy"
|
||||
IDS_TIME_YEARS "Roky"
|
||||
|
@@ -337,6 +337,7 @@ BEGIN
|
||||
SS_SUNKEN
|
||||
END
|
||||
|
||||
|
||||
// Menus
|
||||
|
||||
IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE
|
||||
@@ -450,16 +451,6 @@ BEGIN
|
||||
IDS_CONV_CONSUMPTION "Verbrauch (Motoren)"
|
||||
IDS_CONV_VOLUME "Volumeneinheit"
|
||||
IDS_CONV_CURRENCY "W<>hrung"
|
||||
IDS_CONV_ANGLE "Winkel"
|
||||
IDS_CONV_TIME "Zeit"
|
||||
END
|
||||
|
||||
// WINKELTYPEN
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ANGLE_GRADIANS "Gon"
|
||||
IDS_ANGLE_DEGREES "Grad"
|
||||
IDS_ANGLE_RADIANS "Radiant"
|
||||
END
|
||||
|
||||
// FL<46>CHENTYPEN
|
||||
@@ -529,21 +520,16 @@ BEGIN
|
||||
IDS_CURRENCY_SLOVAK_KORUNA "Slowakische Krone"
|
||||
IDS_CURRENCY_SLOVENIAN_TOLAR "Slovenische Tolar"
|
||||
IDS_CURRENCY_SPANISH_PESETA "Spanische Peseta"
|
||||
IDS_CURRENCY_CZECH_KORUNA "Tschechische Krone"
|
||||
IDS_CURRENCY_CYPRIOT_POUND "Zypriotische Pfund"
|
||||
END
|
||||
|
||||
// ENERGIETYPEN
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ENERGY_15_C_CALORIES "15 <EFBFBD>C Kalorien"
|
||||
IDS_ENERGY_BTUS "British thermal unit"
|
||||
IDS_ENERGY_EVS "Elektronenvolt"
|
||||
IDS_ENERGY_15_C_CALORIES "15 ^C Kalorien"
|
||||
IDS_ENERGY_ERGS "Ergs"
|
||||
IDS_ENERGY_NUTRITION_CALORIES "Ern<72>hrung Kalorien"
|
||||
IDS_ENERGY_FOOT_POUNDS "Foot-Pound"
|
||||
IDS_ENERGY_IT_CALORIES "International Kalorien"
|
||||
IDS_ENERGY_IT_KILOCALORIES "International Kilokalorien"
|
||||
IDS_ENERGY_JOULES "Joules"
|
||||
IDS_ENERGY_KILOJOULES "Kilojoules"
|
||||
IDS_ENERGY_KILOWATT_HOURS "Kilowattstunden"
|
||||
@@ -579,7 +565,6 @@ BEGIN
|
||||
IDS_LENGTH_LINKS_UK "Links (UK)"
|
||||
IDS_LENGTH_MILES "Meilen"
|
||||
IDS_LENGTH_METERS "Meter"
|
||||
IDS_LENGTH_MICRONS "Mikrometer"
|
||||
IDS_LENGTH_MILLIMETERS "Millimeter"
|
||||
IDS_LENGTH_NAUTICAL_MILES "Nautische Meilen"
|
||||
IDS_LENGTH_NIEU "Nieu"
|
||||
@@ -587,7 +572,6 @@ BEGIN
|
||||
IDS_LENGTH_PICAS "Picas"
|
||||
IDS_LENGTH_RI_JAPAN "Ri (Japan)"
|
||||
IDS_LENGTH_RI_KOREA "Ri (Korea)"
|
||||
IDS_LENGTH_RODS "Rods"
|
||||
IDS_LENGTH_SAWK "Sawk"
|
||||
IDS_LENGTH_SEN "Sen"
|
||||
IDS_LENGTH_SHAKU "Shaku"
|
||||
@@ -605,8 +589,6 @@ END
|
||||
// ARBEITSTYPEN
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_POWER_BTUS_PER_MINUTE "BTU pro Minute"
|
||||
IDS_POWER_FPS_PER_MINUTE "Foot-Pound pro Minute"
|
||||
IDS_POWER_KILOWATTS "Kilowatt"
|
||||
IDS_POWER_MEGAWATTS "Megawatt"
|
||||
IDS_POWER_HORSEPOWER "Pferdest<73>rken"
|
||||
@@ -618,8 +600,6 @@ STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_PRESSURE_ATMOSPHERES "Atmosph<70>ren"
|
||||
IDS_PRESSURE_BARS "Bar"
|
||||
IDS_PRESSURE_HECTOPASCALS "Hektopascal"
|
||||
IDS_PRESSURE_KILOPASCALS "Kilopascal"
|
||||
IDS_PRESSURE_MM_OF_MERCURY "Millimeter auf dem Quecksilber"
|
||||
IDS_PRESSURE_PASCALS "Pascal"
|
||||
IDS_PRESSURE_PSI "Pfunddruck pro Quadratzoll"
|
||||
@@ -634,24 +614,9 @@ BEGIN
|
||||
IDS_TEMPERATURE_RANKINE "Rankine"
|
||||
END
|
||||
|
||||
// TYPES OF TIME
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_TIME_DAYS "Tagen"
|
||||
IDS_TIME_HOURS "Stunden"
|
||||
IDS_TIME_MICROSECONDS "Mikrosekunden"
|
||||
IDS_TIME_MILLISECONDS "Millisekunden"
|
||||
IDS_TIME_MINUTES "Minuten"
|
||||
IDS_TIME_SECONDS "Sekunden"
|
||||
IDS_TIME_WEEKS "Wochen"
|
||||
IDS_TIME_YEARS "Jahren"
|
||||
END
|
||||
|
||||
// GESCHWINDIGKEITSTYPEN
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_VELOCITY_CMS_SECOND "Zentimeter/Sekunde"
|
||||
IDS_VELOCITY_FEET_SECOND "Fu<46>/Sekunde"
|
||||
IDS_VELOCITY_FEET_HOUR "Fu<46>/Stunde"
|
||||
IDS_VELOCITY_KILOMETERS_HOUR "Kilometer/Stunde"
|
||||
IDS_VELOCITY_KNOTS "Knoten"
|
||||
|
@@ -436,7 +436,7 @@ BEGIN
|
||||
IDS_QUICKHELP "Quick help"
|
||||
END
|
||||
|
||||
// Types of conversion
|
||||
// types of conversion
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_CONV_ANGLE "<22><><EFBFBD><EFBFBD><EFBFBD>"
|
||||
@@ -639,8 +639,8 @@ STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_TIME_DAYS "<22><><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_HOURS "<22><><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MICROSECONDS "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MILLISECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MICROSECONDS "Microseconds"
|
||||
IDS_TIME_MILISECONDS "Miliseconds"
|
||||
IDS_TIME_MINUTES "<22><><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_SECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_WEEKS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
|
@@ -436,7 +436,7 @@ BEGIN
|
||||
IDS_QUICKHELP "Quick help"
|
||||
END
|
||||
|
||||
// Types of conversion
|
||||
// types of conversion
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_CONV_ANGLE "Angle"
|
||||
@@ -553,7 +553,7 @@ END
|
||||
// TYPES OF LENGTHS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_LENGTH_ANGSTROMS "<EFBFBD>ngstr<EFBFBD>ms"
|
||||
IDS_LENGTH_ANGSTROMS "Angstroms"
|
||||
IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units"
|
||||
IDS_LENGTH_BARLEYCORNS "Barleycorns"
|
||||
IDS_LENGTH_CENTIMETERS "Centimeters"
|
||||
@@ -640,7 +640,7 @@ BEGIN
|
||||
IDS_TIME_DAYS "Days"
|
||||
IDS_TIME_HOURS "Hours"
|
||||
IDS_TIME_MICROSECONDS "Microseconds"
|
||||
IDS_TIME_MILLISECONDS "Milliseconds"
|
||||
IDS_TIME_MILISECONDS "Miliseconds"
|
||||
IDS_TIME_MINUTES "Minutes"
|
||||
IDS_TIME_SECONDS "Seconds"
|
||||
IDS_TIME_WEEKS "Weeks"
|
||||
|
@@ -14,10 +14,14 @@ MENU IDR_MENU_SCIENTIFIC_1
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "",IDC_STATIC,4,16,132,21
|
||||
CONTROL "Hex",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10
|
||||
CONTROL "Dec",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10
|
||||
CONTROL "Oct",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10
|
||||
CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10
|
||||
CONTROL "Hex",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,
|
||||
10
|
||||
CONTROL "Dec",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,
|
||||
10
|
||||
CONTROL "Oct",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,
|
||||
10
|
||||
CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,
|
||||
26,10
|
||||
GROUPBOX "",IDC_STATIC,4,36,76,21
|
||||
CONTROL "Inv",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,8,44,26,10
|
||||
@@ -342,6 +346,7 @@ BEGIN
|
||||
SS_SUNKEN
|
||||
END
|
||||
|
||||
|
||||
// Menus
|
||||
|
||||
IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE
|
||||
@@ -389,10 +394,10 @@ BEGIN
|
||||
MENUITEM "Cient<6E>fica", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "Conversi<73>n", IDM_VIEW_CONVERSION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Hexadecimal\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Hexadecimal\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED
|
||||
MENUITEM "Octal\tF7", IDM_VIEW_OCT, CHECKED
|
||||
MENUITEM "Binario\tF8", IDM_VIEW_BIN, CHECKED
|
||||
MENUITEM "Binario\tF8", IDM_VIEW_BIN, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED
|
||||
MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED
|
||||
@@ -428,7 +433,7 @@ BEGIN
|
||||
BEGIN
|
||||
MENUITEM "Temas de ayuda", IDM_HELP_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Acerca de Calculadora ReactOS", IDM_HELP_ABOUT
|
||||
MENUITEM "Acerca de Calculadora ReactOS", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
@@ -441,10 +446,9 @@ BEGIN
|
||||
IDS_QUICKHELP "Ayuda r<>pida"
|
||||
END
|
||||
|
||||
// Types of conversion
|
||||
// types of conversion
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_CONV_ANGLE "<22>ngulo"
|
||||
IDS_CONV_AREA "<22>rea"
|
||||
IDS_CONV_CONSUMPTION "Consumo (motores)"
|
||||
IDS_CONV_CURRENCY "Monedas"
|
||||
@@ -453,20 +457,11 @@ BEGIN
|
||||
IDS_CONV_POWER "Potencia"
|
||||
IDS_CONV_PRESSURE "Presi<73>n"
|
||||
IDS_CONV_TEMPERATURE "Temperatura"
|
||||
IDS_CONV_TIME "Tiempo"
|
||||
IDS_CONV_VELOCITY "Velocidad"
|
||||
IDS_CONV_VOLUME "Volumen"
|
||||
IDS_CONV_WEIGHT "Peso"
|
||||
END
|
||||
|
||||
// TYPES OF ANGLES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ANGLE_DEGREES "Grados sexagesimales"
|
||||
IDS_ANGLE_GRADIANS "Grados centesimales"
|
||||
IDS_ANGLE_RADIANS "Radianes"
|
||||
END
|
||||
|
||||
// TYPES OF AREAS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
@@ -521,7 +516,6 @@ BEGIN
|
||||
IDS_CURRENCY_AUSTRIAN_SCHILLING "Schilling Austriaco"
|
||||
IDS_CURRENCY_BELGIAN_FRANC "Franco Belga"
|
||||
IDS_CURRENCY_CYPRIOT_POUND "Libra Chipriota"
|
||||
IDS_CURRENCY_CZECH_KORUNA "Corona Checa"
|
||||
IDS_CURRENCY_DEUTSCHE_MARK "Marco Alem<65>n"
|
||||
IDS_CURRENCY_DUTCH_GUILDER "Flor<6F>n Neerland<6E>s"
|
||||
IDS_CURRENCY_EURO "Euro"
|
||||
@@ -541,13 +535,9 @@ END
|
||||
// TYPES OF ENERGIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ENERGY_15_C_CALORIES "15 <EFBFBD>C calor<6F>as"
|
||||
IDS_ENERGY_BTUS "BTU"
|
||||
IDS_ENERGY_15_C_CALORIES "15 ^C calor<6F>as"
|
||||
IDS_ENERGY_ERGS "Ergios"
|
||||
IDS_ENERGY_EVS "Electronovoltios"
|
||||
IDS_ENERGY_FOOT_POUNDS "Ft<46>Lbs"
|
||||
IDS_ENERGY_IT_CALORIES "Tabla internacional de calor<6F>as"
|
||||
IDS_ENERGY_IT_KILOCALORIES "Tabla internacional de kilocalor<6F>as"
|
||||
IDS_ENERGY_JOULES "Julios"
|
||||
IDS_ENERGY_KILOJOULES "Kilojulios"
|
||||
IDS_ENERGY_KILOWATT_HOURS "Kilowatios hora"
|
||||
@@ -558,7 +548,7 @@ END
|
||||
// TYPES OF LENGTHS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_LENGTH_ANGSTROMS "<EFBFBD>ngstr<EFBFBD>ms"
|
||||
IDS_LENGTH_ANGSTROMS "Angstroms"
|
||||
IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units"
|
||||
IDS_LENGTH_BARLEYCORNS "Barleycorns"
|
||||
IDS_LENGTH_CENTIMETERS "Cent<6E>metros"
|
||||
@@ -585,7 +575,6 @@ BEGIN
|
||||
IDS_LENGTH_LIGHT_YEARS "A<>os luz"
|
||||
IDS_LENGTH_LINKS_UK "Links (UK)"
|
||||
IDS_LENGTH_METERS "Metros"
|
||||
IDS_LENGTH_MICRONS "Micr<63>metros"
|
||||
IDS_LENGTH_MILES "Millas"
|
||||
IDS_LENGTH_MILLIMETERS "Mil<69>metros"
|
||||
IDS_LENGTH_NAUTICAL_MILES "Millas nauticas"
|
||||
@@ -594,7 +583,6 @@ BEGIN
|
||||
IDS_LENGTH_PICAS "Picas"
|
||||
IDS_LENGTH_RI_JAPAN "Ri (Japan)"
|
||||
IDS_LENGTH_RI_KOREA "Ri (Korea)"
|
||||
IDS_LENGTH_RODS "Rods"
|
||||
IDS_LENGTH_SAWK "Sawk"
|
||||
IDS_LENGTH_SEN "Sen"
|
||||
IDS_LENGTH_SHAKU "Shaku"
|
||||
@@ -610,8 +598,6 @@ END
|
||||
// TYPES OF POWERS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_POWER_BTUS_PER_MINUTE "BTU/Minuto"
|
||||
IDS_POWER_FPS_PER_MINUTE "Ft<46>Lbs/Minuto"
|
||||
IDS_POWER_HORSEPOWER "Caballos de vapor"
|
||||
IDS_POWER_KILOWATTS "Kilowatios"
|
||||
IDS_POWER_MEGAWATTS "Megawatios"
|
||||
@@ -623,8 +609,6 @@ STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_PRESSURE_ATMOSPHERES "Atm<74>sferas"
|
||||
IDS_PRESSURE_BARS "Bares"
|
||||
IDS_PRESSURE_HECTOPASCALS "Kilopascales"
|
||||
IDS_PRESSURE_KILOPASCALS "Hectopascales"
|
||||
IDS_PRESSURE_MM_OF_MERCURY "Mil<69>metros de mercurio"
|
||||
IDS_PRESSURE_PASCALS "Pascales"
|
||||
IDS_PRESSURE_PSI "Libras fuerza por pulgada cuadrada"
|
||||
@@ -639,25 +623,10 @@ BEGIN
|
||||
IDS_TEMPERATURE_RANKINE "Rankine"
|
||||
END
|
||||
|
||||
// TYPES OF TIME
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_TIME_DAYS "D<>as"
|
||||
IDS_TIME_HOURS "Horas"
|
||||
IDS_TIME_MICROSECONDS "Microsegundos"
|
||||
IDS_TIME_MILLISECONDS "Milisegundos"
|
||||
IDS_TIME_MINUTES "Minutos"
|
||||
IDS_TIME_SECONDS "Segundos"
|
||||
IDS_TIME_WEEKS "Semanas"
|
||||
IDS_TIME_YEARS "A<>os"
|
||||
END
|
||||
|
||||
// TYPES OF VELOCITIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_VELOCITY_CMS_SECOND "Cent<6E>metros/segundo"
|
||||
IDS_VELOCITY_FEET_HOUR "Pies/hora"
|
||||
IDS_VELOCITY_FEET_SECOND "Pies/segundo"
|
||||
IDS_VELOCITY_KILOMETERS_HOUR "Kilometros/hora"
|
||||
IDS_VELOCITY_KNOTS "Knots"
|
||||
IDS_VELOCITY_MACH "Mach"
|
||||
|
@@ -640,7 +640,7 @@ BEGIN
|
||||
IDS_TIME_DAYS "Jours"
|
||||
IDS_TIME_HOURS "Heures"
|
||||
IDS_TIME_MICROSECONDS "Microsecondes"
|
||||
IDS_TIME_MILLISECONDS "Millisecondes"
|
||||
IDS_TIME_MILISECONDS "Millisecondes"
|
||||
IDS_TIME_MINUTES "Minutes"
|
||||
IDS_TIME_SECONDS "Secondes"
|
||||
IDS_TIME_WEEKS "Semaines"
|
||||
|
@@ -640,7 +640,7 @@ BEGIN
|
||||
IDS_TIME_DAYS "Giorni"
|
||||
IDS_TIME_HOURS "Ore"
|
||||
IDS_TIME_MICROSECONDS "Microsecondi"
|
||||
IDS_TIME_MILLISECONDS "Millisecondi"
|
||||
IDS_TIME_MILISECONDS "Millisecondi"
|
||||
IDS_TIME_MINUTES "Minuti"
|
||||
IDS_TIME_SECONDS "Secondi"
|
||||
IDS_TIME_WEEKS "Settimane"
|
||||
|
@@ -348,13 +348,13 @@ BEGIN
|
||||
POPUP "<22><><EFBFBD><EFBFBD>"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "<22>ٿ<EFBFBD><D9BF>ֱ<EFBFBD>\tCTRL-V", IDM_EDIT_PASTE
|
||||
MENUITEM "<22>ٿ<EFBFBD><D9BF>ֱ<EFBFBD>\tCTRL-V", IDM_EDIT_PASTE
|
||||
END
|
||||
POPUP "<22><><EFBFBD><EFBFBD>"
|
||||
BEGIN
|
||||
MENUITEM "<22>Ϲ<EFBFBD>", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "<22><>ȯ", IDM_VIEW_CONVERSION
|
||||
MENUITEM "<22>Ϲ<EFBFBD>", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "<22><>ȯ", IDM_VIEW_CONVERSION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED
|
||||
@@ -365,13 +365,13 @@ BEGIN
|
||||
MENUITEM "Radians\tF3", IDM_VIEW_RAD, CHECKED
|
||||
MENUITEM "Grads\tF4", IDM_VIEW_GRAD, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "<22>ڸ<EFBFBD><DAB8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_VIEW_GROUP, CHECKED
|
||||
MENUITEM "<22>ڸ<EFBFBD><DAB8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_VIEW_GROUP, CHECKED
|
||||
END
|
||||
POPUP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>", IDM_HELP_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "ReactOS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_HELP_ABOUT
|
||||
MENUITEM "ReactOS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
@@ -380,13 +380,13 @@ BEGIN
|
||||
POPUP "<22><><EFBFBD><EFBFBD>"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "<22>ٿ<EFBFBD><D9BF>ֱ<EFBFBD>\tCTRL-V", IDM_EDIT_PASTE
|
||||
MENUITEM "<22>ٿ<EFBFBD><D9BF>ֱ<EFBFBD>\tCTRL-V", IDM_EDIT_PASTE
|
||||
END
|
||||
POPUP "<22><><EFBFBD><EFBFBD>"
|
||||
BEGIN
|
||||
MENUITEM "<22>Ϲ<EFBFBD>", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "<22><>ȯ", IDM_VIEW_CONVERSION
|
||||
MENUITEM "<22>Ϲ<EFBFBD>", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "<22><>ȯ", IDM_VIEW_CONVERSION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Hex\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Decimal\tF6", IDM_VIEW_DEC, CHECKED
|
||||
@@ -398,13 +398,13 @@ BEGIN
|
||||
MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED
|
||||
MENUITEM "Byte\tF4", IDM_VIEW_BYTE, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "<22>ڸ<EFBFBD><DAB8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_VIEW_GROUP, CHECKED
|
||||
MENUITEM "<22>ڸ<EFBFBD><DAB8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_VIEW_GROUP, CHECKED
|
||||
END
|
||||
POPUP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>", IDM_HELP_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "ReactOS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_HELP_ABOUT
|
||||
MENUITEM "ReactOS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
@@ -413,21 +413,21 @@ BEGIN
|
||||
POPUP "<22><><EFBFBD><EFBFBD>"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "<22>ٿ<EFBFBD><D9BF>ֱ<EFBFBD>\tCTRL-V", IDM_EDIT_PASTE
|
||||
MENUITEM "<22>ٿ<EFBFBD><D9BF>ֱ<EFBFBD>\tCTRL-V", IDM_EDIT_PASTE
|
||||
END
|
||||
POPUP "<22><><EFBFBD><EFBFBD>"
|
||||
BEGIN
|
||||
MENUITEM "<22>Ϲ<EFBFBD>", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "<22><>ȯ", IDM_VIEW_CONVERSION
|
||||
MENUITEM "<22>Ϲ<EFBFBD>", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "<22><>ȯ", IDM_VIEW_CONVERSION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "<22>ڸ<EFBFBD><DAB8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_VIEW_GROUP, CHECKED
|
||||
MENUITEM "<22>ڸ<EFBFBD><DAB8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_VIEW_GROUP, CHECKED
|
||||
END
|
||||
POPUP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>", IDM_HELP_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "ReactOS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_HELP_ABOUT
|
||||
MENUITEM "ReactOS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
@@ -440,10 +440,9 @@ BEGIN
|
||||
IDS_QUICKHELP "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
END
|
||||
|
||||
// Types of conversion
|
||||
// types of conversion
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_CONV_ANGLE "<22><><EFBFBD><EFBFBD>"
|
||||
IDS_CONV_AREA "Area"
|
||||
IDS_CONV_CONSUMPTION "Consumption (engines)"
|
||||
IDS_CONV_CURRENCY "Currencies"
|
||||
@@ -452,20 +451,11 @@ BEGIN
|
||||
IDS_CONV_POWER "Power"
|
||||
IDS_CONV_PRESSURE "Pressure"
|
||||
IDS_CONV_TEMPERATURE "Temperature"
|
||||
IDS_CONV_TIME "<22><><EFBFBD><EFBFBD>"
|
||||
IDS_CONV_VELOCITY "Velocity"
|
||||
IDS_CONV_VOLUME "Volume"
|
||||
IDS_CONV_WEIGHT "Weights"
|
||||
END
|
||||
|
||||
// TYPES OF ANGLES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ANGLE_DEGREES "Degrees"
|
||||
IDS_ANGLE_GRADIANS "Gradians"
|
||||
IDS_ANGLE_RADIANS "Radians"
|
||||
END
|
||||
|
||||
// TYPES OF AREAS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
@@ -520,7 +510,6 @@ BEGIN
|
||||
IDS_CURRENCY_AUSTRIAN_SCHILLING "Austrian schilling"
|
||||
IDS_CURRENCY_BELGIAN_FRANC "Belgian franc"
|
||||
IDS_CURRENCY_CYPRIOT_POUND "Cypriot pound"
|
||||
IDS_CURRENCY_CZECH_KORUNA "Czech Koruna"
|
||||
IDS_CURRENCY_DEUTSCHE_MARK "Deutsche Mark"
|
||||
IDS_CURRENCY_DUTCH_GUILDER "Dutch guilder"
|
||||
IDS_CURRENCY_EURO "Euro"
|
||||
@@ -540,13 +529,9 @@ END
|
||||
// TYPES OF ENERGIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ENERGY_15_C_CALORIES "15 <EFBFBD><EFBFBD>C calories"
|
||||
IDS_ENERGY_BTUS "British Thermal Units"
|
||||
IDS_ENERGY_15_C_CALORIES "15 ^C calories"
|
||||
IDS_ENERGY_ERGS "Ergs"
|
||||
IDS_ENERGY_EVS "<22><><EFBFBD>ں<EFBFBD>Ʈ"
|
||||
IDS_ENERGY_FOOT_POUNDS "Foot-Pounds"
|
||||
IDS_ENERGY_IT_CALORIES "International Table calories"
|
||||
IDS_ENERGY_IT_KILOCALORIES "International Table kilocalories"
|
||||
IDS_ENERGY_JOULES "Joules"
|
||||
IDS_ENERGY_KILOJOULES "Kilojoules"
|
||||
IDS_ENERGY_KILOWATT_HOURS "Kilowatt hours"
|
||||
@@ -557,7 +542,7 @@ END
|
||||
// TYPES OF LENGTHS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_LENGTH_ANGSTROMS "<EFBFBD>˽<EFBFBD>Ʈ<EFBFBD><EFBFBD>"
|
||||
IDS_LENGTH_ANGSTROMS "Angstroms"
|
||||
IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units"
|
||||
IDS_LENGTH_BARLEYCORNS "Barleycorns"
|
||||
IDS_LENGTH_CENTIMETERS "Centimeters"
|
||||
@@ -584,7 +569,6 @@ BEGIN
|
||||
IDS_LENGTH_LIGHT_YEARS "Light years"
|
||||
IDS_LENGTH_LINKS_UK "Links (UK)"
|
||||
IDS_LENGTH_METERS "Meters"
|
||||
IDS_LENGTH_MICRONS "Microns"
|
||||
IDS_LENGTH_MILES "Miles"
|
||||
IDS_LENGTH_MILLIMETERS "Millimeters"
|
||||
IDS_LENGTH_NAUTICAL_MILES "Nautical miles"
|
||||
@@ -593,7 +577,6 @@ BEGIN
|
||||
IDS_LENGTH_PICAS "Picas"
|
||||
IDS_LENGTH_RI_JAPAN "Ri (Japan)"
|
||||
IDS_LENGTH_RI_KOREA "Ri (Korea)"
|
||||
IDS_LENGTH_RODS "Rods"
|
||||
IDS_LENGTH_SAWK "Sawk"
|
||||
IDS_LENGTH_SEN "Sen"
|
||||
IDS_LENGTH_SHAKU "Shaku"
|
||||
@@ -609,8 +592,6 @@ END
|
||||
// TYPES OF POWERS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_POWER_BTUS_PER_MINUTE "British Thermal Units per minute"
|
||||
IDS_POWER_FPS_PER_MINUTE "Foot-Pounds per minute"
|
||||
IDS_POWER_HORSEPOWER "Horsepower"
|
||||
IDS_POWER_KILOWATTS "Kilowatts"
|
||||
IDS_POWER_MEGAWATTS "Megawatts"
|
||||
@@ -622,8 +603,6 @@ STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_PRESSURE_ATMOSPHERES "Atmospheres"
|
||||
IDS_PRESSURE_BARS "Bars"
|
||||
IDS_PRESSURE_HECTOPASCALS "Hectopascals"
|
||||
IDS_PRESSURE_KILOPASCALS "Kilopascals"
|
||||
IDS_PRESSURE_MM_OF_MERCURY "Millimeters of mercury"
|
||||
IDS_PRESSURE_PASCALS "Pascals"
|
||||
IDS_PRESSURE_PSI "Pounds-force per square inch"
|
||||
@@ -638,25 +617,10 @@ BEGIN
|
||||
IDS_TEMPERATURE_RANKINE "Rankine"
|
||||
END
|
||||
|
||||
// TYPES OF TIME
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_TIME_DAYS "Days"
|
||||
IDS_TIME_HOURS "Hours"
|
||||
IDS_TIME_MICROSECONDS "Microseconds"
|
||||
IDS_TIME_MILLISECONDS "Milliseconds"
|
||||
IDS_TIME_MINUTES "Minutes"
|
||||
IDS_TIME_SECONDS "Seconds"
|
||||
IDS_TIME_WEEKS "Weeks"
|
||||
IDS_TIME_YEARS "Years"
|
||||
END
|
||||
|
||||
// TYPES OF VELOCITIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_VELOCITY_CMS_SECOND "Centimeters/hour"
|
||||
IDS_VELOCITY_FEET_HOUR "Feet/hour"
|
||||
IDS_VELOCITY_FEET_SECOND "Feet/second"
|
||||
IDS_VELOCITY_KILOMETERS_HOUR "Kilometers/hour"
|
||||
IDS_VELOCITY_KNOTS "Knots"
|
||||
IDS_VELOCITY_MACH "Mach"
|
||||
|
@@ -9,10 +9,14 @@ MENU IDR_MENU_SCIENTIFIC_1
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "",IDC_STATIC,4,16,132,21
|
||||
CONTROL "Hex",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10
|
||||
CONTROL "Dec",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10
|
||||
CONTROL "Oct",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10
|
||||
CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10
|
||||
CONTROL "Hex",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,
|
||||
10
|
||||
CONTROL "Dec",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,
|
||||
10
|
||||
CONTROL "Oct",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,
|
||||
10
|
||||
CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,
|
||||
26,10
|
||||
GROUPBOX "",IDC_STATIC,4,36,76,21
|
||||
CONTROL "Inv",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,8,44,26,10
|
||||
@@ -337,6 +341,7 @@ BEGIN
|
||||
SS_SUNKEN
|
||||
END
|
||||
|
||||
|
||||
// Menus
|
||||
|
||||
IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE
|
||||
@@ -436,10 +441,9 @@ BEGIN
|
||||
IDS_QUICKHELP "Snelle hulp"
|
||||
END
|
||||
|
||||
// Types of conversion
|
||||
// types of conversion
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_CONV_ANGLE "Hoek"
|
||||
IDS_CONV_AREA "Area"
|
||||
IDS_CONV_CONSUMPTION "Consumption (engines)"
|
||||
IDS_CONV_CURRENCY "Currencies"
|
||||
@@ -448,20 +452,11 @@ BEGIN
|
||||
IDS_CONV_POWER "Power"
|
||||
IDS_CONV_PRESSURE "Pressure"
|
||||
IDS_CONV_TEMPERATURE "Temperature"
|
||||
IDS_CONV_TIME "Tijd"
|
||||
IDS_CONV_VELOCITY "Velocity"
|
||||
IDS_CONV_VOLUME "Volume"
|
||||
IDS_CONV_WEIGHT "Weights"
|
||||
END
|
||||
|
||||
// TYPES OF ANGLES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ANGLE_DEGREES "Graden"
|
||||
IDS_ANGLE_GRADIANS "Gradi<64>nten"
|
||||
IDS_ANGLE_RADIANS "Radialen"
|
||||
END
|
||||
|
||||
// TYPES OF AREAS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
@@ -516,7 +511,6 @@ BEGIN
|
||||
IDS_CURRENCY_AUSTRIAN_SCHILLING "Austrian schilling"
|
||||
IDS_CURRENCY_BELGIAN_FRANC "Belgian franc"
|
||||
IDS_CURRENCY_CYPRIOT_POUND "Cypriot pound"
|
||||
IDS_CURRENCY_CZECH_KORUNA "Tsjechische kroon"
|
||||
IDS_CURRENCY_DEUTSCHE_MARK "Deutsche Mark"
|
||||
IDS_CURRENCY_DUTCH_GUILDER "Dutch guilder"
|
||||
IDS_CURRENCY_EURO "Euro"
|
||||
@@ -536,13 +530,9 @@ END
|
||||
// TYPES OF ENERGIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ENERGY_15_C_CALORIES "15 <EFBFBD>C calories"
|
||||
IDS_ENERGY_BTUS "British thermal units"
|
||||
IDS_ENERGY_15_C_CALORIES "15 ^C calories"
|
||||
IDS_ENERGY_ERGS "Ergs"
|
||||
IDS_ENERGY_EVS "Elektronvolt"
|
||||
IDS_ENERGY_FOOT_POUNDS "Voet-pond"
|
||||
IDS_ENERGY_IT_CALORIES "International Table calories"
|
||||
IDS_ENERGY_IT_KILOCALORIES "International Table kilocalories"
|
||||
IDS_ENERGY_JOULES "Joules"
|
||||
IDS_ENERGY_KILOJOULES "Kilojoules"
|
||||
IDS_ENERGY_KILOWATT_HOURS "Kilowatt hours"
|
||||
@@ -580,7 +570,6 @@ BEGIN
|
||||
IDS_LENGTH_LIGHT_YEARS "Light years"
|
||||
IDS_LENGTH_LINKS_UK "Links (UK)"
|
||||
IDS_LENGTH_METERS "Meters"
|
||||
IDS_LENGTH_MICRONS "Microns"
|
||||
IDS_LENGTH_MILES "Miles"
|
||||
IDS_LENGTH_MILLIMETERS "Millimeters"
|
||||
IDS_LENGTH_NAUTICAL_MILES "Nautical miles"
|
||||
@@ -589,7 +578,6 @@ BEGIN
|
||||
IDS_LENGTH_PICAS "Picas"
|
||||
IDS_LENGTH_RI_JAPAN "Ri (Japan)"
|
||||
IDS_LENGTH_RI_KOREA "Ri (Korea)"
|
||||
IDS_LENGTH_RODS "Rods"
|
||||
IDS_LENGTH_SAWK "Sawk"
|
||||
IDS_LENGTH_SEN "Sen"
|
||||
IDS_LENGTH_SHAKU "Shaku"
|
||||
@@ -605,8 +593,6 @@ END
|
||||
// TYPES OF POWERS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_POWER_BTUS_PER_MINUTE "British Thermal Units per minute"
|
||||
IDS_POWER_FPS_PER_MINUTE "Foot-Pounds per minute"
|
||||
IDS_POWER_HORSEPOWER "Horsepower"
|
||||
IDS_POWER_KILOWATTS "Kilowatts"
|
||||
IDS_POWER_MEGAWATTS "Megawatts"
|
||||
@@ -618,8 +604,6 @@ STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_PRESSURE_ATMOSPHERES "Atmospheres"
|
||||
IDS_PRESSURE_BARS "Bars"
|
||||
IDS_PRESSURE_HECTOPASCALS "Hectopascals"
|
||||
IDS_PRESSURE_KILOPASCALS "Kilopascals"
|
||||
IDS_PRESSURE_MM_OF_MERCURY "Millimeters of mercury"
|
||||
IDS_PRESSURE_PASCALS "Pascals"
|
||||
IDS_PRESSURE_PSI "Pounds-force per square inch"
|
||||
@@ -634,25 +618,10 @@ BEGIN
|
||||
IDS_TEMPERATURE_RANKINE "Rankine"
|
||||
END
|
||||
|
||||
// TYPES OF TIME
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_TIME_DAYS "**"
|
||||
IDS_TIME_HOURS "**"
|
||||
IDS_TIME_MICROSECONDS "**"
|
||||
IDS_TIME_MILLISECONDS "**"
|
||||
IDS_TIME_MINUTES "**"
|
||||
IDS_TIME_SECONDS "**"
|
||||
IDS_TIME_WEEKS "**"
|
||||
IDS_TIME_YEARS "**"
|
||||
END
|
||||
|
||||
// TYPES OF VELOCITIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_VELOCITY_CMS_SECOND "Centimeters/hour"
|
||||
IDS_VELOCITY_FEET_HOUR "Feet/hour"
|
||||
IDS_VELOCITY_FEET_SECOND "Feet/second"
|
||||
IDS_VELOCITY_KILOMETERS_HOUR "Kilometers/hour"
|
||||
IDS_VELOCITY_KNOTS "Knots"
|
||||
IDS_VELOCITY_MACH "Mach"
|
||||
|
@@ -309,7 +309,7 @@ CAPTION "Om ReactOS kalkulator"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,105,148,52,16
|
||||
CONTROL IDB_BITMAP_ROS,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE |
|
||||
CONTROL 106,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE |
|
||||
SS_REALSIZEIMAGE | WS_BORDER,4,4,104,48
|
||||
LTEXT "ReactOS kalkulator",IDC_STATIC,120,12,132,8,
|
||||
SS_CENTERIMAGE
|
||||
@@ -337,37 +337,38 @@ BEGIN
|
||||
SS_SUNKEN
|
||||
END
|
||||
|
||||
|
||||
// Menus
|
||||
|
||||
IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "Rediger"
|
||||
BEGIN
|
||||
MENUITEM "Kopier\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Lim inn\tCTRL-V", IDM_EDIT_PASTE
|
||||
MENUITEM "Kopier\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Lim inn\tCTRL-V", IDM_EDIT_PASTE
|
||||
END
|
||||
POPUP "Vis"
|
||||
BEGIN
|
||||
MENUITEM "Standard", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "Vitenskapelig", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "Konvertering", IDM_VIEW_CONVERSION
|
||||
MENUITEM "Vitenskapelig", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "Konvertering", IDM_VIEW_CONVERSION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Heksadesimalt\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Desimalt\tF6", IDM_VIEW_DEC, CHECKED
|
||||
MENUITEM "Oktalt\tF7", IDM_VIEW_OCT, CHECKED
|
||||
MENUITEM "Heksadesimalt\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Desimalt\tF6", IDM_VIEW_DEC, CHECKED
|
||||
MENUITEM "Oktalt\tF7", IDM_VIEW_OCT, CHECKED
|
||||
MENUITEM "Bin<69>rt\tF8", IDM_VIEW_BIN, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Grader\tF2", IDM_VIEW_DEG, CHECKED
|
||||
MENUITEM "Radianer\tF3", IDM_VIEW_RAD, CHECKED
|
||||
MENUITEM "Gradienter\tF4", IDM_VIEW_GRAD, CHECKED
|
||||
MENUITEM "Grader\tF2", IDM_VIEW_DEG, CHECKED
|
||||
MENUITEM "Radianer\tF3", IDM_VIEW_RAD, CHECKED
|
||||
MENUITEM "Gradienter\tF4", IDM_VIEW_GRAD, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Siffergruppering", IDM_VIEW_GROUP, CHECKED
|
||||
MENUITEM "Siffergruppering", IDM_VIEW_GROUP, CHECKED
|
||||
END
|
||||
POPUP "Hjelp"
|
||||
BEGIN
|
||||
MENUITEM "Emner i hjelp", IDM_HELP_HELP
|
||||
MENUITEM "Emner i hjelp", IDM_HELP_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Om ReactOS kalkulator", IDM_HELP_ABOUT
|
||||
MENUITEM "Om ReactOS kalkulator", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
@@ -375,18 +376,18 @@ IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "Rediger"
|
||||
BEGIN
|
||||
MENUITEM "Kopier\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Lim inn\tCTRL-V", IDM_EDIT_PASTE
|
||||
MENUITEM "Kopier\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Lim inn\tCTRL-V", IDM_EDIT_PASTE
|
||||
END
|
||||
POPUP "Vis"
|
||||
BEGIN
|
||||
MENUITEM "Standard", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "Vitenskapelig", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "konvertering", IDM_VIEW_CONVERSION
|
||||
MENUITEM "Vitenskapelig", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "konvertering", IDM_VIEW_CONVERSION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Heksadesimalt\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Heksadesimalt\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Desimal\tF6", IDM_VIEW_DEC, CHECKED
|
||||
MENUITEM "Oktalt\tF7", IDM_VIEW_OCT, CHECKED
|
||||
MENUITEM "Oktalt\tF7", IDM_VIEW_OCT, CHECKED
|
||||
MENUITEM "Bin<69>rt\tF8", IDM_VIEW_BIN, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED
|
||||
@@ -394,13 +395,13 @@ BEGIN
|
||||
MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED
|
||||
MENUITEM "Tegn\tF4", IDM_VIEW_BYTE, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Digital gruppe", IDM_VIEW_GROUP, CHECKED
|
||||
MENUITEM "Digital gruppe", IDM_VIEW_GROUP, CHECKED
|
||||
END
|
||||
POPUP "Hjelp"
|
||||
BEGIN
|
||||
MENUITEM "Emner i hjelp", IDM_HELP_HELP
|
||||
MENUITEM "Emner i hjelp", IDM_HELP_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Om ReactOS Kalkulator", IDM_HELP_ABOUT
|
||||
MENUITEM "Om ReactOS Kalkulator", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
@@ -408,22 +409,22 @@ IDR_MENU_STANDARD MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "Rediger"
|
||||
BEGIN
|
||||
MENUITEM "Kopier\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Lim inn\tCTRL-V", IDM_EDIT_PASTE
|
||||
MENUITEM "Kopier\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Lim inn\tCTRL-V", IDM_EDIT_PASTE
|
||||
END
|
||||
POPUP "Vis"
|
||||
BEGIN
|
||||
MENUITEM "Standard", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "Vitenskapelig", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "konvertering", IDM_VIEW_CONVERSION
|
||||
MENUITEM "Vitenskapelig", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "konvertering", IDM_VIEW_CONVERSION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Siffergruppering", IDM_VIEW_GROUP, CHECKED
|
||||
MENUITEM "Siffergruppering", IDM_VIEW_GROUP, CHECKED
|
||||
END
|
||||
POPUP "Hjelp"
|
||||
BEGIN
|
||||
MENUITEM "Emner i hjelp", IDM_HELP_HELP
|
||||
MENUITEM "Emner i hjelp", IDM_HELP_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Om Reactos Kalkulator", IDM_HELP_ABOUT
|
||||
MENUITEM "Om Reactos Kalkulator", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
@@ -436,10 +437,9 @@ BEGIN
|
||||
IDS_QUICKHELP "Rask hjelp"
|
||||
END
|
||||
|
||||
// Types of conversion
|
||||
// types of conversion
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_CONV_ANGLE "Vinkel"
|
||||
IDS_CONV_AREA "Omr<6D>de"
|
||||
IDS_CONV_CONSUMPTION "Forbruk (maskin)"
|
||||
IDS_CONV_CURRENCY "Valuta"
|
||||
@@ -448,20 +448,11 @@ BEGIN
|
||||
IDS_CONV_POWER "Str<74>m"
|
||||
IDS_CONV_PRESSURE "Trykk"
|
||||
IDS_CONV_TEMPERATURE "Temperatur"
|
||||
IDS_CONV_TIME "Tid"
|
||||
IDS_CONV_VELOCITY "Hastighet"
|
||||
IDS_CONV_VOLUME "Volum"
|
||||
IDS_CONV_WEIGHT "Vekt"
|
||||
END
|
||||
|
||||
// TYPES OF ANGLES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ANGLE_DEGREES "Grader"
|
||||
IDS_ANGLE_GRADIANS "Gradianer"
|
||||
IDS_ANGLE_RADIANS "Radianer"
|
||||
END
|
||||
|
||||
// TYPES OF AREAS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
@@ -516,7 +507,6 @@ BEGIN
|
||||
IDS_CURRENCY_AUSTRIAN_SCHILLING "Austrian schilling"
|
||||
IDS_CURRENCY_BELGIAN_FRANC "Belgian franc"
|
||||
IDS_CURRENCY_CYPRIOT_POUND "Cypriot pound"
|
||||
IDS_CURRENCY_CZECH_KORUNA "Tsjekkisk koruna"
|
||||
IDS_CURRENCY_DEUTSCHE_MARK "Deutsche Mark"
|
||||
IDS_CURRENCY_DUTCH_GUILDER "Dutch guilder"
|
||||
IDS_CURRENCY_EURO "Euro"
|
||||
@@ -536,13 +526,9 @@ END
|
||||
// TYPES OF ENERGIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ENERGY_15_C_CALORIES "15 <EFBFBD>C calories"
|
||||
IDS_ENERGY_BTUS "British Thermal Units"
|
||||
IDS_ENERGY_15_C_CALORIES "15 ^C calories"
|
||||
IDS_ENERGY_ERGS "Ergs"
|
||||
IDS_ENERGY_EVS "Electron-Volts"
|
||||
IDS_ENERGY_FOOT_POUNDS "Foot-Pounds"
|
||||
IDS_ENERGY_IT_CALORIES "International Table calories"
|
||||
IDS_ENERGY_IT_KILOCALORIES "International Table kilocalories"
|
||||
IDS_ENERGY_JOULES "Joules"
|
||||
IDS_ENERGY_KILOJOULES "Kilojoules"
|
||||
IDS_ENERGY_KILOWATT_HOURS "Kilowatt hours"
|
||||
@@ -580,7 +566,6 @@ BEGIN
|
||||
IDS_LENGTH_LIGHT_YEARS "Light years"
|
||||
IDS_LENGTH_LINKS_UK "Links (UK)"
|
||||
IDS_LENGTH_METERS "Meters"
|
||||
IDS_LENGTH_MICRONS "Microns"
|
||||
IDS_LENGTH_MILES "Miles"
|
||||
IDS_LENGTH_MILLIMETERS "Millimeters"
|
||||
IDS_LENGTH_NAUTICAL_MILES "Nautical miles"
|
||||
@@ -589,7 +574,6 @@ BEGIN
|
||||
IDS_LENGTH_PICAS "Picas"
|
||||
IDS_LENGTH_RI_JAPAN "Ri (Japan)"
|
||||
IDS_LENGTH_RI_KOREA "Ri (Korea)"
|
||||
IDS_LENGTH_RODS "Rods"
|
||||
IDS_LENGTH_SAWK "Sawk"
|
||||
IDS_LENGTH_SEN "Sen"
|
||||
IDS_LENGTH_SHAKU "Shaku"
|
||||
@@ -605,8 +589,6 @@ END
|
||||
// TYPES OF POWERS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_POWER_BTUS_PER_MINUTE "British Thermal Units per minute"
|
||||
IDS_POWER_FPS_PER_MINUTE "Foot-Pounds per minute"
|
||||
IDS_POWER_HORSEPOWER "hestekrefter"
|
||||
IDS_POWER_KILOWATTS "Kilowatt"
|
||||
IDS_POWER_MEGAWATTS "Megawatt"
|
||||
@@ -618,8 +600,6 @@ STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_PRESSURE_ATMOSPHERES "Atmosf<73>retrykk"
|
||||
IDS_PRESSURE_BARS "Bars"
|
||||
IDS_PRESSURE_HECTOPASCALS "Hectopascals"
|
||||
IDS_PRESSURE_KILOPASCALS "Kilopascals"
|
||||
IDS_PRESSURE_MM_OF_MERCURY "Millimeters of mercury"
|
||||
IDS_PRESSURE_PASCALS "Pascals"
|
||||
IDS_PRESSURE_PSI "Pounds-force per square inch"
|
||||
@@ -634,25 +614,10 @@ BEGIN
|
||||
IDS_TEMPERATURE_RANKINE "Rankine"
|
||||
END
|
||||
|
||||
// TYPES OF TIME
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_TIME_DAYS "**"
|
||||
IDS_TIME_HOURS "**"
|
||||
IDS_TIME_MICROSECONDS "**"
|
||||
IDS_TIME_MILLISECONDS "**"
|
||||
IDS_TIME_MINUTES "**"
|
||||
IDS_TIME_SECONDS "**"
|
||||
IDS_TIME_WEEKS "**"
|
||||
IDS_TIME_YEARS "**"
|
||||
END
|
||||
|
||||
// TYPES OF VELOCITIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_VELOCITY_CMS_SECOND "Centimeters/hour"
|
||||
IDS_VELOCITY_FEET_HOUR "Feet/time"
|
||||
IDS_VELOCITY_FEET_SECOND "Feet/second"
|
||||
IDS_VELOCITY_KILOMETERS_HOUR "kilometer/time"
|
||||
IDS_VELOCITY_KNOTS "Knot"
|
||||
IDS_VELOCITY_MACH "Mach"
|
||||
@@ -699,33 +664,3 @@ BEGIN
|
||||
IDS_VOLUME_TO "To"
|
||||
END
|
||||
|
||||
// TYPES OF WEIGHTS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_WEIGHT_BAHT "Baht"
|
||||
IDS_WEIGHT_CARATS "Carats"
|
||||
IDS_WEIGHT_CHUNG "Chung"
|
||||
IDS_WEIGHT_DON "Don"
|
||||
IDS_WEIGHT_GEUN "Geun"
|
||||
IDS_WEIGHT_GRAMS "Grams"
|
||||
IDS_WEIGHT_GWAN "Gwan"
|
||||
IDS_WEIGHT_HARB "Harb"
|
||||
IDS_WEIGHT_JIN_CHINA "Jin (China)"
|
||||
IDS_WEIGHT_JIN_TAIWAN "Jin (Taiwan)"
|
||||
IDS_WEIGHT_KAN "Kan"
|
||||
IDS_WEIGHT_KILOGRAMS "Kilograms"
|
||||
IDS_WEIGHT_KIN "Kin"
|
||||
IDS_WEIGHT_LIANG_CHINA "Liang (China)"
|
||||
IDS_WEIGHT_LIANG_TAIWAN "Liang (Taiwan)"
|
||||
IDS_WEIGHT_MONME "Monme"
|
||||
IDS_WEIGHT_OUNCES_AVOIRDUPOIS "Ounces, avoirdupois"
|
||||
IDS_WEIGHT_OUNCES_TROY "Ounces, troy"
|
||||
IDS_WEIGHT_POUNDS "Pounds"
|
||||
IDS_WEIGHT_QUINTAL_METRIC "Quintal (metric)"
|
||||
IDS_WEIGHT_SALOUNG "Saloung"
|
||||
IDS_WEIGHT_STONES "Stones"
|
||||
IDS_WEIGHT_TAMLUNG "Tamlung"
|
||||
IDS_WEIGHT_TONNES "Tonnes"
|
||||
IDS_WEIGHT_TONS_UK "Tons (UK)"
|
||||
IDS_WEIGHT_TONS_US "Tons (US)"
|
||||
END
|
||||
|
@@ -16,10 +16,14 @@ MENU IDR_MENU_SCIENTIFIC_1
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "",IDC_STATIC,4,16,132,21
|
||||
CONTROL "Hex",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,10
|
||||
CONTROL "Dec",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,10
|
||||
CONTROL "Oct",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,10
|
||||
CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,26,10
|
||||
CONTROL "Hex",IDC_RADIO_HEX,"Button",BS_AUTORADIOBUTTON,8,24,29,
|
||||
10
|
||||
CONTROL "Dec",IDC_RADIO_DEC,"Button",BS_AUTORADIOBUTTON,40,24,29,
|
||||
10
|
||||
CONTROL "Oct",IDC_RADIO_OCT,"Button",BS_AUTORADIOBUTTON,72,24,27,
|
||||
10
|
||||
CONTROL "Bin",IDC_RADIO_BIN,"Button",BS_AUTORADIOBUTTON,100,24,
|
||||
26,10
|
||||
GROUPBOX "",IDC_STATIC,4,36,76,21
|
||||
CONTROL "Inv",IDC_CHECK_INV,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,8,44,26,10
|
||||
@@ -344,37 +348,38 @@ BEGIN
|
||||
SS_SUNKEN
|
||||
END
|
||||
|
||||
|
||||
// Menus
|
||||
|
||||
IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "Edycja"
|
||||
BEGIN
|
||||
MENUITEM "Kopiuj\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Kopiuj\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Wklej\tCTRL-V", IDM_EDIT_PASTE
|
||||
END
|
||||
POPUP "Wygl<67>d"
|
||||
BEGIN
|
||||
MENUITEM "Standardowy", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "Naukowy", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "Przeliczanie", IDM_VIEW_CONVERSION
|
||||
MENUITEM "Standardowy", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "Naukowy", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "Przeliczanie", IDM_VIEW_CONVERSION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Szesnastkowo\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Dziesi<73>tnie\tF6", IDM_VIEW_DEC, CHECKED
|
||||
MENUITEM "<22>semkowo\tF7", IDM_VIEW_OCT, CHECKED
|
||||
MENUITEM "Binarnie\tF8", IDM_VIEW_BIN, CHECKED
|
||||
MENUITEM "Szesnastkowo\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Dziesi<73>tnie\tF6", IDM_VIEW_DEC, CHECKED
|
||||
MENUITEM "<22>semkowo\tF7", IDM_VIEW_OCT, CHECKED
|
||||
MENUITEM "Binarnie\tF8", IDM_VIEW_BIN, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Stopni\tF2", IDM_VIEW_DEG, CHECKED
|
||||
MENUITEM "Radian<61>w\tF3", IDM_VIEW_RAD, CHECKED
|
||||
MENUITEM "Gradian<61>w\tF4", IDM_VIEW_GRAD, CHECKED
|
||||
MENUITEM "Stopni\tF2", IDM_VIEW_DEG, CHECKED
|
||||
MENUITEM "Radian<61>w\tF3", IDM_VIEW_RAD, CHECKED
|
||||
MENUITEM "Gradian<61>w\tF4", IDM_VIEW_GRAD, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Grupowanie cyfr", IDM_VIEW_GROUP, CHECKED
|
||||
MENUITEM "Grupowanie cyfr", IDM_VIEW_GROUP, CHECKED
|
||||
END
|
||||
POPUP "Pomoc"
|
||||
BEGIN
|
||||
MENUITEM "Tematy pomocy", IDM_HELP_HELP
|
||||
MENUITEM "Tematy pomocy", IDM_HELP_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "O Kalkulatorze ReactOS", IDM_HELP_ABOUT
|
||||
MENUITEM "O Kalkulatorze ReactOS", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
@@ -382,32 +387,32 @@ IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "Edycja"
|
||||
BEGIN
|
||||
MENUITEM "Kopiuj\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Kopiuj\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Wklej\tCTRL-V", IDM_EDIT_PASTE
|
||||
END
|
||||
POPUP "Wygl<67>d"
|
||||
BEGIN
|
||||
MENUITEM "Standardowy", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "Naukowy", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "Przeliczanie", IDM_VIEW_CONVERSION
|
||||
MENUITEM "Standardowy", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "Naukowy", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "Przeliczanie", IDM_VIEW_CONVERSION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Szesnastkowo\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Dziesi<73>tnie\tF6", IDM_VIEW_DEC, CHECKED
|
||||
MENUITEM "<22>semkowo\tF7", IDM_VIEW_OCT, CHECKED
|
||||
MENUITEM "Binarnie\tF8", IDM_VIEW_BIN, CHECKED
|
||||
MENUITEM "Szesnastkowo\tF5", IDM_VIEW_HEX, CHECKED
|
||||
MENUITEM "Dziesi<73>tnie\tF6", IDM_VIEW_DEC, CHECKED
|
||||
MENUITEM "<22>semkowo\tF7", IDM_VIEW_OCT, CHECKED
|
||||
MENUITEM "Binarnie\tF8", IDM_VIEW_BIN, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Qword\tF12", IDM_VIEW_QWORD, CHECKED
|
||||
MENUITEM "Dword\tF2", IDM_VIEW_DWORD, CHECKED
|
||||
MENUITEM "Word\tF3", IDM_VIEW_WORD, CHECKED
|
||||
MENUITEM "Bajt\tF4", IDM_VIEW_BYTE, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Grupowanie cyfr", IDM_VIEW_GROUP, CHECKED
|
||||
MENUITEM "Grupowanie cyfr", IDM_VIEW_GROUP, CHECKED
|
||||
END
|
||||
POPUP "Pomoc"
|
||||
BEGIN
|
||||
MENUITEM "Tematy pomocy", IDM_HELP_HELP
|
||||
MENUITEM "Tematy pomocy", IDM_HELP_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "O Kalkulatorze ReactOS", IDM_HELP_ABOUT
|
||||
MENUITEM "O Kalkulatorze ReactOS", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
@@ -415,22 +420,22 @@ IDR_MENU_STANDARD MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "Edycja"
|
||||
BEGIN
|
||||
MENUITEM "Kopiuj\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Kopiuj\tCTRL-C", IDM_EDIT_COPY
|
||||
MENUITEM "Wklej\tCTRL-V", IDM_EDIT_PASTE
|
||||
END
|
||||
POPUP "Wygl<67>d"
|
||||
BEGIN
|
||||
MENUITEM "Standardowy", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "Naukowy", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "Przeliczanie", IDM_VIEW_CONVERSION
|
||||
MENUITEM "Standardowy", IDM_VIEW_STANDARD, CHECKED
|
||||
MENUITEM "Naukowy", IDM_VIEW_SCIENTIFIC, CHECKED
|
||||
MENUITEM "Przeliczanie", IDM_VIEW_CONVERSION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Grupowanie cyfr", IDM_VIEW_GROUP, CHECKED
|
||||
MENUITEM "Grupowanie cyfr", IDM_VIEW_GROUP, CHECKED
|
||||
END
|
||||
POPUP "Pomoc"
|
||||
BEGIN
|
||||
MENUITEM "Tematy pomocy", IDM_HELP_HELP
|
||||
MENUITEM "Tematy pomocy", IDM_HELP_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "O Kalkulatorze ReactOS", IDM_HELP_ABOUT
|
||||
MENUITEM "O Kalkulatorze ReactOS", IDM_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
@@ -443,10 +448,9 @@ BEGIN
|
||||
IDS_QUICKHELP "Szybka pomoc"
|
||||
END
|
||||
|
||||
// Types of conversion
|
||||
// types of conversion
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_CONV_ANGLE "K<>t"
|
||||
IDS_CONV_AREA "Powierzchnia"
|
||||
IDS_CONV_CONSUMPTION "Zu<5A>ycie (silniki)"
|
||||
IDS_CONV_CURRENCY "Waluty"
|
||||
@@ -455,20 +459,11 @@ BEGIN
|
||||
IDS_CONV_POWER "Moc"
|
||||
IDS_CONV_PRESSURE "Ci<43>nienie"
|
||||
IDS_CONV_TEMPERATURE "Temperatura"
|
||||
IDS_CONV_TIME "Czas"
|
||||
IDS_CONV_VELOCITY "Pr<50>dko<6B><6F>"
|
||||
IDS_CONV_VOLUME "Obj<62>to<74><6F>"
|
||||
IDS_CONV_WEIGHT "Waga"
|
||||
END
|
||||
|
||||
// TYPES OF ANGLES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ANGLE_DEGREES "Stopni"
|
||||
IDS_ANGLE_GRADIANS "Gradian<61>w"
|
||||
IDS_ANGLE_RADIANS "Radian<61>w"
|
||||
END
|
||||
|
||||
// TYPES OF AREAS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
@@ -523,7 +518,6 @@ BEGIN
|
||||
IDS_CURRENCY_AUSTRIAN_SCHILLING "Austriacki szyling"
|
||||
IDS_CURRENCY_BELGIAN_FRANC "Belgijski frank"
|
||||
IDS_CURRENCY_CYPRIOT_POUND "Cypryjski funt"
|
||||
IDS_CURRENCY_CZECH_KORUNA "Czeska korona"
|
||||
IDS_CURRENCY_DEUTSCHE_MARK "Niemiecka marka"
|
||||
IDS_CURRENCY_DUTCH_GUILDER "Holenderki gulden"
|
||||
IDS_CURRENCY_EURO "Euro"
|
||||
@@ -543,13 +537,9 @@ END
|
||||
// TYPES OF ENERGIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ENERGY_15_C_CALORIES "15 <EFBFBD>C kalorii"
|
||||
IDS_ENERGY_BTUS "British Thermal Unit"
|
||||
IDS_ENERGY_15_C_CALORIES "15 ^C kalorii"
|
||||
IDS_ENERGY_ERGS "Erg<72>w"
|
||||
IDS_ENERGY_EVS "Elektronowolt"
|
||||
IDS_ENERGY_FOOT_POUNDS "Foot-pound"
|
||||
IDS_ENERGY_IT_CALORIES "Mi<4D>dzynarodowa Tablica kalorii"
|
||||
IDS_ENERGY_IT_KILOCALORIES "Mi<4D>dzynarodowa Tablica kilokalorii"
|
||||
IDS_ENERGY_JOULES "D<>uli"
|
||||
IDS_ENERGY_KILOJOULES "Kilod<6F>uli"
|
||||
IDS_ENERGY_KILOWATT_HOURS "Kilowatogodzin"
|
||||
@@ -587,7 +577,6 @@ BEGIN
|
||||
IDS_LENGTH_LIGHT_YEARS "Lat <20>wietlnych"
|
||||
IDS_LENGTH_LINKS_UK "Links (UK)"
|
||||
IDS_LENGTH_METERS "Metr<74>w"
|
||||
IDS_LENGTH_MICRONS "Mikrometr<74>w"
|
||||
IDS_LENGTH_MILES "Mil"
|
||||
IDS_LENGTH_MILLIMETERS "Millimetr<74>w"
|
||||
IDS_LENGTH_NAUTICAL_MILES "Mil morskich"
|
||||
@@ -596,7 +585,6 @@ BEGIN
|
||||
IDS_LENGTH_PICAS "Picas"
|
||||
IDS_LENGTH_RI_JAPAN "Ri (Japan)"
|
||||
IDS_LENGTH_RI_KOREA "Ri (Korea)"
|
||||
IDS_LENGTH_RODS "Rods"
|
||||
IDS_LENGTH_SAWK "Sawk"
|
||||
IDS_LENGTH_SEN "Sen"
|
||||
IDS_LENGTH_SHAKU "Shaku"
|
||||
@@ -612,8 +600,6 @@ END
|
||||
// TYPES OF POWERS
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_POWER_BTUS_PER_MINUTE "BTU na minut<75>"
|
||||
IDS_POWER_FPS_PER_MINUTE "Foot-pound na minut<75>"
|
||||
IDS_POWER_HORSEPOWER "Koni mechanicznych"
|
||||
IDS_POWER_KILOWATTS "Kilowat<61>w"
|
||||
IDS_POWER_MEGAWATTS "Megawat<61>w"
|
||||
@@ -625,8 +611,6 @@ STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_PRESSURE_ATMOSPHERES "Atmosfer"
|
||||
IDS_PRESSURE_BARS "Bar<61>w"
|
||||
IDS_PRESSURE_HECTOPASCALS "Hektopaskali"
|
||||
IDS_PRESSURE_KILOPASCALS "Kilopaskali"
|
||||
IDS_PRESSURE_MM_OF_MERCURY "Millimetr<74>w s<>upka rt<72>ci"
|
||||
IDS_PRESSURE_PASCALS "Paskali"
|
||||
IDS_PRESSURE_PSI "Funt<6E>w na cal kwadratowy"
|
||||
@@ -641,25 +625,10 @@ BEGIN
|
||||
IDS_TEMPERATURE_RANKINE "Rankina"
|
||||
END
|
||||
|
||||
// TYPES OF TIME
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_TIME_DAYS "Dni"
|
||||
IDS_TIME_HOURS "Godzin"
|
||||
IDS_TIME_MICROSECONDS "Mikrosekund"
|
||||
IDS_TIME_MILLISECONDS "Milisekund"
|
||||
IDS_TIME_MINUTES "Minut"
|
||||
IDS_TIME_SECONDS "Sekund"
|
||||
IDS_TIME_WEEKS "Tygodni"
|
||||
IDS_TIME_YEARS "Lat"
|
||||
END
|
||||
|
||||
// TYPES OF VELOCITIES
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_VELOCITY_CMS_SECOND "Centimetr<74>w/sekund<6E>"
|
||||
IDS_VELOCITY_FEET_HOUR "St<53>p/godzin<69>"
|
||||
IDS_VELOCITY_FEET_SECOND "St<53>p/sekund<6E>"
|
||||
IDS_VELOCITY_KILOMETERS_HOUR "Kilometr<74>w/godzin<69>"
|
||||
IDS_VELOCITY_KNOTS "W<>z<EFBFBD><7A>w"
|
||||
IDS_VELOCITY_MACH "Mach<63>w"
|
||||
|
@@ -640,7 +640,7 @@ BEGIN
|
||||
IDS_TIME_DAYS "<22><><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_HOURS "<22><><EFBFBD>"
|
||||
IDS_TIME_MICROSECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MILLISECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MILISECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MINUTES "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_SECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_WEEKS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
|
@@ -649,7 +649,7 @@ BEGIN
|
||||
IDS_TIME_DAYS "Dni"
|
||||
IDS_TIME_HOURS "Hodiny"
|
||||
IDS_TIME_MICROSECONDS "Mikrosekundy"
|
||||
IDS_TIME_MILLISECONDS "Milisekundy"
|
||||
IDS_TIME_MILISECONDS "Milisekundy"
|
||||
IDS_TIME_MINUTES "Min<69>ty"
|
||||
IDS_TIME_YEARS "Roky"
|
||||
IDS_TIME_SECONDS "Sekundy"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ReactOS Calc (Thai resource file)
|
||||
* Last modified: 2009-02-02
|
||||
* Last modified: 2009-01-27
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_THAI, SUBLANG_DEFAULT
|
||||
@@ -645,7 +645,7 @@ BEGIN
|
||||
IDS_TIME_DAYS "Days"
|
||||
IDS_TIME_HOURS "Hours"
|
||||
IDS_TIME_MICROSECONDS "Microseconds"
|
||||
IDS_TIME_MILLISECONDS "Milliseconds"
|
||||
IDS_TIME_MILISECONDS "Miliseconds"
|
||||
IDS_TIME_MINUTES "Minutes"
|
||||
IDS_TIME_SECONDS "Seconds"
|
||||
IDS_TIME_WEEKS "Weeks"
|
||||
|
@@ -648,7 +648,7 @@ BEGIN
|
||||
IDS_TIME_DAYS "<22><><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_HOURS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MICROSECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MILLISECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MILISECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_MINUTES "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_SECONDS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
IDS_TIME_WEEKS "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
|
@@ -275,7 +275,7 @@
|
||||
#define IDS_TIME_DAYS 3001
|
||||
#define IDS_TIME_HOURS 3002
|
||||
#define IDS_TIME_MICROSECONDS 3003
|
||||
#define IDS_TIME_MILLISECONDS 3004
|
||||
#define IDS_TIME_MILISECONDS 3004
|
||||
#define IDS_TIME_MINUTES 3005
|
||||
#define IDS_TIME_SECONDS 3006
|
||||
#define IDS_TIME_WEEKS 3007
|
||||
|
@@ -13,9 +13,6 @@
|
||||
<directory name="hostname">
|
||||
<xi:include href="hostname/hostname.rbuild" />
|
||||
</directory>
|
||||
<directory name="lodctr">
|
||||
<xi:include href="lodctr/lodctr.rbuild" />
|
||||
</directory>
|
||||
<directory name="more">
|
||||
<xi:include href="more/more.rbuild" />
|
||||
</directory>
|
||||
|
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
|
||||
<module name="lodctr" type="win32cui" installbase="system32" installname="lodctr.exe" unicode="yes">
|
||||
<library>kernel32</library>
|
||||
<library>loadperf</library>
|
||||
<library>wine</library>
|
||||
<file>lodctr_main.c</file>
|
||||
</module>
|
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Andrey Turkin
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <loadperf.h>
|
||||
|
||||
int wmain(int argc, WCHAR *argv[])
|
||||
{
|
||||
return LoadPerfCounterTextStringsW(GetCommandLineW(), FALSE);
|
||||
}
|
@@ -198,19 +198,12 @@ ReLoadGeneralPage(PINFO pInfo)
|
||||
|
||||
|
||||
static VOID
|
||||
GeneralOnInit(HWND hwnd,
|
||||
PINFO pInfo)
|
||||
GeneralOnInit(PINFO pInfo)
|
||||
{
|
||||
SetWindowLongPtrW(hwnd,
|
||||
GWLP_USERDATA,
|
||||
(LONG_PTR)pInfo);
|
||||
|
||||
pInfo->hGeneralPage = hwnd;
|
||||
|
||||
SetWindowPos(pInfo->hGeneralPage,
|
||||
NULL,
|
||||
2,
|
||||
22,
|
||||
13,
|
||||
110,
|
||||
0,
|
||||
0,
|
||||
SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
|
||||
@@ -256,13 +249,14 @@ GeneralDlgProc(HWND hDlg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
PINFO pInfo = (PINFO)GetWindowLongPtrW(hDlg,
|
||||
PINFO pInfo = (PINFO)GetWindowLongPtrW(GetParent(hDlg),
|
||||
GWLP_USERDATA);
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
GeneralOnInit(hDlg, (PINFO)lParam);
|
||||
pInfo->hGeneralPage = hDlg;
|
||||
GeneralOnInit(pInfo);
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
@@ -746,23 +740,16 @@ ReLoadDisplayPage(PINFO pInfo)
|
||||
|
||||
|
||||
static VOID
|
||||
DisplayOnInit(HWND hwnd,
|
||||
PINFO pInfo)
|
||||
DisplayOnInit(PINFO pInfo)
|
||||
{
|
||||
DISPLAY_DEVICEW displayDevice;
|
||||
DWORD iDevNum = 0;
|
||||
BOOL GotDev = FALSE;
|
||||
|
||||
SetWindowLongPtrW(hwnd,
|
||||
GWLP_USERDATA,
|
||||
(LONG_PTR)pInfo);
|
||||
|
||||
pInfo->hDisplayPage = hwnd;
|
||||
|
||||
SetWindowPos(pInfo->hDisplayPage,
|
||||
NULL,
|
||||
2,
|
||||
22,
|
||||
13,
|
||||
110,
|
||||
0,
|
||||
0,
|
||||
SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
|
||||
@@ -836,13 +823,14 @@ DisplayDlgProc(HWND hDlg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
PINFO pInfo = (PINFO)GetWindowLongPtrW(hDlg,
|
||||
PINFO pInfo = (PINFO)GetWindowLongPtrW(GetParent(hDlg),
|
||||
GWLP_USERDATA);
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
DisplayOnInit(hDlg, (PINFO)lParam);
|
||||
pInfo->hDisplayPage = hDlg;
|
||||
DisplayOnInit(pInfo);
|
||||
return TRUE;
|
||||
|
||||
case WM_DRAWITEM:
|
||||
@@ -986,11 +974,10 @@ OnMainCreate(HWND hwnd,
|
||||
pInfo->hTab = GetDlgItem(hwnd, IDC_TAB);
|
||||
if (pInfo->hTab)
|
||||
{
|
||||
if (CreateDialogParamW(hInst,
|
||||
MAKEINTRESOURCEW(IDD_GENERAL),
|
||||
pInfo->hTab,
|
||||
GeneralDlgProc,
|
||||
(LPARAM)pInfo))
|
||||
if (CreateDialogW(hInst,
|
||||
MAKEINTRESOURCEW(IDD_GENERAL),
|
||||
hwnd,
|
||||
(DLGPROC)GeneralDlgProc))
|
||||
{
|
||||
WCHAR str[256];
|
||||
ZeroMemory(&item, sizeof(TCITEM));
|
||||
@@ -1001,11 +988,10 @@ OnMainCreate(HWND hwnd,
|
||||
(void)TabCtrl_InsertItem(pInfo->hTab, 0, &item);
|
||||
}
|
||||
|
||||
if (CreateDialogParamW(hInst,
|
||||
MAKEINTRESOURCEW(IDD_DISPLAY),
|
||||
pInfo->hTab,
|
||||
DisplayDlgProc,
|
||||
(LPARAM)pInfo))
|
||||
if (CreateDialogW(hInst,
|
||||
MAKEINTRESOURCEW(IDD_DISPLAY),
|
||||
hwnd,
|
||||
(DLGPROC)DisplayDlgProc))
|
||||
{
|
||||
WCHAR str[256];
|
||||
ZeroMemory(&item, sizeof(TCITEM));
|
||||
|
@@ -130,9 +130,9 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
memcpy((char *)&sin.sin_addr, hp->h_addr, hp->h_length);
|
||||
sp = getservbyname("nicname", "tcp");
|
||||
sp = getservbyname("whois", "tcp");
|
||||
if (sp == NULL) {
|
||||
(void)fprintf(stderr, "whois: nicname/tcp: unknown service\n");
|
||||
(void)fprintf(stderr, "whois: whois/tcp: unknown service\n");
|
||||
cleanup(1);
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -108,9 +108,9 @@ ScmWriteDependencies(HKEY hServiceKey,
|
||||
|
||||
if (*lpDependencies == 0)
|
||||
{
|
||||
RegDeleteValueW(hServiceKey,
|
||||
RegDeleteValue(hServiceKey,
|
||||
L"DependOnService");
|
||||
RegDeleteValueW(hServiceKey,
|
||||
RegDeleteValue(hServiceKey,
|
||||
L"DependOnGroup");
|
||||
}
|
||||
else
|
||||
|
@@ -497,8 +497,8 @@ DWORD RCloseServiceHandle(
|
||||
it is now safe to delete the service */
|
||||
|
||||
/* Delete the Service Key */
|
||||
dwError = RegDeleteKeyW(hServicesKey,
|
||||
lpService->lpServiceName);
|
||||
dwError = RegDeleteKey(hServicesKey,
|
||||
lpService->lpServiceName);
|
||||
|
||||
RegCloseKey(hServicesKey);
|
||||
|
||||
|
@@ -9,7 +9,6 @@
|
||||
<property name="BASEADDRESS_RSABASE" value="0x35700000" />
|
||||
<property name="BASEADDRESS_RSAENH" value="0x35780000" />
|
||||
<property name="BASEADDRESS_DWMAPI" value="0x4A3F0000" />
|
||||
<property name="BASEADDRESS_LOADPERF" value="0x4B920000" />
|
||||
<property name="BASEADDRESS_MPRAPI" value="0x4C400000" />
|
||||
<property name="BASEADDRESS_PSTOREC" value="0x513D0000" />
|
||||
<property name="BASEADDRESS_LPK" value="0x516C0000" />
|
||||
@@ -17,7 +16,6 @@
|
||||
<property name="BASEADDRESS_PWRCFG" value="0x587e0000" />
|
||||
<property name="BASEADDRESS_MMSYS" value="0x588a0000" />
|
||||
<property name="BASEADDRESS_JOY" value="0x589b0000" />
|
||||
<property name="BASEADDRESS_QMGR" value="0x59620000" />
|
||||
<property name="BASEADDRESS_UXTHEME" value="0x5ad70000" />
|
||||
<property name="BASEADDRESS_VDMDBG" value="0x5b0d0000" />
|
||||
<property name="BASEADDRESS_UNTFS" value="0x5b340000" />
|
||||
@@ -194,7 +192,6 @@
|
||||
<property name="BASEADDRESS_VERSION" value="0x77a40000" />
|
||||
<property name="BASEADDRESS_OLE32" value="0x77a50000" />
|
||||
<property name="BASEADDRESS_OLEPRO32" value="0x77b10000" />
|
||||
<property name="BASEADDRESS_ACTIVEDS" value="0x77cb0000" />
|
||||
<property name="BASEADDRESS_ADVAPI32" value="0x77dc0000" />
|
||||
<property name="BASEADDRESS_USER32" value="0x77e30000" />
|
||||
<property name="BASEADDRESS_GDI32" value="0x77f70000" />
|
||||
|
@@ -20,7 +20,7 @@ HKCU,"Control Panel\Desktop","PaintDesktopVersion",0x00010001,"0"
|
||||
HKCU,"Control Panel\Desktop","HungAppTimeout",0x00000002,"5000"
|
||||
HKCU,"Control Panel\Desktop","SCRNSAVE.EXE",0x00000000,""
|
||||
HKCU,"Control Panel\Desktop","WaitToKillAppTimeout",0x00000002,"20000"
|
||||
HKCU,"Control Panel\Desktop","Wallpaper",0x00000000,""
|
||||
HKCU,"Control Panel\Desktop","Wallpaper",0x00000000,"%SystemRoot%\Angelus_02_ROSWP.bmp"
|
||||
HKCU,"Control Panel\International",,0x00000012
|
||||
HKCU,"Control Panel\International","Locale",0x00000000,"0409"
|
||||
HKCU,"Control Panel\International\Geo","Nation",0x00000000,"1"
|
||||
|
@@ -37,11 +37,9 @@ base\applications\cmdutils\dbgprint\dbgprint.exe 1
|
||||
base\applications\cmdutils\doskey\doskey.exe 1
|
||||
base\applications\cmdutils\find\find.exe 1
|
||||
base\applications\cmdutils\hostname\hostname.exe 1
|
||||
base\applications\cmdutils\lodctr\lodctr.exe 1
|
||||
base\applications\cmdutils\more\more.exe 1
|
||||
base\applications\cmdutils\xcopy\xcopy.exe 1
|
||||
base\applications\control\control.exe 1
|
||||
base\applications\dxdiag\dxdiag.exe 1
|
||||
base\applications\mscutils\devmgmt\devmgmt.exe 1
|
||||
base\applications\mscutils\eventvwr\eventvwr.exe 1
|
||||
base\applications\games\solitaire\sol.exe 1
|
||||
@@ -66,7 +64,6 @@ base\applications\network\whois\whois.exe 1
|
||||
base\applications\notepad\notepad.exe 1
|
||||
base\applications\regedit\regedit.exe 4
|
||||
base\applications\regedit\clb\clb.dll 1
|
||||
base\applications\regedt32\regedt32.exe 1
|
||||
base\applications\sc\sc.exe 1
|
||||
base\applications\screensavers\3dtext\3dtext.scr 1
|
||||
base\applications\screensavers\logon\logon.scr 1
|
||||
@@ -121,19 +118,15 @@ dll\cpl\appwiz\appwiz.cpl 1
|
||||
dll\cpl\console\console.dll 1
|
||||
dll\cpl\desk\desk.cpl 1
|
||||
dll\cpl\hdwwiz\hdwwiz.cpl 1
|
||||
dll\cpl\input\input.dll 1
|
||||
dll\cpl\intl\intl.cpl 1
|
||||
dll\cpl\joy\joy.cpl 1
|
||||
;dll\cpl\liccpa\liccpa.cpl 1
|
||||
dll\cpl\main\main.cpl 1
|
||||
dll\cpl\mmsys\mmsys.cpl 1
|
||||
dll\cpl\ncpa\ncpa.cpl 1
|
||||
;dll\cpl\odbccp32\odbccp32.cpl 1
|
||||
dll\cpl\powercfg\powercfg.cpl 1
|
||||
dll\cpl\sysdm\sysdm.cpl 1
|
||||
;dll\cpl\telephon\telephon.cpl 1
|
||||
dll\cpl\timedate\timedate.cpl 1
|
||||
;dll\cpl\usrmgr\usrmgr.cpl 1
|
||||
dll\cpl\input\input.dll 1
|
||||
dll\cpl\joy\joy.cpl 1
|
||||
|
||||
dll\directx\dinput\dinput.dll 1
|
||||
dll\directx\dinput8\dinput8.dll 1
|
||||
@@ -237,7 +230,6 @@ dll\ntdll\ntdll.dll 1
|
||||
|
||||
dll\win32\acledit\acledit.dll 1
|
||||
dll\win32\aclui\aclui.dll 1
|
||||
dll\win32\activeds\activeds.dll 1
|
||||
dll\win32\advapi32\advapi32.dll 1
|
||||
dll\win32\advpack\advpack.dll 1
|
||||
dll\win32\atl\atl.dll 1
|
||||
@@ -284,7 +276,6 @@ dll\win32\iphlpapi\iphlpapi.dll 1
|
||||
dll\win32\itss\itss.dll 1
|
||||
dll\win32\jscript\jscript.dll 1
|
||||
dll\win32\kernel32\kernel32.dll 1
|
||||
dll\win32\loadperf\loadperf.dll 1
|
||||
dll\win32\localui\localui.dll 1
|
||||
dll\win32\lsasrv\lsasrv.dll 1
|
||||
dll\win32\lz32\lz32.dll 1
|
||||
@@ -334,7 +325,6 @@ dll\win32\powrprof\powrprof.dll 1
|
||||
dll\win32\printui\printui.dll 1
|
||||
dll\win32\psapi\psapi.dll 1
|
||||
dll\win32\pstorec\pstorec.dll 1
|
||||
dll\win32\qmgr\qmgr.dll 1
|
||||
dll\win32\rasapi32\rasapi32.dll 1
|
||||
dll\win32\rasdlg\rasdlg.dll 1
|
||||
dll\win32\rasman\rasman.dll 1
|
||||
@@ -694,7 +684,7 @@ modules\rostests\winetests\wininet\wininet_winetest.exe 7 o
|
||||
modules\rostests\winetests\wintrust\wintrust_winetest.exe 7 optional
|
||||
modules\rostests\winetests\ws2_32\ws2_32_winetest.exe 7 optional
|
||||
|
||||
modules\wallpaper\Angelus.02_ROSWP.bmp 4 optional
|
||||
modules\wallpaper\Angelus_02_ROSWP.bmp 4 optional
|
||||
|
||||
; Native libraries
|
||||
modules\windows\mfc42.dll 1 optional
|
||||
|
@@ -22,6 +22,10 @@ RenameProfDlgProc(HWND hwndDlg,
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0);
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
|
||||
{
|
||||
@@ -56,6 +60,7 @@ HardProfDlgProc(HWND hwndDlg,
|
||||
SendMessage(GetDlgItem(hwndDlg, IDC_HRDPROFDWN),
|
||||
BM_SETIMAGE,(WPARAM)IMAGE_ICON,
|
||||
(LPARAM)(HANDLE)LoadIcon(hApplet, MAKEINTRESOURCE(IDI_DOWN)));
|
||||
MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -139,6 +139,7 @@ UserProfileDlgProc(HWND hwndDlg,
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0);
|
||||
OnInitDialog(hwndDlg);
|
||||
break;
|
||||
|
||||
|
@@ -196,8 +196,6 @@ ClockWndProc(HWND hwnd,
|
||||
PATCOPY);
|
||||
|
||||
oldMap = SetMapMode(hdcMem, MM_ISOTROPIC);
|
||||
SetWindowExtEx(hdcMem, 3600, 2700, NULL);
|
||||
SetViewportExtEx(hdcMem, 800, -600, NULL);
|
||||
SetViewportOrgEx(hdcMem,
|
||||
pClockData->cxClient / 2,
|
||||
pClockData->cyClient / 2,
|
||||
|
@@ -362,6 +362,13 @@ StartDirectDrawHel(LPDIRECTDRAW iface, BOOL reenable)
|
||||
{
|
||||
LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface;
|
||||
|
||||
if (This->lpLcl->lpGbl->lpDDCBtmp == NULL)
|
||||
{
|
||||
DxHeapMemAlloc(This->lpLcl->lpGbl->lpDDCBtmp, sizeof(DDHAL_CALLBACKS));
|
||||
if (!This->lpLcl->lpGbl->lpDDCBtmp)
|
||||
return DDERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CanCreateSurface = HelDdCanCreateSurface;
|
||||
This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CreateSurface = HelDdCreateSurface;
|
||||
This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CreatePalette = HelDdCreatePalette;
|
||||
|
@@ -13,7 +13,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
@@ -74,7 +74,7 @@ const DIDATAFORMAT c_dfDIJoystick = {
|
||||
sizeof(DIDATAFORMAT),
|
||||
sizeof(DIOBJECTDATAFORMAT),
|
||||
DIDF_ABSAXIS,
|
||||
sizeof(DIJOYSTATE),
|
||||
sizeof(DIJOYSTATE2),
|
||||
numObjects(dfDIJoystick),
|
||||
(LPDIOBJECTDATAFORMAT)dfDIJoystick
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_DLLS_DINPUT_DINPUTDEVICE_PRIVATE_H
|
||||
@@ -25,98 +25,78 @@
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "dinput.h"
|
||||
#include "wine/list.h"
|
||||
#include "dinput_private.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int size;
|
||||
int offset_in;
|
||||
int offset_out;
|
||||
int value;
|
||||
} DataTransform;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int size;
|
||||
int internal_format_size;
|
||||
DataTransform *dt;
|
||||
|
||||
int *offsets; /* object offsets */
|
||||
LPDIDATAFORMAT wine_df; /* wine internal data format */
|
||||
LPDIDATAFORMAT user_df; /* user defined data format */
|
||||
} DataFormat;
|
||||
|
||||
/* Device implementation */
|
||||
typedef struct IDirectInputDevice2AImpl IDirectInputDevice2AImpl;
|
||||
struct IDirectInputDevice2AImpl
|
||||
{
|
||||
const void *lpVtbl;
|
||||
LONG ref;
|
||||
GUID guid;
|
||||
CRITICAL_SECTION crit;
|
||||
IDirectInputImpl *dinput;
|
||||
struct list entry; /* entry into IDirectInput devices list */
|
||||
HANDLE hEvent;
|
||||
DWORD dwCoopLevel;
|
||||
HWND win;
|
||||
int acquired;
|
||||
DI_EVENT_PROC event_proc; /* function to receive mouse & keyboard events */
|
||||
|
||||
LPDIDEVICEOBJECTDATA data_queue; /* buffer for 'GetDeviceData'. */
|
||||
int queue_len; /* size of the queue - set in 'SetProperty' */
|
||||
int queue_head; /* position to write new event into queue */
|
||||
int queue_tail; /* next event to read from queue */
|
||||
BOOL overflow; /* return DI_BUFFEROVERFLOW in 'GetDeviceData' */
|
||||
|
||||
DataFormat data_format; /* user data format and wine to user format converter */
|
||||
const IDirectInputDevice2AVtbl *lpVtbl;
|
||||
LONG ref;
|
||||
GUID guid;
|
||||
};
|
||||
|
||||
extern BOOL get_app_key(HKEY*, HKEY*);
|
||||
extern DWORD get_config_key(HKEY, HKEY, const char*, char*, DWORD);
|
||||
|
||||
/* Routines to do DataFormat / WineFormat conversions */
|
||||
extern void fill_DataFormat(void *out, DWORD size, const void *in, const DataFormat *df) ;
|
||||
typedef struct {
|
||||
int size;
|
||||
int offset_in;
|
||||
int offset_out;
|
||||
int value;
|
||||
} DataTransform;
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
int internal_format_size;
|
||||
DataTransform *dt;
|
||||
} DataFormat;
|
||||
extern void fill_DataFormat(void *out, const void *in, DataFormat *df) ;
|
||||
extern DataFormat *create_DataFormat(const DIDATAFORMAT *wine_format, LPCDIDATAFORMAT asked_format, int *offset) ;
|
||||
extern void release_DataFormat(DataFormat *df) ;
|
||||
extern void queue_event(LPDIRECTINPUTDEVICE8A iface, int ofs, DWORD data, DWORD time, DWORD seq);
|
||||
/* Helper functions to work with data format */
|
||||
extern int id_to_object(LPCDIDATAFORMAT df, int id);
|
||||
extern int id_to_offset(const DataFormat *df, int id);
|
||||
extern int find_property(const DataFormat *df, LPCDIPROPHEADER ph);
|
||||
|
||||
/* Common joystick stuff */
|
||||
typedef struct
|
||||
{
|
||||
LONG lDevMin;
|
||||
LONG lDevMax;
|
||||
LONG lMin;
|
||||
LONG lMax;
|
||||
LONG lDeadZone;
|
||||
LONG lSaturation;
|
||||
} ObjProps;
|
||||
/* Used to fill events in the queue */
|
||||
#define GEN_EVENT(offset,data,xtime,seq) \
|
||||
{ \
|
||||
/* If queue_len > 0, queuing is requested -> TRACE the event queued */ \
|
||||
if (This->queue_len > 0) { \
|
||||
int nq; \
|
||||
TRACE(" queueing %d at offset %d (queue head %d / size %d)\n", \
|
||||
(int) (data), (int) (offset), \
|
||||
(int) (This->queue_head), (int) (This->queue_len)); \
|
||||
\
|
||||
nq = This->queue_head+1; \
|
||||
while (nq >= This->queue_len) nq -= This->queue_len; \
|
||||
if ((offset >= 0) && (nq != This->queue_tail)) { \
|
||||
This->data_queue[This->queue_head].dwOfs = offset; \
|
||||
This->data_queue[This->queue_head].dwData = data; \
|
||||
This->data_queue[This->queue_head].dwTimeStamp = xtime; \
|
||||
This->data_queue[This->queue_head].dwSequence = seq; \
|
||||
This->queue_head = nq; \
|
||||
} else \
|
||||
This->overflow = TRUE; \
|
||||
} \
|
||||
}
|
||||
|
||||
extern DWORD joystick_map_pov(POINTL *p);
|
||||
extern LONG joystick_map_axis(ObjProps *props, int val);
|
||||
/**
|
||||
* Callback Data used by specific callback
|
||||
* for EnumObject on 'W' interfaces
|
||||
*/
|
||||
typedef struct {
|
||||
LPDIENUMDEVICEOBJECTSCALLBACKW lpCallBack;
|
||||
LPVOID lpvRef;
|
||||
} device_enumobjects_AtoWcb_data;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct list entry;
|
||||
LPDIRECTINPUTEFFECT ref;
|
||||
} effect_list_item;
|
||||
extern BOOL DIEnumDevicesCallbackAtoW(LPCDIDEVICEOBJECTINSTANCEA, LPVOID);
|
||||
|
||||
extern const GUID DInput_Wine_Keyboard_GUID;
|
||||
extern const GUID DInput_Wine_Mouse_GUID;
|
||||
|
||||
/* Various debug tools */
|
||||
extern void _dump_cooperativelevel_DI(DWORD dwFlags) ;
|
||||
extern void _dump_EnumObjects_flags(DWORD dwFlags) ;
|
||||
extern void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) ;
|
||||
extern void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) ;
|
||||
extern void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) ;
|
||||
extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ;
|
||||
extern void _dump_OBJECTINSTANCEW(DIDEVICEOBJECTINSTANCEW *ddoi) ;
|
||||
extern void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) ;
|
||||
extern const char *_dump_dinput_GUID(const GUID *guid) ;
|
||||
|
||||
/* And the stubs */
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_Acquire(LPDIRECTINPUTDEVICE8A iface);
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface);
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat(
|
||||
LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df ) ;
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
|
||||
@@ -138,19 +118,25 @@ extern HRESULT WINAPI IDirectInputDevice2WImpl_EnumObjects(
|
||||
LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback,
|
||||
LPVOID lpvRef,
|
||||
DWORD dwFlags) ;
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPDIPROPHEADER pdiph);
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, REFGUID rguid, LPCDIPROPHEADER pdiph);
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
|
||||
LPDIRECTINPUTDEVICE8A iface,
|
||||
REFGUID rguid,
|
||||
LPDIPROPHEADER pdiph) ;
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo(
|
||||
LPDIRECTINPUTDEVICE8A iface,
|
||||
LPDIDEVICEOBJECTINSTANCEA pdidoi,
|
||||
DWORD dwObj,
|
||||
DWORD dwHow) ;
|
||||
extern HRESULT WINAPI IDirectInputDevice2WImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
|
||||
extern HRESULT WINAPI IDirectInputDevice2WImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
|
||||
LPDIDEVICEOBJECTINSTANCEW pdidoi,
|
||||
DWORD dwObj,
|
||||
DWORD dwHow);
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface,
|
||||
DWORD dodsize, LPDIDEVICEOBJECTDATA dod, LPDWORD entries, DWORD flags);
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo(
|
||||
LPDIRECTINPUTDEVICE8A iface,
|
||||
LPDIDEVICEINSTANCEA pdidi) ;
|
||||
extern HRESULT WINAPI IDirectInputDevice2WImpl_GetDeviceInfo(
|
||||
LPDIRECTINPUTDEVICE8W iface,
|
||||
LPDIDEVICEINSTANCEW pdidi) ;
|
||||
extern HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel(
|
||||
LPDIRECTINPUTDEVICE8A iface,
|
||||
HWND hwndOwner,
|
||||
|
@@ -3,7 +3,6 @@
|
||||
<module name="dinput" type="win32dll" baseaddress="${BASEADDRESS_DINPUT}" installbase="system32" installname="dinput.dll" unicode="yes">
|
||||
<autoregister infsection="OleControlDlls" type="DllRegisterServer" />
|
||||
<importlibrary definition="dinput.spec" />
|
||||
<define name="_WIN32_WINNT">0x600</define>
|
||||
<include base="dinput">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<library>wine</library>
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H
|
||||
@@ -24,25 +24,18 @@
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "dinput.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
/* Implementation specification */
|
||||
typedef struct IDirectInputImpl IDirectInputImpl;
|
||||
struct IDirectInputImpl
|
||||
{
|
||||
const IDirectInput7AVtbl *lpVtbl;
|
||||
const IDirectInput7WVtbl *lpVtbl7w;
|
||||
const IDirectInput8AVtbl *lpVtbl8a;
|
||||
const IDirectInput8WVtbl *lpVtbl8w;
|
||||
const void *lpVtbl;
|
||||
LONG ref;
|
||||
|
||||
LONG ref;
|
||||
/* Used to have an unique sequence number for all the events */
|
||||
DWORD evsequence;
|
||||
|
||||
CRITICAL_SECTION crit;
|
||||
struct list entry; /* entry into list of all IDirectInputs */
|
||||
|
||||
DWORD evsequence; /* unique sequence number for events */
|
||||
DWORD dwVersion; /* direct input version number */
|
||||
struct list devices_list; /* list of all created dinput devices */
|
||||
DWORD dwVersion;
|
||||
};
|
||||
|
||||
/* Function called by all devices that Wine supports */
|
||||
@@ -59,9 +52,6 @@ extern const struct dinput_device keyboard_device;
|
||||
extern const struct dinput_device joystick_linux_device;
|
||||
extern const struct dinput_device joystick_linuxinput_device;
|
||||
|
||||
extern void check_dinput_hooks(LPDIRECTINPUTDEVICE8A);
|
||||
typedef void (*DI_EVENT_PROC)(LPDIRECTINPUTDEVICE8A, WPARAM, LPARAM);
|
||||
|
||||
extern void _dump_diactionformatA(LPDIACTIONFORMATA);
|
||||
extern HINSTANCE DINPUT_instance;
|
||||
|
||||
#endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <string.h>
|
||||
#ifdef HAVE_LINUX_INPUT_H
|
||||
# include <linux/input.h>
|
||||
# undef SW_MAX
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
@@ -53,10 +52,11 @@ struct LinuxInputEffectImpl
|
||||
LONG ref;
|
||||
GUID guid;
|
||||
|
||||
struct ff_effect effect; /* Effect data */
|
||||
int gain; /* Effect gain */
|
||||
int* fd; /* Parent device */
|
||||
struct list *entry; /* Entry into the parent's list of effects */
|
||||
/* Effect data */
|
||||
struct ff_effect effect;
|
||||
|
||||
/* Parent device */
|
||||
int* fd;
|
||||
};
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ static DWORD _typeFromGUID(REFGUID guid)
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* DirectInputEffect debug helpers
|
||||
* DirectInputEffect debug helpers
|
||||
*/
|
||||
|
||||
static void _dump_DIEFFECT_flags(DWORD dwFlags)
|
||||
@@ -112,58 +112,59 @@ static void _dump_DIEFFECT_flags(DWORD dwFlags)
|
||||
};
|
||||
for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++)
|
||||
if (flags[i].mask & dwFlags)
|
||||
TRACE("%s ", flags[i].name);
|
||||
TRACE("\n");
|
||||
}
|
||||
DPRINTF("%s ", flags[i].name);
|
||||
DPRINTF("\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void _dump_DIENVELOPE(LPCDIENVELOPE env)
|
||||
static void _dump_DIENVELOPE(LPDIENVELOPE env)
|
||||
{
|
||||
if (env->dwSize != sizeof(DIENVELOPE)) {
|
||||
WARN("Non-standard DIENVELOPE structure size %d.\n", env->dwSize);
|
||||
WARN("Non-standard DIENVELOPE structure size (%ld instead of %d).\n",
|
||||
env->dwSize, sizeof(DIENVELOPE));
|
||||
}
|
||||
TRACE("Envelope has attack (level: %d time: %d), fade (level: %d time: %d)\n",
|
||||
TRACE("Envelope has attack (level: %ld time: %ld), fade (level: %ld time: %ld)\n",
|
||||
env->dwAttackLevel, env->dwAttackTime, env->dwFadeLevel, env->dwFadeTime);
|
||||
}
|
||||
|
||||
static void _dump_DICONSTANTFORCE(LPCDICONSTANTFORCE frc)
|
||||
{
|
||||
TRACE("Constant force has magnitude %d\n", frc->lMagnitude);
|
||||
}
|
||||
|
||||
static void _dump_DIPERIODIC(LPCDIPERIODIC frc)
|
||||
static void _dump_DICONSTANTFORCE(LPDICONSTANTFORCE frc)
|
||||
{
|
||||
TRACE("Periodic force has magnitude %d, offset %d, phase %d, period %d\n",
|
||||
TRACE("Constant force has magnitude %ld\n", frc->lMagnitude);
|
||||
}
|
||||
|
||||
static void _dump_DIPERIODIC(LPDIPERIODIC frc)
|
||||
{
|
||||
TRACE("Periodic force has magnitude %ld, offset %ld, phase %ld, period %ld\n",
|
||||
frc->dwMagnitude, frc->lOffset, frc->dwPhase, frc->dwPeriod);
|
||||
}
|
||||
|
||||
static void _dump_DIRAMPFORCE(LPCDIRAMPFORCE frc)
|
||||
static void _dump_DIRAMPFORCE(LPDIRAMPFORCE frc)
|
||||
{
|
||||
TRACE("Ramp force has start %d, end %d\n",
|
||||
TRACE("Ramp force has start %ld, end %ld\n",
|
||||
frc->lStart, frc->lEnd);
|
||||
}
|
||||
|
||||
static void _dump_DICONDITION(LPCDICONDITION frc)
|
||||
static void _dump_DICONDITION(LPDICONDITION frc)
|
||||
{
|
||||
TRACE("Condition has offset %d, pos/neg coefficients %d and %d, pos/neg saturations %d and %d, deadband %d\n",
|
||||
TRACE("Condition has offset %ld, pos/neg coefficients %ld and %ld, pos/neg saturations %ld and %ld, deadband %ld\n",
|
||||
frc->lOffset, frc->lPositiveCoefficient, frc->lNegativeCoefficient,
|
||||
frc->dwPositiveSaturation, frc->dwNegativeSaturation, frc->lDeadBand);
|
||||
}
|
||||
|
||||
static void _dump_DICUSTOMFORCE(LPCDICUSTOMFORCE frc)
|
||||
static void _dump_DICUSTOMFORCE(LPDICUSTOMFORCE frc)
|
||||
{
|
||||
unsigned int i;
|
||||
TRACE("Custom force uses %d channels, sample period %d. Has %d samples at %p.\n",
|
||||
TRACE("Custom force uses %ld channels, sample period %ld. Has %ld samples at %p.\n",
|
||||
frc->cChannels, frc->dwSamplePeriod, frc->cSamples, frc->rglForceData);
|
||||
if (frc->cSamples % frc->cChannels != 0)
|
||||
WARN("Custom force has a non-integral samples-per-channel count!\n");
|
||||
if (TRACE_ON(dinput)) {
|
||||
TRACE("Custom force data (time aligned, axes in order):\n");
|
||||
DPRINTF("Custom force data (time aligned, axes in order):\n");
|
||||
for (i = 1; i <= frc->cSamples; ++i) {
|
||||
TRACE("%d ", frc->rglForceData[i]);
|
||||
DPRINTF("%ld ", frc->rglForceData[i]);
|
||||
if (i % frc->cChannels == 0)
|
||||
TRACE("\n");
|
||||
}
|
||||
DPRINTF("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,42 +174,43 @@ static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid)
|
||||
DWORD type = _typeFromGUID(guid);
|
||||
|
||||
TRACE("Dumping DIEFFECT structure:\n");
|
||||
TRACE(" - dwSize: %d\n", eff->dwSize);
|
||||
TRACE(" - dwSize: %ld\n", eff->dwSize);
|
||||
if ((eff->dwSize != sizeof(DIEFFECT)) && (eff->dwSize != sizeof(DIEFFECT_DX5))) {
|
||||
WARN("Non-standard DIEFFECT structure size %d\n", eff->dwSize);
|
||||
WARN("Non-standard DIEFFECT structure size (%ld instead of %d or %d).\n",
|
||||
eff->dwSize, sizeof(DIEFFECT), sizeof(DIEFFECT_DX5));
|
||||
}
|
||||
TRACE(" - dwFlags: %d\n", eff->dwFlags);
|
||||
TRACE(" - dwFlags: %ld\n", eff->dwFlags);
|
||||
TRACE(" ");
|
||||
_dump_DIEFFECT_flags(eff->dwFlags);
|
||||
TRACE(" - dwDuration: %d\n", eff->dwDuration);
|
||||
TRACE(" - dwGain: %d\n", eff->dwGain);
|
||||
if (eff->dwGain > 10000)
|
||||
WARN("dwGain is out of range (>10,000)\n");
|
||||
TRACE(" - dwTriggerButton: %d\n", eff->dwTriggerButton);
|
||||
TRACE(" - dwTriggerRepeatInterval: %d\n", eff->dwTriggerRepeatInterval);
|
||||
TRACE(" - cAxes: %d\n", eff->cAxes);
|
||||
_dump_DIEFFECT_flags(eff->dwFlags);
|
||||
TRACE(" - dwDuration: %ld\n", eff->dwDuration);
|
||||
TRACE(" - dwGain: %ld\n", eff->dwGain);
|
||||
if ((eff->dwGain > 10000) || (eff->dwGain < 0))
|
||||
WARN("dwGain is out of range (0 - 10,000)\n");
|
||||
TRACE(" - dwTriggerButton: %ld\n", eff->dwTriggerButton);
|
||||
TRACE(" - dwTriggerRepeatInterval: %ld\n", eff->dwTriggerRepeatInterval);
|
||||
TRACE(" - cAxes: %ld\n", eff->cAxes);
|
||||
TRACE(" - rgdwAxes: %p\n", eff->rgdwAxes);
|
||||
if (TRACE_ON(dinput) && eff->rgdwAxes) {
|
||||
TRACE(" ");
|
||||
if (TRACE_ON(dinput)) {
|
||||
TRACE(" ");
|
||||
for (i = 0; i < eff->cAxes; ++i)
|
||||
TRACE("%d ", eff->rgdwAxes[i]);
|
||||
TRACE("\n");
|
||||
DPRINTF("%ld ", eff->rgdwAxes[i]);
|
||||
DPRINTF("\n");
|
||||
}
|
||||
TRACE(" - rglDirection: %p\n", eff->rglDirection);
|
||||
TRACE(" - lpEnvelope: %p\n", eff->lpEnvelope);
|
||||
TRACE(" - cbTypeSpecificParams: %d\n", eff->cbTypeSpecificParams);
|
||||
TRACE(" - cbTypeSpecificParams: %ld\n", eff->cbTypeSpecificParams);
|
||||
TRACE(" - lpvTypeSpecificParams: %p\n", eff->lpvTypeSpecificParams);
|
||||
if (eff->dwSize > sizeof(DIEFFECT_DX5))
|
||||
TRACE(" - dwStartDelay: %d\n", eff->dwStartDelay);
|
||||
TRACE(" - dwStartDelay: %ld\n", eff->dwStartDelay);
|
||||
if (eff->lpEnvelope != NULL)
|
||||
_dump_DIENVELOPE(eff->lpEnvelope);
|
||||
if (type == DIEFT_CONSTANTFORCE) {
|
||||
if (eff->cbTypeSpecificParams != sizeof(DICONSTANTFORCE)) {
|
||||
WARN("Effect claims to be a constant force but the type-specific params are the wrong size!\n");
|
||||
WARN("Effect claims to be a constant force but the type-specific params are the wrong size!\n");
|
||||
} else {
|
||||
_dump_DICONSTANTFORCE(eff->lpvTypeSpecificParams);
|
||||
}
|
||||
} else if (type == DIEFT_PERIODIC) {
|
||||
} else if (type == DIEFT_PERIODIC) {
|
||||
if (eff->cbTypeSpecificParams != sizeof(DIPERIODIC)) {
|
||||
WARN("Effect claims to be a periodic force but the type-specific params are the wrong size!\n");
|
||||
} else {
|
||||
@@ -220,7 +222,7 @@ static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid)
|
||||
} else {
|
||||
_dump_DIRAMPFORCE(eff->lpvTypeSpecificParams);
|
||||
}
|
||||
} else if (type == DIEFT_CONDITION) {
|
||||
} else if (type == DIEFT_CONDITION) {
|
||||
if (eff->cbTypeSpecificParams != sizeof(DICONDITION)) {
|
||||
WARN("Effect claims to be a condition but the type-specific params are the wrong size!\n");
|
||||
} else {
|
||||
@@ -237,7 +239,7 @@ static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid)
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* LinuxInputEffectImpl
|
||||
* LinuxInputEffectImpl
|
||||
*/
|
||||
|
||||
static ULONG WINAPI LinuxInputEffectImpl_AddRef(
|
||||
@@ -258,7 +260,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Download(
|
||||
if (errno == ENOMEM) {
|
||||
return DIERR_DEVICEFULL;
|
||||
} else {
|
||||
FIXME("Could not upload effect. Assuming a disconnected device %d \"%s\".\n", *This->fd, strerror(errno));
|
||||
FIXME("Could not upload effect. Assuming a disconnected device.\n");
|
||||
return DIERR_INPUTLOST;
|
||||
}
|
||||
}
|
||||
@@ -270,7 +272,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Escape(
|
||||
LPDIRECTINPUTEFFECT iface,
|
||||
LPDIEFFESCAPE pesc)
|
||||
{
|
||||
WARN("(this=%p,%p): invalid: no hardware-specific escape codes in this"
|
||||
WARN("(this=%p,%p): invalid: no hardware-specific escape codes in this"
|
||||
" driver!\n", iface, pesc);
|
||||
|
||||
return DI_OK;
|
||||
@@ -285,7 +287,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetEffectGuid(
|
||||
TRACE("(this=%p,%p)\n", This, pguid);
|
||||
|
||||
pguid = &This->guid;
|
||||
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
@@ -312,7 +314,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
|
||||
{
|
||||
HRESULT diErr = DI_OK;
|
||||
LinuxInputEffectImpl *This = (LinuxInputEffectImpl *)iface;
|
||||
TRACE("(this=%p,%p,%d)\n", This, peff, dwFlags);
|
||||
TRACE("(this=%p,%p,%ld)\n", This, peff, dwFlags);
|
||||
|
||||
/* Major conversion factors are:
|
||||
* times: millisecond (linux) -> microsecond (windows) (x * 1000)
|
||||
@@ -324,7 +326,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
|
||||
if (dwFlags & DIEP_AXES) {
|
||||
if (peff->cAxes < 2 /* linuxinput effects always use 2 axes, x and y */)
|
||||
diErr = DIERR_MOREDATA;
|
||||
peff->cAxes = 2;
|
||||
peff->cAxes = 2;
|
||||
if (diErr)
|
||||
return diErr;
|
||||
else {
|
||||
@@ -332,11 +334,11 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
|
||||
peff->rgdwAxes[1] = DIJOFS_Y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (dwFlags & DIEP_DIRECTION) {
|
||||
if (peff->cAxes < 2)
|
||||
diErr = DIERR_MOREDATA;
|
||||
peff->cAxes = 2;
|
||||
peff->cAxes = 2;
|
||||
if (diErr)
|
||||
return diErr;
|
||||
else {
|
||||
@@ -371,7 +373,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
|
||||
peff->lpEnvelope = NULL;
|
||||
} else if (peff->lpEnvelope == NULL) {
|
||||
return DIERR_INVALIDPARAM;
|
||||
} else {
|
||||
} else {
|
||||
peff->lpEnvelope->dwAttackLevel = (env->attack_level / 33) * 10;
|
||||
peff->lpEnvelope->dwAttackTime = env->attack_length * 1000;
|
||||
peff->lpEnvelope->dwFadeLevel = (env->fade_level / 33) * 10;
|
||||
@@ -380,7 +382,9 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
|
||||
}
|
||||
|
||||
if (dwFlags & DIEP_GAIN) {
|
||||
peff->dwGain = This->gain * 10000 / 0xFFFF;
|
||||
/* the linux input ff driver apparently has no support
|
||||
* for setting the device's gain. */
|
||||
peff->dwGain = DI_FFNOMINALMAX;
|
||||
}
|
||||
|
||||
if (dwFlags & DIEP_SAMPLEPERIOD) {
|
||||
@@ -403,14 +407,14 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
|
||||
}
|
||||
|
||||
if (dwFlags & DIEP_TYPESPECIFICPARAMS) {
|
||||
DWORD expectedsize = 0;
|
||||
int expectedsize = 0;
|
||||
if (This->effect.type == FF_PERIODIC) {
|
||||
expectedsize = sizeof(DIPERIODIC);
|
||||
} else if (This->effect.type == FF_CONSTANT) {
|
||||
expectedsize = sizeof(DICONSTANTFORCE);
|
||||
} else if (This->effect.type == FF_SPRING
|
||||
|| This->effect.type == FF_FRICTION
|
||||
|| This->effect.type == FF_INERTIA
|
||||
} else if (This->effect.type == FF_SPRING
|
||||
|| This->effect.type == FF_FRICTION
|
||||
|| This->effect.type == FF_INERTIA
|
||||
|| This->effect.type == FF_DAMPER) {
|
||||
expectedsize = sizeof(DICONDITION) * 2;
|
||||
} else if (This->effect.type == FF_RAMP) {
|
||||
@@ -423,35 +427,35 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
|
||||
return diErr;
|
||||
else {
|
||||
if (This->effect.type == FF_PERIODIC) {
|
||||
LPDIPERIODIC tsp = peff->lpvTypeSpecificParams;
|
||||
LPDIPERIODIC tsp = (LPDIPERIODIC)(peff->lpvTypeSpecificParams);
|
||||
tsp->dwMagnitude = (This->effect.u.periodic.magnitude / 33) * 10;
|
||||
tsp->lOffset = (This->effect.u.periodic.offset / 33) * 10;
|
||||
tsp->dwPhase = (This->effect.u.periodic.phase / 33) * 36;
|
||||
tsp->dwPeriod = (This->effect.u.periodic.period * 1000);
|
||||
} else if (This->effect.type == FF_CONSTANT) {
|
||||
LPDICONSTANTFORCE tsp = peff->lpvTypeSpecificParams;
|
||||
LPDICONSTANTFORCE tsp = (LPDICONSTANTFORCE)(peff->lpvTypeSpecificParams);
|
||||
tsp->lMagnitude = (This->effect.u.constant.level / 33) * 10;
|
||||
} else if (This->effect.type == FF_SPRING
|
||||
|| This->effect.type == FF_FRICTION
|
||||
|| This->effect.type == FF_INERTIA
|
||||
} else if (This->effect.type == FF_SPRING
|
||||
|| This->effect.type == FF_FRICTION
|
||||
|| This->effect.type == FF_INERTIA
|
||||
|| This->effect.type == FF_DAMPER) {
|
||||
LPDICONDITION tsp = peff->lpvTypeSpecificParams;
|
||||
LPDICONDITION tsp = (LPDICONDITION)(peff->lpvTypeSpecificParams);
|
||||
int i;
|
||||
for (i = 0; i < 2; ++i) {
|
||||
tsp[i].lOffset = (This->effect.u.condition[i].center / 33) * 10;
|
||||
tsp[i].lOffset = (This->effect.u.condition[i].center / 33) * 10;
|
||||
tsp[i].lPositiveCoefficient = (This->effect.u.condition[i].right_coeff / 33) * 10;
|
||||
tsp[i].lNegativeCoefficient = (This->effect.u.condition[i].left_coeff / 33) * 10;
|
||||
tsp[i].lNegativeCoefficient = (This->effect.u.condition[i].left_coeff / 33) * 10;
|
||||
tsp[i].dwPositiveSaturation = (This->effect.u.condition[i].right_saturation / 33) * 10;
|
||||
tsp[i].dwNegativeSaturation = (This->effect.u.condition[i].left_saturation / 33) * 10;
|
||||
tsp[i].lDeadBand = (This->effect.u.condition[i].deadband / 33) * 10;
|
||||
}
|
||||
} else if (This->effect.type == FF_RAMP) {
|
||||
LPDIRAMPFORCE tsp = peff->lpvTypeSpecificParams;
|
||||
LPDIRAMPFORCE tsp = (LPDIRAMPFORCE)(peff->lpvTypeSpecificParams);
|
||||
tsp->lStart = (This->effect.u.ramp.start_level / 33) * 10;
|
||||
tsp->lEnd = (This->effect.u.ramp.end_level / 33) * 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return diErr;
|
||||
}
|
||||
@@ -462,7 +466,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Initialize(
|
||||
DWORD dwVersion,
|
||||
REFGUID rguid)
|
||||
{
|
||||
FIXME("(this=%p,%p,%d,%s): stub!\n",
|
||||
FIXME("(this=%p,%p,%ld,%s): stub!\n",
|
||||
iface, hinst, dwVersion, debugstr_guid(rguid));
|
||||
|
||||
return DI_OK;
|
||||
@@ -496,7 +500,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Start(
|
||||
struct input_event event;
|
||||
LinuxInputEffectImpl* This = (LinuxInputEffectImpl*)iface;
|
||||
|
||||
TRACE("(this=%p,%d,%d)\n", This, dwIterations, dwFlags);
|
||||
TRACE("(this=%p,%ld,%ld)\n", This, dwIterations, dwFlags);
|
||||
|
||||
if (!(dwFlags & DIES_NODOWNLOAD)) {
|
||||
/* Download the effect if necessary */
|
||||
@@ -512,12 +516,6 @@ static HRESULT WINAPI LinuxInputEffectImpl_Start(
|
||||
}
|
||||
|
||||
event.type = EV_FF;
|
||||
|
||||
event.code = FF_GAIN;
|
||||
event.value = This->gain;
|
||||
if (write(*(This->fd), &event, sizeof(event)) == -1)
|
||||
FIXME("Failed setting gain. Error: %d \"%s\".\n", errno, strerror(errno));
|
||||
|
||||
event.code = This->effect.id;
|
||||
event.value = dwIterations;
|
||||
if (write(*(This->fd), &event, sizeof(event)) == -1) {
|
||||
@@ -532,16 +530,16 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
||||
LPDIRECTINPUTEFFECT iface,
|
||||
LPCDIEFFECT peff,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
LinuxInputEffectImpl* This = (LinuxInputEffectImpl*)iface;
|
||||
{
|
||||
LinuxInputEffectImpl* This = (LinuxInputEffectImpl*)iface;
|
||||
DWORD type = _typeFromGUID(&This->guid);
|
||||
HRESULT retval = DI_OK;
|
||||
|
||||
TRACE("(this=%p,%p,%d)\n", This, peff, dwFlags);
|
||||
TRACE("(this=%p,%p,%ld)\n", This, peff, dwFlags);
|
||||
|
||||
_dump_DIEFFECT(peff, &This->guid);
|
||||
|
||||
if ((dwFlags & ~DIEP_NORESTART & ~DIEP_NODOWNLOAD & ~DIEP_START) == 0) {
|
||||
if ((dwFlags & !DIEP_NORESTART & !DIEP_NODOWNLOAD & !DIEP_START) == 0) {
|
||||
/* set everything */
|
||||
dwFlags = DIEP_AXES | DIEP_DIRECTION | DIEP_DURATION | DIEP_ENVELOPE |
|
||||
DIEP_GAIN | DIEP_SAMPLEPERIOD | DIEP_STARTDELAY | DIEP_TRIGGERBUTTON |
|
||||
@@ -558,7 +556,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
||||
|
||||
/* some of this may look funky, but it's 'cause the linux driver and directx have
|
||||
* different opinions about which way direction "0" is. directx has 0 along the x
|
||||
* axis (left), linux has it along the y axis (down). */
|
||||
* axis (left), linux has it along the y axis (down). */
|
||||
if (dwFlags & DIEP_DIRECTION) {
|
||||
if (peff->cAxes == 1) {
|
||||
if (peff->dwFlags & DIEFF_CARTESIAN) {
|
||||
@@ -603,11 +601,11 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
||||
if (This->effect.type == FF_CONSTANT) env = &This->effect.u.constant.envelope;
|
||||
else if (This->effect.type == FF_PERIODIC) env = &This->effect.u.periodic.envelope;
|
||||
else if (This->effect.type == FF_RAMP) env = &This->effect.u.ramp.envelope;
|
||||
else env = NULL;
|
||||
else env = NULL;
|
||||
|
||||
if (peff->lpEnvelope == NULL) {
|
||||
/* if this type had an envelope, reset it
|
||||
* note that length can never be zero, so we set it to something minuscule */
|
||||
* note that length can never be zero, so we set it to something miniscule */
|
||||
if (env) {
|
||||
env->attack_length = 0x10;
|
||||
env->attack_level = 0x7FFF;
|
||||
@@ -628,7 +626,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
||||
/* Gain and Sample Period settings are not supported by the linux
|
||||
* event system */
|
||||
if (dwFlags & DIEP_GAIN)
|
||||
This->gain = 0xFFFF * peff->dwGain / 10000;
|
||||
TRACE("Gain requested but no gain functionality present.\n");
|
||||
|
||||
if (dwFlags & DIEP_SAMPLEPERIOD)
|
||||
TRACE("Sample period requested but no sample period functionality present.\n");
|
||||
@@ -654,7 +652,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
||||
LPCDIPERIODIC tsp;
|
||||
if (peff->cbTypeSpecificParams != sizeof(DIPERIODIC))
|
||||
return DIERR_INVALIDPARAM;
|
||||
tsp = peff->lpvTypeSpecificParams;
|
||||
tsp = (LPCDIPERIODIC)(peff->lpvTypeSpecificParams);
|
||||
This->effect.u.periodic.magnitude = (tsp->dwMagnitude / 10) * 32;
|
||||
This->effect.u.periodic.offset = (tsp->lOffset / 10) * 32;
|
||||
This->effect.u.periodic.phase = (tsp->dwPhase / 9) * 8; /* == (/ 36 * 32) */
|
||||
@@ -663,17 +661,17 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
||||
LPCDICONSTANTFORCE tsp;
|
||||
if (peff->cbTypeSpecificParams != sizeof(DICONSTANTFORCE))
|
||||
return DIERR_INVALIDPARAM;
|
||||
tsp = peff->lpvTypeSpecificParams;
|
||||
This->effect.u.constant.level = (max(min(tsp->lMagnitude, 10000), -10000) / 10) * 32;
|
||||
tsp = (LPCDICONSTANTFORCE)(peff->lpvTypeSpecificParams);
|
||||
This->effect.u.constant.level = (tsp->lMagnitude / 10) * 32;
|
||||
} else if (type == DIEFT_RAMPFORCE) {
|
||||
LPCDIRAMPFORCE tsp;
|
||||
if (peff->cbTypeSpecificParams != sizeof(DIRAMPFORCE))
|
||||
return DIERR_INVALIDPARAM;
|
||||
tsp = peff->lpvTypeSpecificParams;
|
||||
tsp = (LPCDIRAMPFORCE)(peff->lpvTypeSpecificParams);
|
||||
This->effect.u.ramp.start_level = (tsp->lStart / 10) * 32;
|
||||
This->effect.u.ramp.end_level = (tsp->lStart / 10) * 32;
|
||||
} else if (type == DIEFT_CONDITION) {
|
||||
LPCDICONDITION tsp = peff->lpvTypeSpecificParams;
|
||||
LPCDICONDITION tsp = (LPCDICONDITION)(peff->lpvTypeSpecificParams);
|
||||
if (peff->cbTypeSpecificParams == sizeof(DICONDITION)) {
|
||||
/* One condition block. This needs to be rotated to direction,
|
||||
* and expanded to separate x and y conditions. */
|
||||
@@ -684,7 +682,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
||||
for (i = 0; i < 2; ++i) {
|
||||
This->effect.u.condition[i].center = (int)(factor[i] * (tsp->lOffset / 10) * 32);
|
||||
This->effect.u.condition[i].right_coeff = (int)(factor[i] * (tsp->lPositiveCoefficient / 10) * 32);
|
||||
This->effect.u.condition[i].left_coeff = (int)(factor[i] * (tsp->lNegativeCoefficient / 10) * 32);
|
||||
This->effect.u.condition[i].left_coeff = (int)(factor[i] * (tsp->lNegativeCoefficient / 10) * 32);
|
||||
This->effect.u.condition[i].right_saturation = (int)(factor[i] * (tsp->dwPositiveSaturation / 10) * 32);
|
||||
This->effect.u.condition[i].left_saturation = (int)(factor[i] * (tsp->dwNegativeSaturation / 10) * 32);
|
||||
This->effect.u.condition[i].deadband = (int)(factor[i] * (tsp->lDeadBand / 10) * 32);
|
||||
@@ -704,7 +702,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
||||
return DIERR_INVALIDPARAM;
|
||||
}
|
||||
} else {
|
||||
FIXME("Custom force types are not supported\n");
|
||||
FIXME("Custom force types are not supported\n");
|
||||
return DIERR_INVALIDPARAM;
|
||||
}
|
||||
}
|
||||
@@ -721,9 +719,20 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
|
||||
retval = LinuxInputEffectImpl_Start(iface, 1, 0);
|
||||
if (retval != DI_OK)
|
||||
return retval;
|
||||
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
}
|
||||
|
||||
static ULONG WINAPI LinuxInputEffectImpl_Release(
|
||||
LPDIRECTINPUTEFFECT iface)
|
||||
{
|
||||
LinuxInputEffectImpl *This = (LinuxInputEffectImpl *)iface;
|
||||
ULONG ref = InterlockedDecrement(&(This->ref));
|
||||
|
||||
if (ref == 0)
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI LinuxInputEffectImpl_Stop(
|
||||
LPDIRECTINPUTEFFECT iface)
|
||||
@@ -758,22 +767,6 @@ static HRESULT WINAPI LinuxInputEffectImpl_Unload(
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI LinuxInputEffectImpl_Release(LPDIRECTINPUTEFFECT iface)
|
||||
{
|
||||
LinuxInputEffectImpl *This = (LinuxInputEffectImpl *)iface;
|
||||
ULONG ref = InterlockedDecrement(&(This->ref));
|
||||
|
||||
if (ref == 0)
|
||||
{
|
||||
LinuxInputEffectImpl_Stop(iface);
|
||||
LinuxInputEffectImpl_Unload(iface);
|
||||
list_remove(This->entry);
|
||||
HeapFree(GetProcessHeap(), 0, LIST_ENTRY(This->entry, effect_list_item, entry));
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* LinuxInputEffect
|
||||
*/
|
||||
@@ -781,22 +774,20 @@ static ULONG WINAPI LinuxInputEffectImpl_Release(LPDIRECTINPUTEFFECT iface)
|
||||
HRESULT linuxinput_create_effect(
|
||||
int* fd,
|
||||
REFGUID rguid,
|
||||
struct list *parent_list_entry,
|
||||
LPDIRECTINPUTEFFECT* peff)
|
||||
{
|
||||
LinuxInputEffectImpl* newEffect = HeapAlloc(GetProcessHeap(),
|
||||
LinuxInputEffectImpl* newEffect = HeapAlloc(GetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY, sizeof(LinuxInputEffectImpl));
|
||||
DWORD type = _typeFromGUID(rguid);
|
||||
|
||||
newEffect->lpVtbl = &LinuxInputEffectVtbl;
|
||||
newEffect->ref = 1;
|
||||
newEffect->guid = *rguid;
|
||||
memcpy(&(newEffect->guid), rguid, sizeof(*rguid));
|
||||
newEffect->fd = fd;
|
||||
newEffect->gain = 0xFFFF;
|
||||
|
||||
/* set the type. this cannot be changed over the effect's life. */
|
||||
switch (type) {
|
||||
case DIEFT_PERIODIC:
|
||||
case DIEFT_PERIODIC:
|
||||
newEffect->effect.type = FF_PERIODIC;
|
||||
if (IsEqualGUID(rguid, &GUID_Sine)) {
|
||||
newEffect->effect.u.periodic.waveform = FF_SINE;
|
||||
@@ -810,13 +801,13 @@ HRESULT linuxinput_create_effect(
|
||||
newEffect->effect.u.periodic.waveform = FF_SAW_DOWN;
|
||||
}
|
||||
break;
|
||||
case DIEFT_CONSTANTFORCE:
|
||||
case DIEFT_CONSTANTFORCE:
|
||||
newEffect->effect.type = FF_CONSTANT;
|
||||
break;
|
||||
case DIEFT_RAMPFORCE:
|
||||
case DIEFT_RAMPFORCE:
|
||||
newEffect->effect.type = FF_RAMP;
|
||||
break;
|
||||
case DIEFT_CONDITION:
|
||||
case DIEFT_CONDITION:
|
||||
if (IsEqualGUID(rguid, &GUID_Spring)) {
|
||||
newEffect->effect.type = FF_SPRING;
|
||||
} else if (IsEqualGUID(rguid, &GUID_Friction)) {
|
||||
@@ -832,7 +823,7 @@ HRESULT linuxinput_create_effect(
|
||||
HeapFree(GetProcessHeap(), 0, newEffect);
|
||||
return DIERR_INVALIDPARAM;
|
||||
default:
|
||||
FIXME("Unknown force type 0x%x.\n", type);
|
||||
FIXME("Unknown force type.\n");
|
||||
HeapFree(GetProcessHeap(), 0, newEffect);
|
||||
return DIERR_INVALIDPARAM;
|
||||
}
|
||||
@@ -840,11 +831,9 @@ HRESULT linuxinput_create_effect(
|
||||
/* mark as non-uploaded */
|
||||
newEffect->effect.id = -1;
|
||||
|
||||
newEffect->entry = parent_list_entry;
|
||||
*peff = (LPDIRECTINPUTEFFECT)newEffect;
|
||||
|
||||
*peff = (LPDIRECTINPUTEFFECT)newEffect;
|
||||
|
||||
TRACE("Creating linux input system effect (%p) with guid %s\n",
|
||||
TRACE("Creating linux input system effect (%p) with guid %s\n",
|
||||
*peff, _dump_dinput_GUID(rguid));
|
||||
|
||||
return DI_OK;
|
||||
@@ -857,29 +846,29 @@ HRESULT linuxinput_get_info_A(
|
||||
{
|
||||
DWORD type = _typeFromGUID(rguid);
|
||||
|
||||
TRACE("(%d, %s, %p) type=%d\n", fd, _dump_dinput_GUID(rguid), info, type);
|
||||
TRACE("(%d, %s, %p) type=%ld\n", fd, _dump_dinput_GUID(rguid), info, type);
|
||||
|
||||
if (!info) return E_POINTER;
|
||||
|
||||
if (info->dwSize != sizeof(DIEFFECTINFOA)) return DIERR_INVALIDPARAM;
|
||||
|
||||
info->guid = *rguid;
|
||||
|
||||
info->dwEffType = type;
|
||||
|
||||
info->dwEffType = type;
|
||||
/* the event device API does not support querying for all these things
|
||||
* therefore we assume that we have support for them
|
||||
* that's not as dangerous as it sounds, since drivers are allowed to
|
||||
* ignore parameters they claim to support anyway */
|
||||
info->dwEffType |= DIEFT_DEADBAND | DIEFT_FFATTACK | DIEFT_FFFADE
|
||||
info->dwEffType |= DIEFT_DEADBAND | DIEFT_FFATTACK | DIEFT_FFFADE
|
||||
| DIEFT_POSNEGCOEFFICIENTS | DIEFT_POSNEGSATURATION
|
||||
| DIEFT_SATURATION | DIEFT_STARTDELAY;
|
||||
| DIEFT_SATURATION | DIEFT_STARTDELAY;
|
||||
|
||||
/* again, assume we have support for everything */
|
||||
info->dwStaticParams = DIEP_ALLPARAMS;
|
||||
info->dwDynamicParams = info->dwStaticParams;
|
||||
|
||||
/* yes, this is windows behavior (print the GUID_Name for name) */
|
||||
strcpy(info->tszName, _dump_dinput_GUID(rguid));
|
||||
strcpy((char*)&(info->tszName), _dump_dinput_GUID(rguid));
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
@@ -891,7 +880,7 @@ HRESULT linuxinput_get_info_W(
|
||||
{
|
||||
DWORD type = _typeFromGUID(rguid);
|
||||
|
||||
TRACE("(%d, %s, %p) type=%d\n", fd, _dump_dinput_GUID(rguid), info, type);
|
||||
TRACE("(%d, %s, %p) type=%ld\n", fd, _dump_dinput_GUID(rguid), info, type);
|
||||
|
||||
if (!info) return E_POINTER;
|
||||
|
||||
@@ -906,15 +895,15 @@ HRESULT linuxinput_get_info_W(
|
||||
* ignore parameters they claim to support anyway */
|
||||
info->dwEffType |= DIEFT_DEADBAND | DIEFT_FFATTACK | DIEFT_FFFADE
|
||||
| DIEFT_POSNEGCOEFFICIENTS | DIEFT_POSNEGSATURATION
|
||||
| DIEFT_SATURATION | DIEFT_STARTDELAY;
|
||||
| DIEFT_SATURATION | DIEFT_STARTDELAY;
|
||||
|
||||
/* again, assume we have support for everything */
|
||||
info->dwStaticParams = DIEP_ALLPARAMS;
|
||||
info->dwDynamicParams = info->dwStaticParams;
|
||||
|
||||
/* yes, this is windows behavior (print the GUID_Name for name) */
|
||||
MultiByteToWideChar(CP_ACP, 0, _dump_dinput_GUID(rguid), -1,
|
||||
info->tszName, MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP, 0, _dump_dinput_GUID(rguid), -1,
|
||||
(WCHAR*)&(info->tszName), MAX_PATH);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@@ -46,79 +46,122 @@ static const IDirectInputDevice8WVtbl SysKeyboardWvt;
|
||||
typedef struct SysKeyboardImpl SysKeyboardImpl;
|
||||
struct SysKeyboardImpl
|
||||
{
|
||||
struct IDirectInputDevice2AImpl base;
|
||||
BYTE DInputKeyState[WINE_DINPUT_KEYBOARD_MAX_KEYS];
|
||||
const void *lpVtbl;
|
||||
LONG ref;
|
||||
GUID guid;
|
||||
|
||||
IDirectInputImpl* dinput;
|
||||
|
||||
HANDLE hEvent;
|
||||
/* SysKeyboardAImpl */
|
||||
int acquired;
|
||||
int buffersize; /* set in 'SetProperty' */
|
||||
LPDIDEVICEOBJECTDATA buffer; /* buffer for 'GetDeviceData'.
|
||||
Alloc at 'Acquire', Free at
|
||||
'Unacquire' */
|
||||
int count; /* number of objects in use in
|
||||
'buffer' */
|
||||
int start; /* 'buffer' rotates. This is the
|
||||
first in use (if count > 0) */
|
||||
BOOL overflow; /* return DI_BUFFEROVERFLOW in
|
||||
'GetDeviceData' */
|
||||
CRITICAL_SECTION crit;
|
||||
};
|
||||
|
||||
static BYTE map_dik_code(DWORD scanCode, DWORD vkCode)
|
||||
static SysKeyboardImpl* current_lock = NULL;
|
||||
/* Today's acquired device
|
||||
* FIXME: currently this can be only one.
|
||||
* Maybe this should be a linked list or st.
|
||||
* I don't know what the rules are for multiple acquired keyboards,
|
||||
* but 'DI_LOSTFOCUS' and 'DI_UNACQUIRED' exist for a reason.
|
||||
*/
|
||||
|
||||
static BYTE DInputKeyState[WINE_DINPUT_KEYBOARD_MAX_KEYS]; /* array for 'GetDeviceState' */
|
||||
|
||||
static CRITICAL_SECTION keyboard_crit;
|
||||
static CRITICAL_SECTION_DEBUG critsect_debug =
|
||||
{
|
||||
static const BYTE asciiCodes[] =
|
||||
{/*32*/ DIK_SPACE,0,0,0,0,0,0,DIK_APOSTROPHE,
|
||||
/*40*/ 0,0,0,0,DIK_COMMA,DIK_MINUS,DIK_PERIOD,DIK_SLASH,
|
||||
/*48*/ DIK_0,DIK_1,DIK_2,DIK_3,DIK_4,DIK_5,DIK_6,DIK_7,
|
||||
/*56*/ DIK_8,DIK_9,DIK_COLON,DIK_SEMICOLON,0,DIK_EQUALS,0,0,
|
||||
/*64*/ DIK_AT,DIK_A,DIK_B,DIK_C,DIK_D,DIK_E,DIK_F,DIK_G,
|
||||
/*72*/ DIK_H,DIK_I,DIK_J,DIK_K,DIK_L,DIK_M,DIK_N,DIK_O,
|
||||
/*80*/ DIK_P,DIK_Q,DIK_R,DIK_S,DIK_T,DIK_U,DIK_V,DIK_W,
|
||||
/*88*/ DIK_X,DIK_Y,DIK_Z,DIK_LBRACKET,0,DIK_RBRACKET,DIK_CIRCUMFLEX,DIK_UNDERLINE} /*95*/ ;
|
||||
0, 0, &keyboard_crit,
|
||||
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
|
||||
0, 0, { (DWORD_PTR)(__FILE__ ": keyboard_crit") }
|
||||
};
|
||||
static CRITICAL_SECTION keyboard_crit = { &critsect_debug, -1, 0, 0, 0, 0 };
|
||||
|
||||
BYTE out_code = 0;
|
||||
WCHAR c = MapVirtualKeyW(vkCode,MAPVK_VK_TO_CHAR);
|
||||
static LONG keyboard_users = 0;
|
||||
static HHOOK keyboard_hook = NULL;
|
||||
|
||||
if (c > 31 && c < 96)
|
||||
out_code = asciiCodes[c - 32];
|
||||
LRESULT CALLBACK KeyboardCallback( int code, WPARAM wparam, LPARAM lparam )
|
||||
{
|
||||
BYTE dik_code;
|
||||
BOOL down;
|
||||
DWORD timestamp;
|
||||
KBDLLHOOKSTRUCT *hook = (KBDLLHOOKSTRUCT *)lparam;
|
||||
BYTE new_diks;
|
||||
|
||||
if (out_code == 0)
|
||||
out_code = scanCode;
|
||||
TRACE("(%d,%d,%ld)\n", code, wparam, lparam);
|
||||
|
||||
return out_code;
|
||||
/** returns now if not HC_ACTION */
|
||||
if (code != HC_ACTION) return CallNextHookEx(keyboard_hook, code, wparam, lparam);
|
||||
|
||||
{
|
||||
dik_code = hook->scanCode;
|
||||
if (hook->flags & LLKHF_EXTENDED) dik_code |= 0x80;
|
||||
down = !(hook->flags & LLKHF_UP);
|
||||
timestamp = hook->time;
|
||||
}
|
||||
|
||||
/** returns now if key event already known */
|
||||
new_diks = (down ? 0x80 : 0);
|
||||
/*if (new_diks != DInputKeyState[dik_code]) return CallNextHookEx(keyboard_hook, code, wparam, lparam); TO BE FIXED */
|
||||
|
||||
DInputKeyState[dik_code] = new_diks;
|
||||
TRACE(" setting %02X to %02X\n", dik_code, DInputKeyState[dik_code]);
|
||||
|
||||
if (current_lock != NULL) {
|
||||
if (current_lock->hEvent) SetEvent(current_lock->hEvent);
|
||||
|
||||
if (current_lock->buffer != NULL) {
|
||||
int n;
|
||||
|
||||
EnterCriticalSection(&(current_lock->crit));
|
||||
|
||||
n = (current_lock->start + current_lock->count) % current_lock->buffersize;
|
||||
|
||||
current_lock->buffer[n].dwOfs = dik_code;
|
||||
current_lock->buffer[n].dwData = down ? 0x80 : 0;
|
||||
current_lock->buffer[n].dwTimeStamp = timestamp;
|
||||
current_lock->buffer[n].dwSequence = current_lock->dinput->evsequence++;
|
||||
|
||||
TRACE("Adding event at offset %d : %ld - %ld - %ld - %ld\n", n,
|
||||
current_lock->buffer[n].dwOfs, current_lock->buffer[n].dwData, current_lock->buffer[n].dwTimeStamp, current_lock->buffer[n].dwSequence);
|
||||
|
||||
if (current_lock->count == current_lock->buffersize) {
|
||||
current_lock->start = ++current_lock->start % current_lock->buffersize;
|
||||
current_lock->overflow = TRUE;
|
||||
} else
|
||||
current_lock->count++;
|
||||
|
||||
LeaveCriticalSection(&(current_lock->crit));
|
||||
}
|
||||
}
|
||||
return CallNextHookEx(keyboard_hook, code, wparam, lparam);
|
||||
}
|
||||
|
||||
static void KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam )
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
int dik_code;
|
||||
KBDLLHOOKSTRUCT *hook = (KBDLLHOOKSTRUCT *)lparam;
|
||||
BYTE new_diks;
|
||||
|
||||
if (wparam != WM_KEYDOWN && wparam != WM_KEYUP &&
|
||||
wparam != WM_SYSKEYDOWN && wparam != WM_SYSKEYUP)
|
||||
return;
|
||||
|
||||
TRACE("(%p) %ld,%ld\n", iface, wparam, lparam);
|
||||
|
||||
dik_code = map_dik_code(hook->scanCode & 0xff,hook->vkCode);
|
||||
/* R-Shift is special - it is an extended key with separate scan code */
|
||||
if (hook->flags & LLKHF_EXTENDED && dik_code != 0x36)
|
||||
dik_code |= 0x80;
|
||||
|
||||
new_diks = hook->flags & LLKHF_UP ? 0 : 0x80;
|
||||
|
||||
/* returns now if key event already known */
|
||||
if (new_diks == This->DInputKeyState[dik_code])
|
||||
return;
|
||||
|
||||
This->DInputKeyState[dik_code] = new_diks;
|
||||
TRACE(" setting %02X to %02X\n", dik_code, This->DInputKeyState[dik_code]);
|
||||
|
||||
dik_code = id_to_offset(&This->base.data_format, DIDFT_MAKEINSTANCE(dik_code) | DIDFT_PSHBUTTON);
|
||||
EnterCriticalSection(&This->base.crit);
|
||||
queue_event((LPDIRECTINPUTDEVICE8A)This, dik_code, new_diks, hook->time, This->base.dinput->evsequence++);
|
||||
LeaveCriticalSection(&This->base.crit);
|
||||
}
|
||||
|
||||
const GUID DInput_Wine_Keyboard_GUID = { /* 0ab8648a-7735-11d2-8c73-71df54a96441 */
|
||||
0x0ab8648a, 0x7735, 0x11d2, {0x8c, 0x73, 0x71, 0xdf, 0x54, 0xa9, 0x64, 0x41}
|
||||
static GUID DInput_Wine_Keyboard_GUID = { /* 0ab8648a-7735-11d2-8c73-71df54a96441 */
|
||||
0x0ab8648a,
|
||||
0x7735,
|
||||
0x11d2,
|
||||
{0x8c, 0x73, 0x71, 0xdf, 0x54, 0xa9, 0x64, 0x41}
|
||||
};
|
||||
|
||||
static void fill_keyboard_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version) {
|
||||
DWORD dwSize;
|
||||
DIDEVICEINSTANCEA ddi;
|
||||
|
||||
|
||||
dwSize = lpddi->dwSize;
|
||||
|
||||
TRACE("%d %p\n", dwSize, lpddi);
|
||||
|
||||
TRACE("%ld %p\n", dwSize, lpddi);
|
||||
|
||||
memset(lpddi, 0, dwSize);
|
||||
memset(&ddi, 0, sizeof(ddi));
|
||||
|
||||
@@ -138,14 +181,14 @@ static void fill_keyboard_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD ver
|
||||
static void fill_keyboard_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD version) {
|
||||
DWORD dwSize;
|
||||
DIDEVICEINSTANCEW ddi;
|
||||
|
||||
|
||||
dwSize = lpddi->dwSize;
|
||||
|
||||
TRACE("%d %p\n", dwSize, lpddi);
|
||||
|
||||
TRACE("%ld %p\n", dwSize, lpddi);
|
||||
|
||||
memset(lpddi, 0, dwSize);
|
||||
memset(&ddi, 0, sizeof(ddi));
|
||||
|
||||
|
||||
ddi.dwSize = dwSize;
|
||||
ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */
|
||||
ddi.guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */
|
||||
@@ -158,7 +201,7 @@ static void fill_keyboard_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD ver
|
||||
|
||||
memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi)));
|
||||
}
|
||||
|
||||
|
||||
static BOOL keyboarddev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id)
|
||||
{
|
||||
if (id != 0)
|
||||
@@ -168,9 +211,9 @@ static BOOL keyboarddev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEI
|
||||
((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) ||
|
||||
(((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 0x0800))) {
|
||||
TRACE("Enumerating the Keyboard device\n");
|
||||
|
||||
|
||||
fill_keyboard_dideviceinstanceA(lpddi, version);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -188,7 +231,7 @@ static BOOL keyboarddev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEI
|
||||
TRACE("Enumerating the Keyboard device\n");
|
||||
|
||||
fill_keyboard_dideviceinstanceW(lpddi, version);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -198,44 +241,23 @@ static BOOL keyboarddev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEI
|
||||
static SysKeyboardImpl *alloc_device(REFGUID rguid, const void *kvt, IDirectInputImpl *dinput)
|
||||
{
|
||||
SysKeyboardImpl* newDevice;
|
||||
LPDIDATAFORMAT df = NULL;
|
||||
int i, idx = 0;
|
||||
DWORD kbd_users;
|
||||
|
||||
newDevice = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(SysKeyboardImpl));
|
||||
newDevice->base.lpVtbl = kvt;
|
||||
newDevice->base.ref = 1;
|
||||
memcpy(&newDevice->base.guid, rguid, sizeof(*rguid));
|
||||
newDevice->base.dinput = dinput;
|
||||
newDevice->base.event_proc = KeyboardCallback;
|
||||
InitializeCriticalSection(&newDevice->base.crit);
|
||||
newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysKeyboardImpl*->base.crit");
|
||||
newDevice->lpVtbl = kvt;
|
||||
newDevice->ref = 1;
|
||||
memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
|
||||
newDevice->dinput = dinput;
|
||||
InitializeCriticalSection(&(newDevice->crit));
|
||||
|
||||
/* Create copy of default data format */
|
||||
if (!(df = HeapAlloc(GetProcessHeap(), 0, c_dfDIKeyboard.dwSize))) goto failed;
|
||||
memcpy(df, &c_dfDIKeyboard, c_dfDIKeyboard.dwSize);
|
||||
if (!(df->rgodf = HeapAlloc(GetProcessHeap(), 0, df->dwNumObjs * df->dwObjSize))) goto failed;
|
||||
|
||||
for (i = 0; i < df->dwNumObjs; i++)
|
||||
{
|
||||
char buf[MAX_PATH];
|
||||
|
||||
if (!GetKeyNameTextA(((i & 0x7f) << 16) | ((i & 0x80) << 17), buf, sizeof(buf)))
|
||||
continue;
|
||||
|
||||
memcpy(&df->rgodf[idx], &c_dfDIKeyboard.rgodf[i], df->dwObjSize);
|
||||
df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(i) | DIDFT_PSHBUTTON;
|
||||
EnterCriticalSection(&keyboard_crit);
|
||||
kbd_users = InterlockedIncrement(&keyboard_users);
|
||||
if (1 == kbd_users) {
|
||||
keyboard_hook = SetWindowsHookExW( WH_KEYBOARD_LL, KeyboardCallback, DINPUT_instance, 0 );
|
||||
}
|
||||
df->dwNumObjs = idx;
|
||||
LeaveCriticalSection(&keyboard_crit);
|
||||
|
||||
newDevice->base.data_format.wine_df = df;
|
||||
IDirectInput_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->base.dinput);
|
||||
return newDevice;
|
||||
|
||||
failed:
|
||||
if (df) HeapFree(GetProcessHeap(), 0, df->rgodf);
|
||||
HeapFree(GetProcessHeap(), 0, df);
|
||||
HeapFree(GetProcessHeap(), 0, newDevice);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -250,7 +272,6 @@ static HRESULT keyboarddev_create_deviceA(IDirectInputImpl *dinput, REFGUID rgui
|
||||
IsEqualGUID(&IID_IDirectInputDevice8A,riid)) {
|
||||
*pdev = (IDirectInputDeviceA*) alloc_device(rguid, &SysKeyboardAvt, dinput);
|
||||
TRACE("Creating a Keyboard device (%p)\n", *pdev);
|
||||
if (!*pdev) return DIERR_OUTOFMEMORY;
|
||||
return DI_OK;
|
||||
} else
|
||||
return DIERR_NOINTERFACE;
|
||||
@@ -269,7 +290,6 @@ static HRESULT keyboarddev_create_deviceW(IDirectInputImpl *dinput, REFGUID rgui
|
||||
IsEqualGUID(&IID_IDirectInputDevice8W,riid)) {
|
||||
*pdev = (IDirectInputDeviceW*) alloc_device(rguid, &SysKeyboardWvt, dinput);
|
||||
TRACE("Creating a Keyboard device (%p)\n", *pdev);
|
||||
if (!*pdev) return DIERR_OUTOFMEMORY;
|
||||
return DI_OK;
|
||||
} else
|
||||
return DIERR_NOINTERFACE;
|
||||
@@ -285,36 +305,306 @@ const struct dinput_device keyboard_device = {
|
||||
keyboarddev_create_deviceW
|
||||
};
|
||||
|
||||
static ULONG WINAPI SysKeyboardAImpl_Release(LPDIRECTINPUTDEVICE8A iface)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
ULONG ref;
|
||||
DWORD kbd_users;
|
||||
|
||||
ref = InterlockedDecrement(&(This->ref));
|
||||
if (ref)
|
||||
return ref;
|
||||
|
||||
EnterCriticalSection(&keyboard_crit);
|
||||
kbd_users = InterlockedDecrement(&keyboard_users);
|
||||
if (0 == kbd_users) {
|
||||
UnhookWindowsHookEx( keyboard_hook );
|
||||
keyboard_hook = 0;
|
||||
}
|
||||
LeaveCriticalSection(&keyboard_crit);
|
||||
|
||||
/* Free the data queue */
|
||||
HeapFree(GetProcessHeap(),0,This->buffer);
|
||||
|
||||
DeleteCriticalSection(&(This->crit));
|
||||
|
||||
HeapFree(GetProcessHeap(),0,This);
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardAImpl_SetProperty(
|
||||
LPDIRECTINPUTDEVICE8A iface,REFGUID rguid,LPCDIPROPHEADER ph
|
||||
)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
|
||||
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
|
||||
TRACE("(size=%ld,headersize=%ld,obj=%ld,how=%ld\n",
|
||||
ph->dwSize,ph->dwHeaderSize,ph->dwObj,ph->dwHow);
|
||||
if (!HIWORD(rguid)) {
|
||||
switch (LOWORD(rguid)) {
|
||||
case (DWORD) DIPROP_BUFFERSIZE: {
|
||||
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
|
||||
|
||||
TRACE("(buffersize=%ld)\n",pd->dwData);
|
||||
|
||||
if (This->acquired)
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
||||
This->buffersize = pd->dwData;
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
WARN("Unknown type %p\n",rguid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardAImpl_GetProperty(
|
||||
LPDIRECTINPUTDEVICE8A iface,REFGUID rguid,LPDIPROPHEADER ph
|
||||
)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
|
||||
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
|
||||
TRACE("(size=%ld,headersize=%ld,obj=%ld,how=%ld\n",
|
||||
ph->dwSize,ph->dwHeaderSize,ph->dwObj,ph->dwHow);
|
||||
if (!HIWORD(rguid)) {
|
||||
switch (LOWORD(rguid)) {
|
||||
case (DWORD) DIPROP_BUFFERSIZE: {
|
||||
LPDIPROPDWORD pd = (LPDIPROPDWORD)ph;
|
||||
|
||||
TRACE("(buffersize=%ld)\n",pd->dwData);
|
||||
|
||||
if (This->acquired)
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
||||
pd->dwData = This->buffersize;
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
WARN("Unknown type %p\n",rguid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
|
||||
LPDIRECTINPUTDEVICE8A iface,DWORD len,LPVOID ptr
|
||||
)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
TRACE("(%p)->(%d,%p)\n", This, len, ptr);
|
||||
TRACE("(%p)->(%ld,%p)\n", This, len, ptr);
|
||||
|
||||
if (!This->base.acquired) return DIERR_NOTACQUIRED;
|
||||
/* Note: device does not need to be acquired */
|
||||
if (len != WINE_DINPUT_KEYBOARD_MAX_KEYS)
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
||||
if (len != This->base.data_format.user_df->dwDataSize )
|
||||
return DIERR_INVALIDPARAM;
|
||||
MsgWaitForMultipleObjectsEx(0, NULL, 0, QS_ALLINPUT, 0);
|
||||
|
||||
EnterCriticalSection(&This->base.crit);
|
||||
EnterCriticalSection(&(This->crit));
|
||||
|
||||
if (TRACE_ON(dinput)) {
|
||||
int i;
|
||||
for (i = 0; i < WINE_DINPUT_KEYBOARD_MAX_KEYS; i++) {
|
||||
if (This->DInputKeyState[i] != 0x00)
|
||||
TRACE(" - %02X: %02x\n", i, This->DInputKeyState[i]);
|
||||
if (DInputKeyState[i] != 0x00) {
|
||||
TRACE(" - %02X: %02x\n", i, DInputKeyState[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fill_DataFormat(ptr, len, This->DInputKeyState, &This->base.data_format);
|
||||
LeaveCriticalSection(&This->base.crit);
|
||||
memcpy(ptr, DInputKeyState, WINE_DINPUT_KEYBOARD_MAX_KEYS);
|
||||
LeaveCriticalSection(&(This->crit));
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
|
||||
LPDIRECTINPUTDEVICE8A iface,DWORD dodsize,LPDIDEVICEOBJECTDATA dod,
|
||||
LPDWORD entries,DWORD flags
|
||||
)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
int ret = DI_OK, i = 0;
|
||||
|
||||
TRACE("(this=%p,%ld,%p,%p(%ld)),0x%08lx)\n",
|
||||
This,dodsize,dod,entries,entries?*entries:0,flags);
|
||||
|
||||
if (This->acquired == 0)
|
||||
return DIERR_NOTACQUIRED;
|
||||
|
||||
if (This->buffer == NULL)
|
||||
return DIERR_NOTBUFFERED;
|
||||
|
||||
if (dodsize < sizeof(DIDEVICEOBJECTDATA_DX3))
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
||||
MsgWaitForMultipleObjectsEx(0, NULL, 0, QS_ALLINPUT, 0);
|
||||
|
||||
EnterCriticalSection(&(This->crit));
|
||||
|
||||
/* Copy item at a time for the case dodsize > sizeof(buffer[n]) */
|
||||
while ((i < *entries || *entries == INFINITE) && i < This->count)
|
||||
{
|
||||
if (dod != NULL)
|
||||
{
|
||||
int n = (This->start + i) % This->buffersize;
|
||||
LPDIDEVICEOBJECTDATA pd
|
||||
= (LPDIDEVICEOBJECTDATA)((BYTE *)dod + dodsize * i);
|
||||
pd->dwOfs = This->buffer[n].dwOfs;
|
||||
pd->dwData = This->buffer[n].dwData;
|
||||
pd->dwTimeStamp = This->buffer[n].dwTimeStamp;
|
||||
pd->dwSequence = This->buffer[n].dwSequence;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
*entries = i;
|
||||
|
||||
if (This->overflow)
|
||||
ret = DI_BUFFEROVERFLOW;
|
||||
|
||||
if (!(flags & DIGDD_PEEK))
|
||||
{
|
||||
/* Empty buffer */
|
||||
This->count -= i;
|
||||
This->start = (This->start + i) % This->buffersize;
|
||||
This->overflow = FALSE;
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&(This->crit));
|
||||
|
||||
TRACE("Returning %ld events queued\n", *entries);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardAImpl_EnumObjects(
|
||||
LPDIRECTINPUTDEVICE8A iface,
|
||||
LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback,
|
||||
LPVOID lpvRef,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
DIDEVICEOBJECTINSTANCEA ddoi;
|
||||
int i;
|
||||
|
||||
TRACE("(this=%p,%p,%p,%08lx)\n", This, lpCallback, lpvRef, dwFlags);
|
||||
if (TRACE_ON(dinput)) {
|
||||
TRACE(" - flags = ");
|
||||
_dump_EnumObjects_flags(dwFlags);
|
||||
TRACE("\n");
|
||||
}
|
||||
|
||||
/* Only the fields till dwFFMaxForce are relevant */
|
||||
memset(&ddoi, 0, sizeof(ddoi));
|
||||
ddoi.dwSize = FIELD_OFFSET(DIDEVICEOBJECTINSTANCEA, dwFFMaxForce);
|
||||
|
||||
for (i = 0; i < WINE_DINPUT_KEYBOARD_MAX_KEYS; i++) {
|
||||
/* Report 255 keys :-) */
|
||||
ddoi.guidType = GUID_Key;
|
||||
ddoi.dwOfs = i;
|
||||
ddoi.dwType = DIDFT_MAKEINSTANCE(i) | DIDFT_BUTTON;
|
||||
GetKeyNameTextA(((i & 0x7f) << 16) | ((i & 0x80) << 17), ddoi.tszName, sizeof(ddoi.tszName));
|
||||
_dump_OBJECTINSTANCEA(&ddoi);
|
||||
if (lpCallback(&ddoi, lpvRef) != DIENUM_CONTINUE) return DI_OK;
|
||||
}
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardWImpl_EnumObjects(LPDIRECTINPUTDEVICE8W iface,
|
||||
LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback,
|
||||
LPVOID lpvRef,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
|
||||
device_enumobjects_AtoWcb_data data;
|
||||
|
||||
data.lpCallBack = lpCallback;
|
||||
data.lpvRef = lpvRef;
|
||||
|
||||
return SysKeyboardAImpl_EnumObjects((LPDIRECTINPUTDEVICE8A) This, (LPDIENUMDEVICEOBJECTSCALLBACKA) DIEnumDevicesCallbackAtoW, (LPVOID) &data, dwFlags);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface);
|
||||
|
||||
static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
|
||||
TRACE("(this=%p)\n",This);
|
||||
|
||||
if (This->acquired)
|
||||
return S_FALSE;
|
||||
|
||||
This->acquired = 1;
|
||||
|
||||
if (current_lock != NULL) {
|
||||
FIXME("Not more than one keyboard can be acquired at the same time.\n");
|
||||
SysKeyboardAImpl_Unacquire(iface);
|
||||
}
|
||||
|
||||
current_lock = This;
|
||||
|
||||
if (This->buffersize > 0) {
|
||||
This->buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
This->buffersize * sizeof(*(This->buffer)));
|
||||
This->start = 0;
|
||||
This->count = 0;
|
||||
This->overflow = FALSE;
|
||||
} else {
|
||||
This->buffer = NULL;
|
||||
}
|
||||
|
||||
/*keyboard_hook = SetWindowsHookExW( WH_KEYBOARD_LL, KeyboardCallback, DINPUT_instance, 0 );*/
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
TRACE("(this=%p)\n",This);
|
||||
|
||||
if (This->acquired == 0)
|
||||
return DI_NOEFFECT;
|
||||
|
||||
/* No more locks */
|
||||
if (current_lock == This)
|
||||
current_lock = NULL;
|
||||
else
|
||||
ERR("this != current_lock\n");
|
||||
|
||||
/* Unacquire device */
|
||||
This->acquired = 0;
|
||||
|
||||
if (This->buffersize >= 0) {
|
||||
HeapFree(GetProcessHeap(), 0, This->buffer);
|
||||
This->buffer = NULL;
|
||||
}
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardAImpl_SetEventNotification(LPDIRECTINPUTDEVICE8A iface,
|
||||
HANDLE hnd) {
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
|
||||
TRACE("(this=%p,%p)\n",This,hnd);
|
||||
|
||||
This->hEvent = hnd;
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetCapabilities : get the device capabilities
|
||||
* GetCapabilities : get the device capablitites
|
||||
*/
|
||||
static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
|
||||
LPDIRECTINPUTDEVICE8A iface,
|
||||
@@ -329,15 +619,15 @@ static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
|
||||
WARN("invalid parameter\n");
|
||||
return DIERR_INVALIDPARAM;
|
||||
}
|
||||
|
||||
|
||||
devcaps.dwSize = lpDIDevCaps->dwSize;
|
||||
devcaps.dwFlags = DIDC_ATTACHED;
|
||||
if (This->base.dinput->dwVersion >= 0x0800)
|
||||
if (This->dinput->dwVersion >= 0x0800)
|
||||
devcaps.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8);
|
||||
else
|
||||
devcaps.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8);
|
||||
devcaps.dwAxes = 0;
|
||||
devcaps.dwButtons = This->base.data_format.wine_df->dwNumObjs;
|
||||
devcaps.dwButtons = WINE_DINPUT_KEYBOARD_MAX_KEYS;
|
||||
devcaps.dwPOVs = 0;
|
||||
devcaps.dwFFSamplePeriod = 0;
|
||||
devcaps.dwFFMinTimeResolution = 0;
|
||||
@@ -346,7 +636,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
|
||||
devcaps.dwFFDriverVersion = 0;
|
||||
|
||||
memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize);
|
||||
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
@@ -361,18 +651,32 @@ SysKeyboardAImpl_GetObjectInfo(
|
||||
DWORD dwObj,
|
||||
DWORD dwHow)
|
||||
{
|
||||
HRESULT res;
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
DIDEVICEOBJECTINSTANCEA ddoi;
|
||||
DWORD dwSize = pdidoi->dwSize;
|
||||
|
||||
res = IDirectInputDevice2AImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow);
|
||||
if (res != DI_OK) return res;
|
||||
TRACE("(this=%p,%p,%ld,0x%08lx)\n", This, pdidoi, dwObj, dwHow);
|
||||
|
||||
if (!GetKeyNameTextA((DIDFT_GETINSTANCE(pdidoi->dwType) & 0x80) << 17 |
|
||||
(DIDFT_GETINSTANCE(pdidoi->dwType) & 0x7f) << 16,
|
||||
pdidoi->tszName, sizeof(pdidoi->tszName)))
|
||||
return DIERR_OBJECTNOTFOUND;
|
||||
if (dwHow == DIPH_BYID) {
|
||||
WARN(" querying by id not supported yet...\n");
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
memset(pdidoi, 0, dwSize);
|
||||
memset(&ddoi, 0, sizeof(ddoi));
|
||||
|
||||
ddoi.dwSize = dwSize;
|
||||
ddoi.guidType = GUID_Key;
|
||||
ddoi.dwOfs = dwObj;
|
||||
ddoi.dwType = DIDFT_MAKEINSTANCE(dwObj) | DIDFT_BUTTON;
|
||||
GetKeyNameTextA(((dwObj & 0x7f) << 16) | ((dwObj & 0x80) << 17), ddoi.tszName, sizeof(ddoi.tszName));
|
||||
|
||||
/* And return our just filled device object instance structure */
|
||||
memcpy(pdidoi, &ddoi, (dwSize < sizeof(ddoi) ? dwSize : sizeof(ddoi)));
|
||||
|
||||
_dump_OBJECTINSTANCEA(pdidoi);
|
||||
return res;
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
|
||||
@@ -380,19 +684,32 @@ static HRESULT WINAPI SysKeyboardWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface
|
||||
DWORD dwObj,
|
||||
DWORD dwHow)
|
||||
{
|
||||
HRESULT res;
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
DIDEVICEOBJECTINSTANCEW ddoi;
|
||||
DWORD dwSize = pdidoi->dwSize;
|
||||
|
||||
res = IDirectInputDevice2WImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow);
|
||||
if (res != DI_OK) return res;
|
||||
TRACE("(this=%p,%p,%ld,0x%08lx)\n", This, pdidoi, dwObj, dwHow);
|
||||
|
||||
if (!GetKeyNameTextW((DIDFT_GETINSTANCE(pdidoi->dwType) & 0x80) << 17 |
|
||||
(DIDFT_GETINSTANCE(pdidoi->dwType) & 0x7f) << 16,
|
||||
pdidoi->tszName,
|
||||
sizeof(pdidoi->tszName)/sizeof(pdidoi->tszName[0])))
|
||||
return DIERR_OBJECTNOTFOUND;
|
||||
if (dwHow == DIPH_BYID) {
|
||||
WARN(" querying by id not supported yet...\n");
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
memset(pdidoi, 0, dwSize);
|
||||
memset(&ddoi, 0, sizeof(ddoi));
|
||||
|
||||
ddoi.dwSize = dwSize;
|
||||
ddoi.guidType = GUID_Key;
|
||||
ddoi.dwOfs = dwObj;
|
||||
ddoi.dwType = DIDFT_MAKEINSTANCE(dwObj) | DIDFT_BUTTON;
|
||||
GetKeyNameTextW(((dwObj & 0x7f) << 16) | ((dwObj & 0x80) << 17), ddoi.tszName, sizeof(ddoi.tszName));
|
||||
|
||||
/* And return our just filled device object instance structure */
|
||||
memcpy(pdidoi, &ddoi, (dwSize < sizeof(ddoi) ? dwSize : sizeof(ddoi)));
|
||||
|
||||
_dump_OBJECTINSTANCEW(pdidoi);
|
||||
return res;
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -410,12 +727,12 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceInfo(
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
fill_keyboard_dideviceinstanceA(pdidi, This->base.dinput->dwVersion);
|
||||
|
||||
fill_keyboard_dideviceinstanceA(pdidi, This->dinput->dwVersion);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SysKeyboardWImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8W iface, LPDIDEVICEINSTANCEW pdidi)
|
||||
static HRESULT WINAPI SysKeyboardWImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8W iface, LPDIDEVICEINSTANCEW pdidi)
|
||||
{
|
||||
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
|
||||
TRACE("(this=%p,%p)\n", This, pdidi);
|
||||
@@ -425,44 +742,8 @@ static HRESULT WINAPI SysKeyboardWImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8W iface
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
fill_keyboard_dideviceinstanceW(pdidi, This->base.dinput->dwVersion);
|
||||
|
||||
return DI_OK;
|
||||
}
|
||||
fill_keyboard_dideviceinstanceW(pdidi, This->dinput->dwVersion);
|
||||
|
||||
/******************************************************************************
|
||||
* GetProperty : Retrieves information about the input device.
|
||||
*/
|
||||
static HRESULT WINAPI SysKeyboardAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
|
||||
REFGUID rguid, LPDIPROPHEADER pdiph)
|
||||
{
|
||||
TRACE("(%p) %s,%p\n", iface, debugstr_guid(rguid), pdiph);
|
||||
_dump_DIPROPHEADER(pdiph);
|
||||
|
||||
if (HIWORD(rguid)) return DI_OK;
|
||||
|
||||
switch (LOWORD(rguid))
|
||||
{
|
||||
case (DWORD_PTR)DIPROP_KEYNAME:
|
||||
{
|
||||
HRESULT hr;
|
||||
LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph;
|
||||
DIDEVICEOBJECTINSTANCEW didoi;
|
||||
|
||||
if (pdiph->dwSize != sizeof(DIPROPSTRING))
|
||||
return DIERR_INVALIDPARAM;
|
||||
|
||||
didoi.dwSize = sizeof(DIDEVICEOBJECTINSTANCEW);
|
||||
|
||||
hr = SysKeyboardWImpl_GetObjectInfo((LPDIRECTINPUTDEVICE8W)iface , &didoi,
|
||||
ps->diph.dwObj, ps->diph.dwHow);
|
||||
if (hr == DI_OK)
|
||||
memcpy(ps->wsz, didoi.tszName, sizeof(ps->wsz));
|
||||
return hr;
|
||||
}
|
||||
default:
|
||||
return IDirectInputDevice2AImpl_GetProperty( iface, rguid, pdiph );
|
||||
}
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
@@ -470,17 +751,17 @@ static const IDirectInputDevice8AVtbl SysKeyboardAvt =
|
||||
{
|
||||
IDirectInputDevice2AImpl_QueryInterface,
|
||||
IDirectInputDevice2AImpl_AddRef,
|
||||
IDirectInputDevice2AImpl_Release,
|
||||
SysKeyboardAImpl_Release,
|
||||
SysKeyboardAImpl_GetCapabilities,
|
||||
IDirectInputDevice2AImpl_EnumObjects,
|
||||
SysKeyboardAImpl_GetProperty,
|
||||
IDirectInputDevice2AImpl_SetProperty,
|
||||
IDirectInputDevice2AImpl_Acquire,
|
||||
IDirectInputDevice2AImpl_Unacquire,
|
||||
SysKeyboardAImpl_EnumObjects,
|
||||
SysKeyboardAImpl_GetProperty,
|
||||
SysKeyboardAImpl_SetProperty,
|
||||
SysKeyboardAImpl_Acquire,
|
||||
SysKeyboardAImpl_Unacquire,
|
||||
SysKeyboardAImpl_GetDeviceState,
|
||||
IDirectInputDevice2AImpl_GetDeviceData,
|
||||
SysKeyboardAImpl_GetDeviceData,
|
||||
IDirectInputDevice2AImpl_SetDataFormat,
|
||||
IDirectInputDevice2AImpl_SetEventNotification,
|
||||
SysKeyboardAImpl_SetEventNotification,
|
||||
IDirectInputDevice2AImpl_SetCooperativeLevel,
|
||||
SysKeyboardAImpl_GetObjectInfo,
|
||||
SysKeyboardAImpl_GetDeviceInfo,
|
||||
@@ -493,7 +774,7 @@ static const IDirectInputDevice8AVtbl SysKeyboardAvt =
|
||||
IDirectInputDevice2AImpl_SendForceFeedbackCommand,
|
||||
IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
|
||||
IDirectInputDevice2AImpl_Escape,
|
||||
IDirectInputDevice2AImpl_Poll,
|
||||
IDirectInputDevice2AImpl_Poll,
|
||||
IDirectInputDevice2AImpl_SendDeviceData,
|
||||
IDirectInputDevice7AImpl_EnumEffectsInFile,
|
||||
IDirectInputDevice7AImpl_WriteEffectToFile,
|
||||
@@ -512,17 +793,17 @@ static const IDirectInputDevice8WVtbl SysKeyboardWvt =
|
||||
{
|
||||
IDirectInputDevice2WImpl_QueryInterface,
|
||||
XCAST(AddRef)IDirectInputDevice2AImpl_AddRef,
|
||||
XCAST(Release)IDirectInputDevice2AImpl_Release,
|
||||
XCAST(Release)SysKeyboardAImpl_Release,
|
||||
XCAST(GetCapabilities)SysKeyboardAImpl_GetCapabilities,
|
||||
IDirectInputDevice2WImpl_EnumObjects,
|
||||
XCAST(GetProperty)SysKeyboardAImpl_GetProperty,
|
||||
XCAST(SetProperty)IDirectInputDevice2AImpl_SetProperty,
|
||||
XCAST(Acquire)IDirectInputDevice2AImpl_Acquire,
|
||||
XCAST(Unacquire)IDirectInputDevice2AImpl_Unacquire,
|
||||
SysKeyboardWImpl_EnumObjects,
|
||||
XCAST(GetProperty)SysKeyboardAImpl_GetProperty,
|
||||
XCAST(SetProperty)SysKeyboardAImpl_SetProperty,
|
||||
XCAST(Acquire)SysKeyboardAImpl_Acquire,
|
||||
XCAST(Unacquire)SysKeyboardAImpl_Unacquire,
|
||||
XCAST(GetDeviceState)SysKeyboardAImpl_GetDeviceState,
|
||||
XCAST(GetDeviceData)IDirectInputDevice2AImpl_GetDeviceData,
|
||||
XCAST(GetDeviceData)SysKeyboardAImpl_GetDeviceData,
|
||||
XCAST(SetDataFormat)IDirectInputDevice2AImpl_SetDataFormat,
|
||||
XCAST(SetEventNotification)IDirectInputDevice2AImpl_SetEventNotification,
|
||||
XCAST(SetEventNotification)SysKeyboardAImpl_SetEventNotification,
|
||||
XCAST(SetCooperativeLevel)IDirectInputDevice2AImpl_SetCooperativeLevel,
|
||||
SysKeyboardWImpl_GetObjectInfo,
|
||||
SysKeyboardWImpl_GetDeviceInfo,
|
||||
@@ -535,7 +816,7 @@ static const IDirectInputDevice8WVtbl SysKeyboardWvt =
|
||||
XCAST(SendForceFeedbackCommand)IDirectInputDevice2AImpl_SendForceFeedbackCommand,
|
||||
XCAST(EnumCreatedEffectObjects)IDirectInputDevice2AImpl_EnumCreatedEffectObjects,
|
||||
XCAST(Escape)IDirectInputDevice2AImpl_Escape,
|
||||
XCAST(Poll)IDirectInputDevice2AImpl_Poll,
|
||||
XCAST(Poll)IDirectInputDevice2AImpl_Poll,
|
||||
XCAST(SendDeviceData)IDirectInputDevice2AImpl_SendDeviceData,
|
||||
IDirectInputDevice7WImpl_EnumEffectsInFile,
|
||||
IDirectInputDevice7WImpl_WriteEffectToFile,
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "dinput.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(dinput);
|
||||
|
||||
@@ -116,6 +115,9 @@ static LONG register_key_defvalueA(HKEY base, WCHAR const *name,
|
||||
static LONG register_progid(WCHAR const *clsid,
|
||||
char const *progid, char const *curver_progid,
|
||||
char const *name, char const *extra);
|
||||
static LONG recursive_delete_key(HKEY key);
|
||||
static LONG recursive_delete_keyA(HKEY base, char const *name);
|
||||
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
|
||||
|
||||
/***********************************************************************
|
||||
* register_interfaces
|
||||
@@ -146,7 +148,7 @@ static HRESULT register_interfaces(struct regsvr_interface const *list)
|
||||
}
|
||||
|
||||
if (list->base_iid) {
|
||||
res = register_key_guid(iid_key, base_ifa_keyname, list->base_iid);
|
||||
register_key_guid(iid_key, base_ifa_keyname, list->base_iid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
@@ -158,7 +160,7 @@ static HRESULT register_interfaces(struct regsvr_interface const *list)
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
|
||||
sprintfW(buf, fmt, list->num_methods);
|
||||
wsprintfW(buf, fmt, list->num_methods);
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)buf,
|
||||
(lstrlenW(buf) + 1) * sizeof(WCHAR));
|
||||
@@ -168,12 +170,12 @@ static HRESULT register_interfaces(struct regsvr_interface const *list)
|
||||
}
|
||||
|
||||
if (list->ps_clsid) {
|
||||
res = register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid);
|
||||
register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (list->ps_clsid32) {
|
||||
res = register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32);
|
||||
register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
@@ -204,8 +206,7 @@ static HRESULT unregister_interfaces(struct regsvr_interface const *list)
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(list->iid, buf, 39);
|
||||
//res = RegDeleteTreeW(interface_key, buf);
|
||||
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
|
||||
res = recursive_delete_keyW(interface_key, buf);
|
||||
}
|
||||
|
||||
RegCloseKey(interface_key);
|
||||
@@ -312,19 +313,16 @@ static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(list->clsid, buf, 39);
|
||||
//res = RegDeleteTreeW(coclass_key, buf);
|
||||
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
|
||||
res = recursive_delete_keyW(coclass_key, buf);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
|
||||
if (list->progid) {
|
||||
// res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid);
|
||||
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
|
||||
res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
}
|
||||
|
||||
if (list->viprogid) {
|
||||
//res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid);
|
||||
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
|
||||
res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
}
|
||||
}
|
||||
@@ -436,6 +434,70 @@ error_close_progid_key:
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* recursive_delete_key
|
||||
*/
|
||||
static LONG recursive_delete_key(HKEY key)
|
||||
{
|
||||
LONG res;
|
||||
WCHAR subkey_name[MAX_PATH];
|
||||
DWORD cName;
|
||||
HKEY subkey;
|
||||
|
||||
for (;;) {
|
||||
cName = sizeof(subkey_name) / sizeof(WCHAR);
|
||||
res = RegEnumKeyExW(key, 0, subkey_name, &cName,
|
||||
NULL, NULL, NULL, NULL);
|
||||
if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) {
|
||||
res = ERROR_SUCCESS; /* presumably we're done enumerating */
|
||||
break;
|
||||
}
|
||||
res = RegOpenKeyExW(key, subkey_name, 0,
|
||||
KEY_READ | KEY_WRITE, &subkey);
|
||||
if (res == ERROR_FILE_NOT_FOUND) continue;
|
||||
if (res != ERROR_SUCCESS) break;
|
||||
|
||||
res = recursive_delete_key(subkey);
|
||||
RegCloseKey(subkey);
|
||||
if (res != ERROR_SUCCESS) break;
|
||||
}
|
||||
|
||||
if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* recursive_delete_keyA
|
||||
*/
|
||||
static LONG recursive_delete_keyA(HKEY base, char const *name)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = recursive_delete_key(key);
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* recursive_delete_keyW
|
||||
*/
|
||||
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = recursive_delete_key(key);
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* coclass list
|
||||
*/
|
||||
|
@@ -13,7 +13,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define WINE_FILEDESCRIPTION_STR "Wine DirectInput"
|
||||
|
@@ -1,11 +0,0 @@
|
||||
<group>
|
||||
<module name="activeds" type="win32dll" baseaddress="${BASEADDRESS_ACTIVEDS}" installbase="system32" installname="activeds.dll">
|
||||
<importlibrary definition="activeds.spec" />
|
||||
<include base="activeds">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<define name="__WINESRC__" />
|
||||
<library>kernel32</library>
|
||||
<library>wine</library>
|
||||
<file>activeds_main.c</file>
|
||||
</module>
|
||||
</group>
|
@@ -1,28 +0,0 @@
|
||||
3 stdcall ADsGetObject(wstr ptr ptr)
|
||||
4 stdcall ADsBuildEnumerator(ptr ptr)
|
||||
5 stub ADsFreeEnumerator
|
||||
6 stdcall ADsEnumerateNext(ptr long ptr ptr)
|
||||
7 stub ADsBuildVarArrayStr
|
||||
8 stub ADsBuildVarArrayInt
|
||||
9 stdcall ADsOpenObject(wstr wstr wstr long ptr ptr)
|
||||
12 stub ADsSetLastError
|
||||
13 stub ADsGetLastError
|
||||
14 stub AllocADsMem
|
||||
15 stdcall FreeADsMem(ptr)
|
||||
16 stub ReallocADsMem
|
||||
17 stub AllocADsStr
|
||||
18 stub FreeADsStr
|
||||
19 stub ReallocADsStr
|
||||
20 stub ADsEncodeBinaryData
|
||||
21 stub PropVariantToAdsType
|
||||
22 stub AdsTypeToPropVariant
|
||||
23 stub AdsFreeAdsValues
|
||||
24 stub ADsDecodeBinaryData
|
||||
25 stub AdsTypeToPropVariant2
|
||||
26 stub PropVariantToAdsType2
|
||||
27 stub ConvertSecDescriptorToVariant
|
||||
28 stub ConvertSecurityDescriptorToSecDes
|
||||
#@ stub DllCanUnloadNow
|
||||
#@ stub DllGetClassObject
|
||||
#@ stub DllRegisterServer
|
||||
#@ stub DllUnregisterServer
|
@@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Implementation of the Active Directory Service Interface
|
||||
*
|
||||
* Copyright 2005 Detlef Riekenberg
|
||||
*
|
||||
* This file contains only stubs to get the printui.dll up and running
|
||||
* activeds.dll is much much more than this
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
|
||||
#include "objbase.h"
|
||||
#include "iads.h"
|
||||
#include "adshlp.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(activeds);
|
||||
|
||||
/*****************************************************
|
||||
* DllMain
|
||||
*/
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
TRACE("(%p, %d, %p)\n",hinstDLL, fdwReason, lpvReserved);
|
||||
|
||||
switch(fdwReason)
|
||||
{
|
||||
case DLL_WINE_PREATTACH:
|
||||
return FALSE; /* prefer native version */
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls( hinstDLL );
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
* ADsGetObject [ACTIVEDS.3]
|
||||
*/
|
||||
HRESULT WINAPI ADsGetObject(LPCWSTR lpszPathName, REFIID riid, VOID** ppObject)
|
||||
{
|
||||
FIXME("(%s)->(%s,%p)!stub\n",debugstr_w(lpszPathName), debugstr_guid(riid), ppObject);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
* ADsBuildEnumerator [ACTIVEDS.4]
|
||||
*/
|
||||
HRESULT WINAPI ADsBuildEnumerator(IADsContainer * pADsContainer, IEnumVARIANT** ppEnumVariant)
|
||||
{
|
||||
FIXME("(%p)->(%p)!stub\n",pADsContainer, ppEnumVariant);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
* ADsEnumerateNext [ACTIVEDS.6]
|
||||
*/
|
||||
HRESULT WINAPI ADsEnumerateNext(IEnumVARIANT* pEnumVariant, ULONG cElements, VARIANT* pvar, ULONG * pcElementsFetched)
|
||||
{
|
||||
FIXME("(%p)->(%u, %p, %p)!stub\n",pEnumVariant, cElements, pvar, pcElementsFetched);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
* ADsOpenObject [ACTIVEDS.9]
|
||||
*/
|
||||
HRESULT WINAPI ADsOpenObject(LPCWSTR lpszPathName, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwReserved, REFIID riid, VOID** ppObject)
|
||||
{
|
||||
FIXME("(%s,%s,%u,%p,%p)!stub\n", debugstr_w(lpszPathName),
|
||||
debugstr_w(lpszUserName), dwReserved, debugstr_guid(riid), ppObject);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
* FreeADsMem [ACTIVEDS.15]
|
||||
*/
|
||||
BOOL WINAPI FreeADsMem(LPVOID pMem)
|
||||
{
|
||||
FIXME("(%p)!stub\n",pMem);
|
||||
return FALSE;
|
||||
}
|
@@ -10,63 +10,12 @@
|
||||
* 20030202 KJK compressed stubs
|
||||
*
|
||||
*/
|
||||
|
||||
#include <advapi32.h>
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(advapi);
|
||||
|
||||
/* imported from wine 1.1.14 */
|
||||
static void* ADVAPI_GetDomainName(unsigned sz, unsigned ofs)
|
||||
{
|
||||
HKEY key;
|
||||
LONG ret;
|
||||
BYTE* ptr = NULL;
|
||||
UNICODE_STRING* ustr;
|
||||
|
||||
static const WCHAR wVNETSUP[] = {
|
||||
'S','y','s','t','e','m','\\',
|
||||
'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
|
||||
'S','e','r','v','i','c','e','s','\\',
|
||||
'V','x','D','\\','V','N','E','T','S','U','P','\0'};
|
||||
|
||||
ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, wVNETSUP, 0, KEY_READ, &key);
|
||||
if (ret == ERROR_SUCCESS)
|
||||
{
|
||||
DWORD size = 0;
|
||||
static const WCHAR wg[] = { 'W','o','r','k','g','r','o','u','p',0 };
|
||||
|
||||
ret = RegQueryValueExW(key, wg, NULL, NULL, NULL, &size);
|
||||
if (ret == ERROR_MORE_DATA || ret == ERROR_SUCCESS)
|
||||
{
|
||||
ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sz + size);
|
||||
if (!ptr) return NULL;
|
||||
ustr = (UNICODE_STRING*)(ptr + ofs);
|
||||
ustr->MaximumLength = size;
|
||||
ustr->Buffer = (WCHAR*)(ptr + sz);
|
||||
ret = RegQueryValueExW(key, wg, NULL, NULL, (LPBYTE)ustr->Buffer, &size);
|
||||
if (ret != ERROR_SUCCESS)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, ptr);
|
||||
ptr = NULL;
|
||||
}
|
||||
else ustr->Length = size - sizeof(WCHAR);
|
||||
}
|
||||
RegCloseKey(key);
|
||||
}
|
||||
if (!ptr)
|
||||
{
|
||||
static const WCHAR wDomain[] = {'D','O','M','A','I','N','\0'};
|
||||
ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
sz + sizeof(wDomain));
|
||||
if (!ptr) return NULL;
|
||||
ustr = (UNICODE_STRING*)(ptr + ofs);
|
||||
ustr->MaximumLength = sizeof(wDomain);
|
||||
ustr->Buffer = (WCHAR*)(ptr + sz);
|
||||
ustr->Length = sizeof(wDomain) - sizeof(WCHAR);
|
||||
memcpy(ustr->Buffer, wDomain, sizeof(wDomain));
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
|
||||
handle_t __RPC_USER
|
||||
PLSAPR_SERVER_NAME_bind(PLSAPR_SERVER_NAME pszSystemName)
|
||||
@@ -439,14 +388,14 @@ LsaOpenPolicy(
|
||||
NTSTATUS Status;
|
||||
|
||||
TRACE("LsaOpenPolicy (%s,%p,0x%08x,%p)\n",
|
||||
SystemName ? debugstr_w(SystemName->Buffer) : "(null)",
|
||||
SystemName?debugstr_w(SystemName->Buffer):"(null)",
|
||||
ObjectAttributes, DesiredAccess, PolicyHandle);
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
*PolicyHandle = NULL;
|
||||
|
||||
Status = LsarOpenPolicy(SystemName ? SystemName->Buffer : NULL,
|
||||
Status = LsarOpenPolicy(SystemName->Buffer,
|
||||
(PLSAPR_OBJECT_ATTRIBUTES)ObjectAttributes,
|
||||
DesiredAccess,
|
||||
PolicyHandle);
|
||||
@@ -528,62 +477,58 @@ LsaQueryInformationPolicy(LSA_HANDLE PolicyHandle,
|
||||
}
|
||||
break;
|
||||
case PolicyPrimaryDomainInformation: /* 3 */
|
||||
{
|
||||
/* Only the domain name is valid for the local computer.
|
||||
* All other fields are zero.
|
||||
*/
|
||||
PPOLICY_PRIMARY_DOMAIN_INFO pinfo;
|
||||
|
||||
pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_PRIMARY_DOMAIN_INFO, Name));
|
||||
|
||||
TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer));
|
||||
|
||||
*Buffer = pinfo;
|
||||
}
|
||||
case PolicyAccountDomainInformation: /* 5 */
|
||||
{
|
||||
struct di
|
||||
{
|
||||
POLICY_ACCOUNT_DOMAIN_INFO info;
|
||||
POLICY_PRIMARY_DOMAIN_INFO ppdi;
|
||||
SID sid;
|
||||
DWORD padding[3];
|
||||
WCHAR domain[MAX_COMPUTERNAME_LENGTH + 1];
|
||||
};
|
||||
SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
|
||||
|
||||
DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
|
||||
struct di * xdi = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*xdi));
|
||||
HKEY key;
|
||||
BOOL useDefault = TRUE;
|
||||
LONG ret;
|
||||
|
||||
xdi->info.DomainName.MaximumLength = dwSize * sizeof(WCHAR);
|
||||
xdi->info.DomainName.Buffer = xdi->domain;
|
||||
if (GetComputerNameW(xdi->info.DomainName.Buffer, &dwSize))
|
||||
xdi->info.DomainName.Length = dwSize * sizeof(WCHAR);
|
||||
if ((ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE,
|
||||
"System\\CurrentControlSet\\Services\\VxD\\VNETSUP", 0,
|
||||
KEY_READ, &key)) == ERROR_SUCCESS)
|
||||
{
|
||||
DWORD size = 0;
|
||||
WCHAR wg[] = { 'W','o','r','k','g','r','o','u','p',0 };
|
||||
|
||||
TRACE("setting name to %s\n", debugstr_w(xdi->info.DomainName.Buffer));
|
||||
ret = RegQueryValueExW(key, wg, NULL, NULL, NULL, &size);
|
||||
if (ret == ERROR_MORE_DATA || ret == ERROR_SUCCESS)
|
||||
{
|
||||
xdi->ppdi.Name.Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY, size);
|
||||
if ((ret = RegQueryValueExW(key, wg, NULL, NULL,
|
||||
(LPBYTE)xdi->ppdi.Name.Buffer, &size)) == ERROR_SUCCESS)
|
||||
{
|
||||
xdi->ppdi.Name.Length = (USHORT)size;
|
||||
useDefault = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, xdi->ppdi.Name.Buffer);
|
||||
xdi->ppdi.Name.Buffer = NULL;
|
||||
}
|
||||
}
|
||||
RegCloseKey(key);
|
||||
}
|
||||
if (useDefault)
|
||||
RtlCreateUnicodeStringFromAsciiz(&(xdi->ppdi.Name), "DOMAIN");
|
||||
TRACE("setting domain to \n");
|
||||
|
||||
xdi->info.DomainSid = &xdi->sid;
|
||||
xdi->ppdi.Sid = &(xdi->sid);
|
||||
xdi->sid.Revision = SID_REVISION;
|
||||
xdi->sid.SubAuthorityCount = 1;
|
||||
xdi->sid.IdentifierAuthority = localSidAuthority;
|
||||
xdi->sid.SubAuthority[0] = SECURITY_LOCAL_SYSTEM_RID;
|
||||
|
||||
*Buffer = xdi;
|
||||
}
|
||||
break;
|
||||
case PolicyDnsDomainInformation: /* 12 (0xc) */
|
||||
{
|
||||
/* Only the domain name is valid for the local computer.
|
||||
* All other fields are zero.
|
||||
*/
|
||||
PPOLICY_DNS_DOMAIN_INFO pinfo;
|
||||
|
||||
pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_DNS_DOMAIN_INFO, Name));
|
||||
|
||||
TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer));
|
||||
|
||||
*Buffer = pinfo;
|
||||
}
|
||||
break;
|
||||
case PolicyAuditLogInformation:
|
||||
case PolicyPdAccountInformation:
|
||||
case PolicyLsaServerRoleInformation:
|
||||
@@ -592,6 +537,7 @@ LsaQueryInformationPolicy(LSA_HANDLE PolicyHandle,
|
||||
case PolicyModificationInformation:
|
||||
case PolicyAuditFullSetInformation:
|
||||
case PolicyAuditFullQueryInformation:
|
||||
case PolicyDnsDomainInformation:
|
||||
case PolicyEfsInformation:
|
||||
{
|
||||
FIXME("category not implemented\n");
|
||||
|
@@ -541,6 +541,7 @@ BuildSecurityDescriptorA(IN PTRUSTEE_A pOwner OPTIONAL,
|
||||
BOOL WINAPI DecryptFileW(LPCWSTR lpFileName, DWORD dwReserved)
|
||||
{
|
||||
FIXME("%s(%S) not implemented!\n", __FUNCTION__, lpFileName);
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -577,6 +578,7 @@ BOOL WINAPI
|
||||
EncryptFileW(LPCWSTR lpFileName)
|
||||
{
|
||||
FIXME("%s() not implemented!\n", __FUNCTION__);
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> %s"
|
||||
CAPTION "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %s"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
|
@@ -2659,7 +2659,33 @@ TOOLBAR_AddBitmapToImageList(TOOLBAR_INFO *infoPtr, HIMAGELIST himlDef, const TB
|
||||
TRACE("adding hInst=%p nID=%d nButtons=%d\n", bitmap->hInst, bitmap->nID, bitmap->nButtons);
|
||||
/* Add bitmaps to the default image list */
|
||||
if (bitmap->hInst == NULL) /* a handle was passed */
|
||||
hbmLoad = CopyImage(ULongToHandle(bitmap->nID), IMAGE_BITMAP, 0, 0, 0);
|
||||
{
|
||||
BITMAP bmp;
|
||||
HBITMAP hOldBitmapBitmap, hOldBitmapLoad;
|
||||
HDC hdcImage, hdcBitmap;
|
||||
|
||||
/* copy the bitmap before adding it so that the user's bitmap
|
||||
* doesn't get modified.
|
||||
*/
|
||||
GetObjectW ((HBITMAP)bitmap->nID, sizeof(BITMAP), (LPVOID)&bmp);
|
||||
|
||||
hdcImage = CreateCompatibleDC(0);
|
||||
hdcBitmap = CreateCompatibleDC(0);
|
||||
|
||||
/* create new bitmap */
|
||||
hbmLoad = CreateBitmap (bmp.bmWidth, bmp.bmHeight, bmp.bmPlanes, bmp.bmBitsPixel, NULL);
|
||||
hOldBitmapBitmap = SelectObject(hdcBitmap, (HBITMAP)bitmap->nID);
|
||||
hOldBitmapLoad = SelectObject(hdcImage, hbmLoad);
|
||||
|
||||
/* Copy the user's image */
|
||||
BitBlt (hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight,
|
||||
hdcBitmap, 0, 0, SRCCOPY);
|
||||
|
||||
SelectObject (hdcImage, hOldBitmapLoad);
|
||||
SelectObject (hdcBitmap, hOldBitmapBitmap);
|
||||
DeleteDC (hdcImage);
|
||||
DeleteDC (hdcBitmap);
|
||||
}
|
||||
else
|
||||
hbmLoad = CreateMappedBitmap(bitmap->hInst, bitmap->nID, 0, NULL, 0);
|
||||
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#include "winnls.h"
|
||||
#include "rpc.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "crypt32_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(crypt);
|
||||
@@ -84,7 +83,7 @@ PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType,
|
||||
|
||||
ret = CryptDecodeObjectEx(dwCertEncodingType, X509_CERT_TO_BE_SIGNED,
|
||||
pbCertEncoded, cbCertEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL,
|
||||
&certInfo, &size);
|
||||
(BYTE *)&certInfo, &size);
|
||||
if (ret)
|
||||
{
|
||||
BYTE *data = NULL;
|
||||
@@ -108,24 +107,20 @@ PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType,
|
||||
}
|
||||
|
||||
end:
|
||||
return cert;
|
||||
return (PCCERT_CONTEXT)cert;
|
||||
}
|
||||
|
||||
PCCERT_CONTEXT WINAPI CertDuplicateCertificateContext(
|
||||
PCCERT_CONTEXT pCertContext)
|
||||
{
|
||||
TRACE("(%p)\n", pCertContext);
|
||||
|
||||
if (!pCertContext)
|
||||
return NULL;
|
||||
|
||||
Context_AddRef((void *)pCertContext, sizeof(CERT_CONTEXT));
|
||||
return pCertContext;
|
||||
}
|
||||
|
||||
static void CertDataContext_Free(void *context)
|
||||
{
|
||||
PCERT_CONTEXT certContext = context;
|
||||
PCERT_CONTEXT certContext = (PCERT_CONTEXT)context;
|
||||
|
||||
CryptMemFree(certContext->pbCertEncoded);
|
||||
LocalFree(certContext->pCertInfo);
|
||||
@@ -145,7 +140,7 @@ DWORD WINAPI CertEnumCertificateContextProperties(PCCERT_CONTEXT pCertContext,
|
||||
DWORD dwPropId)
|
||||
{
|
||||
PCONTEXT_PROPERTY_LIST properties = Context_GetProperties(
|
||||
pCertContext, sizeof(CERT_CONTEXT));
|
||||
(void *)pCertContext, sizeof(CERT_CONTEXT));
|
||||
DWORD ret;
|
||||
|
||||
TRACE("(%p, %d)\n", pCertContext, dwPropId);
|
||||
@@ -196,7 +191,7 @@ static BOOL CertContext_CopyParam(void *pvData, DWORD *pcbData, const void *pb,
|
||||
static BOOL CertContext_GetProperty(void *context, DWORD dwPropId,
|
||||
void *pvData, DWORD *pcbData)
|
||||
{
|
||||
PCCERT_CONTEXT pCertContext = context;
|
||||
PCCERT_CONTEXT pCertContext = (PCCERT_CONTEXT)context;
|
||||
PCONTEXT_PROPERTY_LIST properties =
|
||||
Context_GetProperties(context, sizeof(CERT_CONTEXT));
|
||||
BOOL ret;
|
||||
@@ -354,7 +349,7 @@ BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext,
|
||||
ret = CertContext_GetProperty((void *)pCertContext, dwPropId, pvData,
|
||||
pcbData);
|
||||
if (ret && pvData)
|
||||
CRYPT_FixKeyProvInfoPointers(pvData);
|
||||
CRYPT_FixKeyProvInfoPointers((PCRYPT_KEY_PROV_INFO)pvData);
|
||||
break;
|
||||
default:
|
||||
ret = CertContext_GetProperty((void *)pCertContext, dwPropId, pvData,
|
||||
@@ -723,218 +718,6 @@ BOOL WINAPI CryptAcquireCertificatePrivateKey(PCCERT_CONTEXT pCert,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static BOOL key_prov_info_matches_cert(PCCERT_CONTEXT pCert,
|
||||
const CRYPT_KEY_PROV_INFO *keyProvInfo)
|
||||
{
|
||||
HCRYPTPROV csp;
|
||||
BOOL matches = FALSE;
|
||||
|
||||
if (CryptAcquireContextW(&csp, keyProvInfo->pwszContainerName,
|
||||
keyProvInfo->pwszProvName, keyProvInfo->dwProvType, keyProvInfo->dwFlags))
|
||||
{
|
||||
DWORD size;
|
||||
|
||||
/* Need to sign something to verify the sig. What to sign? Why not
|
||||
* the certificate itself?
|
||||
*/
|
||||
if (CryptSignAndEncodeCertificate(csp, AT_SIGNATURE,
|
||||
pCert->dwCertEncodingType, X509_CERT_TO_BE_SIGNED, pCert->pCertInfo,
|
||||
&pCert->pCertInfo->SignatureAlgorithm, NULL, NULL, &size))
|
||||
{
|
||||
BYTE *certEncoded = CryptMemAlloc(size);
|
||||
|
||||
if (certEncoded)
|
||||
{
|
||||
if (CryptSignAndEncodeCertificate(csp, AT_SIGNATURE,
|
||||
pCert->dwCertEncodingType, X509_CERT_TO_BE_SIGNED,
|
||||
pCert->pCertInfo, &pCert->pCertInfo->SignatureAlgorithm,
|
||||
NULL, certEncoded, &size))
|
||||
{
|
||||
if (size == pCert->cbCertEncoded &&
|
||||
!memcmp(certEncoded, pCert->pbCertEncoded, size))
|
||||
matches = TRUE;
|
||||
}
|
||||
CryptMemFree(certEncoded);
|
||||
}
|
||||
}
|
||||
CryptReleaseContext(csp, 0);
|
||||
}
|
||||
return matches;
|
||||
}
|
||||
|
||||
static BOOL container_matches_cert(PCCERT_CONTEXT pCert, LPCSTR container,
|
||||
CRYPT_KEY_PROV_INFO *keyProvInfo)
|
||||
{
|
||||
CRYPT_KEY_PROV_INFO copy;
|
||||
WCHAR containerW[MAX_PATH];
|
||||
BOOL matches = FALSE;
|
||||
|
||||
MultiByteToWideChar(CP_ACP, 0, container, -1,
|
||||
containerW, sizeof(containerW) / sizeof(containerW[0]));
|
||||
/* We make a copy of the CRYPT_KEY_PROV_INFO because the caller expects
|
||||
* keyProvInfo->pwszContainerName to be NULL or a heap-allocated container
|
||||
* name.
|
||||
*/
|
||||
memcpy(©, keyProvInfo, sizeof(copy));
|
||||
copy.pwszContainerName = containerW;
|
||||
matches = key_prov_info_matches_cert(pCert, ©);
|
||||
if (matches)
|
||||
{
|
||||
keyProvInfo->pwszContainerName =
|
||||
CryptMemAlloc((strlenW(containerW) + 1) * sizeof(WCHAR));
|
||||
if (keyProvInfo->pwszContainerName)
|
||||
{
|
||||
strcpyW(keyProvInfo->pwszContainerName, containerW);
|
||||
keyProvInfo->dwKeySpec = AT_SIGNATURE;
|
||||
}
|
||||
else
|
||||
matches = FALSE;
|
||||
}
|
||||
return matches;
|
||||
}
|
||||
|
||||
/* Searches the provider named keyProvInfo.pwszProvName for a container whose
|
||||
* private key matches pCert's public key. Upon success, updates keyProvInfo
|
||||
* with the matching container's info (free keyProvInfo.pwszContainerName upon
|
||||
* success.)
|
||||
* Returns TRUE if found, FALSE if not.
|
||||
*/
|
||||
static BOOL find_key_prov_info_in_provider(PCCERT_CONTEXT pCert,
|
||||
CRYPT_KEY_PROV_INFO *keyProvInfo)
|
||||
{
|
||||
HCRYPTPROV defProvider;
|
||||
BOOL ret, found = FALSE;
|
||||
char containerA[MAX_PATH];
|
||||
|
||||
assert(keyProvInfo->pwszContainerName == NULL);
|
||||
if ((ret = CryptAcquireContextW(&defProvider, NULL,
|
||||
keyProvInfo->pwszProvName, keyProvInfo->dwProvType,
|
||||
keyProvInfo->dwFlags | CRYPT_VERIFYCONTEXT)))
|
||||
{
|
||||
DWORD enumFlags = keyProvInfo->dwFlags | CRYPT_FIRST;
|
||||
|
||||
while (ret && !found)
|
||||
{
|
||||
DWORD size = sizeof(containerA);
|
||||
|
||||
ret = CryptGetProvParam(defProvider, PP_ENUMCONTAINERS,
|
||||
(BYTE *)containerA, &size, enumFlags);
|
||||
if (ret)
|
||||
found = container_matches_cert(pCert, containerA, keyProvInfo);
|
||||
if (enumFlags & CRYPT_FIRST)
|
||||
{
|
||||
enumFlags &= ~CRYPT_FIRST;
|
||||
enumFlags |= CRYPT_NEXT;
|
||||
}
|
||||
}
|
||||
CryptReleaseContext(defProvider, 0);
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
static BOOL find_matching_provider(PCCERT_CONTEXT pCert, DWORD dwFlags)
|
||||
{
|
||||
BOOL found = FALSE, ret = TRUE;
|
||||
DWORD index = 0, cbProvName = 0;
|
||||
CRYPT_KEY_PROV_INFO keyProvInfo;
|
||||
|
||||
TRACE("(%p, %08x)\n", pCert, dwFlags);
|
||||
|
||||
memset(&keyProvInfo, 0, sizeof(keyProvInfo));
|
||||
while (ret && !found)
|
||||
{
|
||||
DWORD size = 0;
|
||||
|
||||
ret = CryptEnumProvidersW(index, NULL, 0, &keyProvInfo.dwProvType,
|
||||
NULL, &size);
|
||||
if (ret)
|
||||
{
|
||||
if (size <= cbProvName)
|
||||
ret = CryptEnumProvidersW(index, NULL, 0,
|
||||
&keyProvInfo.dwProvType, keyProvInfo.pwszProvName, &size);
|
||||
else
|
||||
{
|
||||
CryptMemFree(keyProvInfo.pwszProvName);
|
||||
keyProvInfo.pwszProvName = CryptMemAlloc(size);
|
||||
if (keyProvInfo.pwszProvName)
|
||||
{
|
||||
cbProvName = size;
|
||||
ret = CryptEnumProvidersW(index, NULL, 0,
|
||||
&keyProvInfo.dwProvType, keyProvInfo.pwszProvName, &size);
|
||||
if (ret)
|
||||
{
|
||||
if (dwFlags & CRYPT_FIND_SILENT_KEYSET_FLAG)
|
||||
keyProvInfo.dwFlags |= CRYPT_SILENT;
|
||||
if (dwFlags & CRYPT_FIND_USER_KEYSET_FLAG ||
|
||||
!(dwFlags & (CRYPT_FIND_USER_KEYSET_FLAG |
|
||||
CRYPT_FIND_MACHINE_KEYSET_FLAG)))
|
||||
{
|
||||
keyProvInfo.dwFlags |= CRYPT_USER_KEYSET;
|
||||
found = find_key_prov_info_in_provider(pCert,
|
||||
&keyProvInfo);
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
if (dwFlags & CRYPT_FIND_MACHINE_KEYSET_FLAG ||
|
||||
!(dwFlags & (CRYPT_FIND_USER_KEYSET_FLAG |
|
||||
CRYPT_FIND_MACHINE_KEYSET_FLAG)))
|
||||
{
|
||||
keyProvInfo.dwFlags &= ~CRYPT_USER_KEYSET;
|
||||
keyProvInfo.dwFlags |= CRYPT_MACHINE_KEYSET;
|
||||
found = find_key_prov_info_in_provider(pCert,
|
||||
&keyProvInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
ret = FALSE;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
CertSetCertificateContextProperty(pCert, CERT_KEY_PROV_INFO_PROP_ID,
|
||||
0, &keyProvInfo);
|
||||
CryptMemFree(keyProvInfo.pwszProvName);
|
||||
CryptMemFree(keyProvInfo.pwszContainerName);
|
||||
return found;
|
||||
}
|
||||
|
||||
static BOOL cert_prov_info_matches_cert(PCCERT_CONTEXT pCert)
|
||||
{
|
||||
BOOL matches = FALSE;
|
||||
DWORD size;
|
||||
|
||||
if (CertGetCertificateContextProperty(pCert, CERT_KEY_PROV_INFO_PROP_ID,
|
||||
NULL, &size))
|
||||
{
|
||||
CRYPT_KEY_PROV_INFO *keyProvInfo = CryptMemAlloc(size);
|
||||
|
||||
if (keyProvInfo)
|
||||
{
|
||||
if (CertGetCertificateContextProperty(pCert,
|
||||
CERT_KEY_PROV_INFO_PROP_ID, keyProvInfo, &size))
|
||||
matches = key_prov_info_matches_cert(pCert, keyProvInfo);
|
||||
CryptMemFree(keyProvInfo);
|
||||
}
|
||||
}
|
||||
return matches;
|
||||
}
|
||||
|
||||
BOOL WINAPI CryptFindCertificateKeyProvInfo(PCCERT_CONTEXT pCert,
|
||||
DWORD dwFlags, void *pvReserved)
|
||||
{
|
||||
BOOL matches = FALSE;
|
||||
|
||||
TRACE("(%p, %08x, %p)\n", pCert, dwFlags, pvReserved);
|
||||
|
||||
matches = cert_prov_info_matches_cert(pCert);
|
||||
if (!matches)
|
||||
matches = find_matching_provider(pCert, dwFlags);
|
||||
return matches;
|
||||
}
|
||||
|
||||
BOOL WINAPI CertCompareCertificate(DWORD dwCertEncodingType,
|
||||
PCERT_INFO pCertId1, PCERT_INFO pCertId2)
|
||||
{
|
||||
@@ -1137,7 +920,7 @@ static BOOL compare_cert_by_md5_hash(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
CERT_MD5_HASH_PROP_ID, hash, &size);
|
||||
if (ret)
|
||||
{
|
||||
const CRYPT_HASH_BLOB *pHash = pvPara;
|
||||
const CRYPT_HASH_BLOB *pHash = (const CRYPT_HASH_BLOB *)pvPara;
|
||||
|
||||
if (size == pHash->cbData)
|
||||
ret = !memcmp(pHash->pbData, hash, size);
|
||||
@@ -1158,7 +941,7 @@ static BOOL compare_cert_by_sha1_hash(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
CERT_SHA1_HASH_PROP_ID, hash, &size);
|
||||
if (ret)
|
||||
{
|
||||
const CRYPT_HASH_BLOB *pHash = pvPara;
|
||||
const CRYPT_HASH_BLOB *pHash = (const CRYPT_HASH_BLOB *)pvPara;
|
||||
|
||||
if (size == pHash->cbData)
|
||||
ret = !memcmp(pHash->pbData, hash, size);
|
||||
@@ -1183,17 +966,6 @@ static BOOL compare_cert_by_name(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static BOOL compare_cert_by_public_key(PCCERT_CONTEXT pCertContext,
|
||||
DWORD dwType, DWORD dwFlags, const void *pvPara)
|
||||
{
|
||||
CERT_PUBLIC_KEY_INFO *publicKey = (CERT_PUBLIC_KEY_INFO *)pvPara;
|
||||
BOOL ret;
|
||||
|
||||
ret = CertComparePublicKeyInfo(pCertContext->dwCertEncodingType,
|
||||
&pCertContext->pCertInfo->SubjectPublicKeyInfo, publicKey);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static BOOL compare_cert_by_subject_cert(PCCERT_CONTEXT pCertContext,
|
||||
DWORD dwType, DWORD dwFlags, const void *pvPara)
|
||||
{
|
||||
@@ -1271,7 +1043,7 @@ static BOOL compare_cert_by_issuer(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
DWORD dwFlags, const void *pvPara)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
PCCERT_CONTEXT subject = pvPara;
|
||||
PCCERT_CONTEXT subject = (PCCERT_CONTEXT)pvPara;
|
||||
PCERT_EXTENSION ext;
|
||||
DWORD size;
|
||||
|
||||
@@ -1374,7 +1146,7 @@ static BOOL compare_cert_by_issuer(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
static BOOL compare_existing_cert(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
DWORD dwFlags, const void *pvPara)
|
||||
{
|
||||
PCCERT_CONTEXT toCompare = pvPara;
|
||||
PCCERT_CONTEXT toCompare = (PCCERT_CONTEXT)pvPara;
|
||||
return CertCompareCertificate(pCertContext->dwCertEncodingType,
|
||||
pCertContext->pCertInfo, toCompare->pCertInfo);
|
||||
}
|
||||
@@ -1382,7 +1154,7 @@ static BOOL compare_existing_cert(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
static BOOL compare_cert_by_signature_hash(PCCERT_CONTEXT pCertContext, DWORD dwType,
|
||||
DWORD dwFlags, const void *pvPara)
|
||||
{
|
||||
const CRYPT_HASH_BLOB *hash = pvPara;
|
||||
const CRYPT_HASH_BLOB *hash = (const CRYPT_HASH_BLOB *)pvPara;
|
||||
DWORD size = 0;
|
||||
BOOL ret;
|
||||
|
||||
@@ -1429,9 +1201,6 @@ PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore,
|
||||
case CERT_COMPARE_NAME:
|
||||
compare = compare_cert_by_name;
|
||||
break;
|
||||
case CERT_COMPARE_PUBLIC_KEY:
|
||||
compare = compare_cert_by_public_key;
|
||||
break;
|
||||
case CERT_COMPARE_SUBJECT_CERT:
|
||||
compare = compare_cert_by_subject_cert;
|
||||
break;
|
||||
@@ -1817,7 +1586,7 @@ BOOL WINAPI CryptHashToBeSigned(HCRYPTPROV_LEGACY hCryptProv,
|
||||
pbEncoded, cbEncoded, pbComputedHash, *pcbComputedHash);
|
||||
|
||||
ret = CryptDecodeObjectEx(dwCertEncodingType, X509_CERT,
|
||||
pbEncoded, cbEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size);
|
||||
pbEncoded, cbEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL, (void *)&info, &size);
|
||||
if (ret)
|
||||
{
|
||||
PCCRYPT_OID_INFO oidInfo;
|
||||
@@ -2039,7 +1808,7 @@ BOOL WINAPI CryptVerifyCertificateSignatureEx(HCRYPTPROV_LEGACY hCryptProv,
|
||||
{
|
||||
case CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB:
|
||||
{
|
||||
PCRYPT_DATA_BLOB blob = pvSubject;
|
||||
PCRYPT_DATA_BLOB blob = (PCRYPT_DATA_BLOB)pvSubject;
|
||||
|
||||
subjectBlob.pbData = blob->pbData;
|
||||
subjectBlob.cbData = blob->cbData;
|
||||
@@ -2047,7 +1816,7 @@ BOOL WINAPI CryptVerifyCertificateSignatureEx(HCRYPTPROV_LEGACY hCryptProv,
|
||||
}
|
||||
case CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT:
|
||||
{
|
||||
PCERT_CONTEXT context = pvSubject;
|
||||
PCERT_CONTEXT context = (PCERT_CONTEXT)pvSubject;
|
||||
|
||||
subjectBlob.pbData = context->pbCertEncoded;
|
||||
subjectBlob.cbData = context->cbCertEncoded;
|
||||
@@ -2055,7 +1824,7 @@ BOOL WINAPI CryptVerifyCertificateSignatureEx(HCRYPTPROV_LEGACY hCryptProv,
|
||||
}
|
||||
case CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL:
|
||||
{
|
||||
PCRL_CONTEXT context = pvSubject;
|
||||
PCRL_CONTEXT context = (PCRL_CONTEXT)pvSubject;
|
||||
|
||||
subjectBlob.pbData = context->pbCrlEncoded;
|
||||
subjectBlob.cbData = context->cbCrlEncoded;
|
||||
@@ -2074,14 +1843,14 @@ BOOL WINAPI CryptVerifyCertificateSignatureEx(HCRYPTPROV_LEGACY hCryptProv,
|
||||
ret = CryptDecodeObjectEx(dwCertEncodingType, X509_CERT,
|
||||
subjectBlob.pbData, subjectBlob.cbData,
|
||||
CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_NOCOPY_FLAG, NULL,
|
||||
&signedCert, &size);
|
||||
(BYTE *)&signedCert, &size);
|
||||
if (ret)
|
||||
{
|
||||
switch (dwIssuerType)
|
||||
{
|
||||
case CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY:
|
||||
ret = CRYPT_VerifyCertSignatureFromPublicKeyInfo(hCryptProv,
|
||||
dwCertEncodingType, pvIssuer,
|
||||
dwCertEncodingType, (PCERT_PUBLIC_KEY_INFO)pvIssuer,
|
||||
signedCert);
|
||||
break;
|
||||
case CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT:
|
||||
@@ -2689,7 +2458,7 @@ static PCCERT_CONTEXT CRYPT_CreateSignedCert(const CRYPT_DER_BLOB *blob,
|
||||
signedInfo.Signature.cUnusedBits = 0;
|
||||
ret = CryptEncodeObjectEx(X509_ASN_ENCODING, X509_CERT,
|
||||
&signedInfo, CRYPT_ENCODE_ALLOC_FLAG, NULL,
|
||||
&encodedSignedCert, &encodedSignedCertSize);
|
||||
(BYTE *)&encodedSignedCert, &encodedSignedCertSize);
|
||||
if (ret)
|
||||
{
|
||||
context = CertCreateCertificateContext(X509_ASN_ENCODING,
|
||||
@@ -2918,7 +2687,7 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN
|
||||
CRYPT_MakeCertInfo(&info, &serialBlob, pSubjectIssuerBlob,
|
||||
pSignatureAlgorithm, pStartTime, pEndTime, pubKey, pExtensions);
|
||||
ret = CryptEncodeObjectEx(X509_ASN_ENCODING, X509_CERT_TO_BE_SIGNED,
|
||||
&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &blob.pbData,
|
||||
&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&blob.pbData,
|
||||
&blob.cbData);
|
||||
if (ret)
|
||||
{
|
||||
|
@@ -144,7 +144,7 @@ HCERTCHAINENGINE CRYPT_CreateChainEngine(HCERTSTORE root,
|
||||
else
|
||||
engine->CycleDetectionModulus = DEFAULT_CYCLE_MODULUS;
|
||||
}
|
||||
return engine;
|
||||
return (HCERTCHAINENGINE)engine;
|
||||
}
|
||||
|
||||
BOOL WINAPI CertCreateCertificateChainEngine(PCERT_CHAIN_ENGINE_CONFIG pConfig,
|
||||
@@ -383,7 +383,7 @@ static BOOL CRYPT_DecodeBasicConstraints(PCCERT_CONTEXT cert,
|
||||
|
||||
ret = CryptDecodeObjectEx(X509_ASN_ENCODING, szOID_BASIC_CONSTRAINTS,
|
||||
ext->Value.pbData, ext->Value.cbData, CRYPT_DECODE_ALLOC_FLAG,
|
||||
NULL, &info, &size);
|
||||
NULL, (LPBYTE)&info, &size);
|
||||
if (ret)
|
||||
{
|
||||
if (info->SubjectType.cbData == 1)
|
||||
|
@@ -42,7 +42,7 @@ typedef struct _WINE_COLLECTIONSTORE
|
||||
|
||||
static void WINAPI CRYPT_CollectionCloseStore(HCERTSTORE store, DWORD dwFlags)
|
||||
{
|
||||
PWINE_COLLECTIONSTORE cs = store;
|
||||
PWINE_COLLECTIONSTORE cs = (PWINE_COLLECTIONSTORE)store;
|
||||
PWINE_STORE_LIST_ENTRY entry, next;
|
||||
|
||||
TRACE("(%p, %08x)\n", store, dwFlags);
|
||||
@@ -51,12 +51,12 @@ static void WINAPI CRYPT_CollectionCloseStore(HCERTSTORE store, DWORD dwFlags)
|
||||
entry)
|
||||
{
|
||||
TRACE("closing %p\n", entry);
|
||||
CertCloseStore(entry->store, dwFlags);
|
||||
CertCloseStore((HCERTSTORE)entry->store, dwFlags);
|
||||
CryptMemFree(entry);
|
||||
}
|
||||
cs->cs.DebugInfo->Spare[0] = 0;
|
||||
DeleteCriticalSection(&cs->cs);
|
||||
CRYPT_FreeStore(store);
|
||||
CRYPT_FreeStore((PWINECRYPT_CERTSTORE)store);
|
||||
}
|
||||
|
||||
static void *CRYPT_CollectionCreateContextFromChild(PWINE_COLLECTIONSTORE store,
|
||||
@@ -95,7 +95,7 @@ static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store,
|
||||
contextFuncs = (PCONTEXT_FUNCS)((LPBYTE)storeEntry->store +
|
||||
contextFuncsOffset);
|
||||
ret = contextFuncs->addContext(storeEntry->store, context,
|
||||
existingLinked, (const void **)&childContext);
|
||||
existingLinked, childContext);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -205,7 +205,7 @@ static BOOL CRYPT_CollectionAddCert(PWINECRYPT_CERTSTORE store, void *cert,
|
||||
context->hCertStore = store;
|
||||
*ppStoreContext = context;
|
||||
}
|
||||
CertFreeCertificateContext(childContext);
|
||||
CertFreeCertificateContext((PCCERT_CONTEXT)childContext);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ static BOOL CRYPT_CollectionDeleteCert(PWINECRYPT_CERTSTORE store,
|
||||
|
||||
TRACE("(%p, %p)\n", store, pCertContext);
|
||||
|
||||
ret = CertDeleteCertificateFromStore(
|
||||
ret = CertDeleteCertificateFromStore((PCCERT_CONTEXT)
|
||||
Context_GetLinkedContext(pCertContext, sizeof(CERT_CONTEXT)));
|
||||
return ret;
|
||||
}
|
||||
@@ -284,7 +284,7 @@ static BOOL CRYPT_CollectionAddCRL(PWINECRYPT_CERTSTORE store, void *crl,
|
||||
context->hCertStore = store;
|
||||
*ppStoreContext = context;
|
||||
}
|
||||
CertFreeCRLContext(childContext);
|
||||
CertFreeCRLContext((PCCRL_CONTEXT)childContext);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ static BOOL CRYPT_CollectionDeleteCRL(PWINECRYPT_CERTSTORE store,
|
||||
|
||||
TRACE("(%p, %p)\n", store, pCrlContext);
|
||||
|
||||
ret = CertDeleteCRLFromStore(
|
||||
ret = CertDeleteCRLFromStore((PCCRL_CONTEXT)
|
||||
Context_GetLinkedContext(pCrlContext, sizeof(CRL_CONTEXT)));
|
||||
return ret;
|
||||
}
|
||||
@@ -362,7 +362,7 @@ static BOOL CRYPT_CollectionAddCTL(PWINECRYPT_CERTSTORE store, void *ctl,
|
||||
context->hCertStore = store;
|
||||
*ppStoreContext = context;
|
||||
}
|
||||
CertFreeCTLContext(childContext);
|
||||
CertFreeCTLContext((PCCTL_CONTEXT)childContext);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ static BOOL CRYPT_CollectionDeleteCTL(PWINECRYPT_CERTSTORE store,
|
||||
|
||||
TRACE("(%p, %p)\n", store, pCtlContext);
|
||||
|
||||
ret = CertDeleteCTLFromStore(
|
||||
ret = CertDeleteCTLFromStore((PCCTL_CONTEXT)
|
||||
Context_GetLinkedContext(pCtlContext, sizeof(CTL_CONTEXT)));
|
||||
return ret;
|
||||
}
|
||||
@@ -457,8 +457,8 @@ PWINECRYPT_CERTSTORE CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv,
|
||||
BOOL WINAPI CertAddStoreToCollection(HCERTSTORE hCollectionStore,
|
||||
HCERTSTORE hSiblingStore, DWORD dwUpdateFlags, DWORD dwPriority)
|
||||
{
|
||||
PWINE_COLLECTIONSTORE collection = hCollectionStore;
|
||||
WINECRYPT_CERTSTORE *sibling = hSiblingStore;
|
||||
PWINE_COLLECTIONSTORE collection = (PWINE_COLLECTIONSTORE)hCollectionStore;
|
||||
WINECRYPT_CERTSTORE *sibling = (WINECRYPT_CERTSTORE *)hSiblingStore;
|
||||
PWINE_STORE_LIST_ENTRY entry;
|
||||
BOOL ret;
|
||||
|
||||
@@ -525,8 +525,8 @@ BOOL WINAPI CertAddStoreToCollection(HCERTSTORE hCollectionStore,
|
||||
void WINAPI CertRemoveStoreFromCollection(HCERTSTORE hCollectionStore,
|
||||
HCERTSTORE hSiblingStore)
|
||||
{
|
||||
PWINE_COLLECTIONSTORE collection = hCollectionStore;
|
||||
WINECRYPT_CERTSTORE *sibling = hSiblingStore;
|
||||
PWINE_COLLECTIONSTORE collection = (PWINE_COLLECTIONSTORE)hCollectionStore;
|
||||
WINECRYPT_CERTSTORE *sibling = (WINECRYPT_CERTSTORE *)hSiblingStore;
|
||||
PWINE_STORE_LIST_ENTRY store, next;
|
||||
|
||||
TRACE("(%p, %p)\n", hCollectionStore, hSiblingStore);
|
||||
|
@@ -171,8 +171,8 @@ void Context_CopyProperties(const void *to, const void *from,
|
||||
{
|
||||
PCONTEXT_PROPERTY_LIST toProperties, fromProperties;
|
||||
|
||||
toProperties = Context_GetProperties(to, contextSize);
|
||||
fromProperties = Context_GetProperties(from, contextSize);
|
||||
toProperties = Context_GetProperties((void *)to, contextSize);
|
||||
fromProperties = Context_GetProperties((void *)from, contextSize);
|
||||
assert(toProperties && fromProperties);
|
||||
ContextPropertyList_Copy(toProperties, fromProperties);
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ PCCRL_CONTEXT WINAPI CertCreateCRLContext(DWORD dwCertEncodingType,
|
||||
}
|
||||
ret = CryptDecodeObjectEx(dwCertEncodingType, X509_CERT_CRL_TO_BE_SIGNED,
|
||||
pbCrlEncoded, cbCrlEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL,
|
||||
&crlInfo, &size);
|
||||
(BYTE *)&crlInfo, &size);
|
||||
if (ret)
|
||||
{
|
||||
BYTE *data = NULL;
|
||||
@@ -69,7 +69,7 @@ PCCRL_CONTEXT WINAPI CertCreateCRLContext(DWORD dwCertEncodingType,
|
||||
}
|
||||
|
||||
end:
|
||||
return crl;
|
||||
return (PCCRL_CONTEXT)crl;
|
||||
}
|
||||
|
||||
BOOL WINAPI CertAddEncodedCRLToStore(HCERTSTORE hCertStore,
|
||||
@@ -110,7 +110,7 @@ static BOOL compare_crl_issued_by(PCCRL_CONTEXT pCrlContext, DWORD dwType,
|
||||
|
||||
if (pvPara)
|
||||
{
|
||||
PCCERT_CONTEXT issuer = pvPara;
|
||||
PCCERT_CONTEXT issuer = (PCCERT_CONTEXT)pvPara;
|
||||
|
||||
ret = CertCompareCertificateName(issuer->dwCertEncodingType,
|
||||
&issuer->pCertInfo->Issuer, &pCrlContext->pCrlInfo->Issuer);
|
||||
@@ -127,7 +127,7 @@ static BOOL compare_crl_existing(PCCRL_CONTEXT pCrlContext, DWORD dwType,
|
||||
|
||||
if (pvPara)
|
||||
{
|
||||
PCCRL_CONTEXT crl = pvPara;
|
||||
PCCRL_CONTEXT crl = (PCCRL_CONTEXT)pvPara;
|
||||
|
||||
ret = CertCompareCertificateName(pCrlContext->dwCertEncodingType,
|
||||
&pCrlContext->pCrlInfo->Issuer, &crl->pCrlInfo->Issuer);
|
||||
@@ -234,7 +234,7 @@ PCCRL_CONTEXT WINAPI CertDuplicateCRLContext(PCCRL_CONTEXT pCrlContext)
|
||||
|
||||
static void CrlDataContext_Free(void *context)
|
||||
{
|
||||
PCRL_CONTEXT crlContext = context;
|
||||
PCRL_CONTEXT crlContext = (PCRL_CONTEXT)context;
|
||||
|
||||
CryptMemFree(crlContext->pbCrlEncoded);
|
||||
LocalFree(crlContext->pCrlInfo);
|
||||
@@ -254,7 +254,7 @@ DWORD WINAPI CertEnumCRLContextProperties(PCCRL_CONTEXT pCRLContext,
|
||||
DWORD dwPropId)
|
||||
{
|
||||
PCONTEXT_PROPERTY_LIST properties = Context_GetProperties(
|
||||
pCRLContext, sizeof(CRL_CONTEXT));
|
||||
(void *)pCRLContext, sizeof(CRL_CONTEXT));
|
||||
DWORD ret;
|
||||
|
||||
TRACE("(%p, %d)\n", pCRLContext, dwPropId);
|
||||
@@ -428,7 +428,7 @@ static BOOL CRLContext_SetProperty(PCCRL_CONTEXT context, DWORD dwPropId,
|
||||
}
|
||||
case CERT_DATE_STAMP_PROP_ID:
|
||||
ret = ContextPropertyList_SetProperty(properties, dwPropId,
|
||||
pvData, sizeof(FILETIME));
|
||||
(const BYTE *)pvData, sizeof(FILETIME));
|
||||
break;
|
||||
default:
|
||||
FIXME("%d: stub\n", dwPropId);
|
||||
|
@@ -118,7 +118,6 @@
|
||||
@ stub CryptExportPKCS8
|
||||
@ stdcall CryptExportPublicKeyInfo(long long long ptr ptr)
|
||||
@ stdcall CryptExportPublicKeyInfoEx(long long long str long ptr ptr ptr)
|
||||
@ stdcall CryptFindCertificateKeyProvInfo(ptr long ptr)
|
||||
@ stdcall CryptFindLocalizedName(wstr)
|
||||
@ stdcall CryptFindOIDInfo(long ptr long)
|
||||
@ stdcall CryptFormatObject(long long long ptr str ptr long ptr ptr)
|
||||
@@ -217,10 +216,8 @@
|
||||
@ stdcall I_CryptSetTls(long ptr)
|
||||
@ stdcall I_CryptUninstallAsn1Module(long)
|
||||
@ stub I_CryptUninstallOssGlobal
|
||||
@ stdcall PFXExportCertStore(ptr ptr ptr long)
|
||||
@ stdcall PFXExportCertStoreEx(ptr ptr ptr ptr long)
|
||||
@ stdcall PFXImportCertStore(ptr ptr long)
|
||||
@ stdcall PFXIsPFXBlob(ptr)
|
||||
@ stub PFXExportCertStore
|
||||
@ stub PFXImportCertStore
|
||||
@ stub RegCreateHKCUKeyExU
|
||||
@ stub RegCreateKeyExU
|
||||
@ stub RegDeleteValueU
|
||||
|
@@ -171,7 +171,6 @@ STRINGTABLE DISCARDABLE
|
||||
IDS_LOCALIZEDNAME_MY "Personal"
|
||||
IDS_LOCALIZEDNAME_CA "Intermediate Certification Authorities"
|
||||
IDS_LOCALIZEDNAME_ADDRESSBOOK "Other People"
|
||||
IDS_LOCALIZEDNAME_TRUSTEDPUBLISHER "Trusted Publishers"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -171,7 +171,6 @@ STRINGTABLE DISCARDABLE
|
||||
IDS_LOCALIZEDNAME_MY "Persoonlijk"
|
||||
IDS_LOCALIZEDNAME_CA "Certificatie Tussen-Autoriteiten"
|
||||
IDS_LOCALIZEDNAME_ADDRESSBOOK "Overige Personen"
|
||||
IDS_LOCALIZEDNAME_TRUSTEDPUBLISHER "Vertrouwde uitgevers"
|
||||
}
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
|
@@ -164,7 +164,6 @@
|
||||
#define IDS_LOCALIZEDNAME_MY 1142
|
||||
#define IDS_LOCALIZEDNAME_CA 1143
|
||||
#define IDS_LOCALIZEDNAME_ADDRESSBOOK 1144
|
||||
#define IDS_LOCALIZEDNAME_TRUSTEDPUBLISHER 1145
|
||||
|
||||
#define IDS_KEY_ID 1200
|
||||
#define IDS_CERT_ISSUER 1201
|
||||
|
@@ -36,7 +36,7 @@ BOOL WINAPI CertAddCTLContextToStore(HCERTSTORE hCertStore,
|
||||
PCCTL_CONTEXT pCtlContext, DWORD dwAddDisposition,
|
||||
PCCTL_CONTEXT* ppStoreContext)
|
||||
{
|
||||
PWINECRYPT_CERTSTORE store = hCertStore;
|
||||
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore;
|
||||
BOOL ret = TRUE;
|
||||
PCCTL_CONTEXT toAdd = NULL, existing = NULL;
|
||||
|
||||
@@ -161,7 +161,7 @@ BOOL WINAPI CertAddEncodedCTLToStore(HCERTSTORE hCertStore,
|
||||
PCCTL_CONTEXT WINAPI CertEnumCTLsInStore(HCERTSTORE hCertStore,
|
||||
PCCTL_CONTEXT pPrev)
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = hCertStore;
|
||||
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;
|
||||
PCCTL_CONTEXT ret;
|
||||
|
||||
TRACE("(%p, %p)\n", hCertStore, pPrev);
|
||||
@@ -194,7 +194,7 @@ static BOOL compare_ctl_by_md5_hash(PCCTL_CONTEXT pCtlContext, DWORD dwType,
|
||||
&size);
|
||||
if (ret)
|
||||
{
|
||||
const CRYPT_HASH_BLOB *pHash = pvPara;
|
||||
const CRYPT_HASH_BLOB *pHash = (const CRYPT_HASH_BLOB *)pvPara;
|
||||
|
||||
if (size == pHash->cbData)
|
||||
ret = !memcmp(pHash->pbData, hash, size);
|
||||
@@ -215,7 +215,7 @@ static BOOL compare_ctl_by_sha1_hash(PCCTL_CONTEXT pCtlContext, DWORD dwType,
|
||||
&size);
|
||||
if (ret)
|
||||
{
|
||||
const CRYPT_HASH_BLOB *pHash = pvPara;
|
||||
const CRYPT_HASH_BLOB *pHash = (const CRYPT_HASH_BLOB *)pvPara;
|
||||
|
||||
if (size == pHash->cbData)
|
||||
ret = !memcmp(pHash->pbData, hash, size);
|
||||
@@ -232,7 +232,7 @@ static BOOL compare_ctl_existing(PCCTL_CONTEXT pCtlContext, DWORD dwType,
|
||||
|
||||
if (pvPara)
|
||||
{
|
||||
PCCTL_CONTEXT ctl = pvPara;
|
||||
PCCTL_CONTEXT ctl = (PCCTL_CONTEXT)pvPara;
|
||||
|
||||
if (pCtlContext->cbCtlContext == ctl->cbCtlContext)
|
||||
{
|
||||
@@ -315,7 +315,8 @@ BOOL WINAPI CertDeleteCTLFromStore(PCCTL_CONTEXT pCtlContext)
|
||||
}
|
||||
else
|
||||
{
|
||||
PWINECRYPT_CERTSTORE hcs = pCtlContext->hCertStore;
|
||||
PWINECRYPT_CERTSTORE hcs =
|
||||
(PWINECRYPT_CERTSTORE)pCtlContext->hCertStore;
|
||||
|
||||
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
|
||||
ret = FALSE;
|
||||
@@ -399,7 +400,7 @@ PCCTL_CONTEXT WINAPI CertCreateCTLContext(DWORD dwMsgAndCertEncodingType,
|
||||
{
|
||||
ret = CryptDecodeObjectEx(dwMsgAndCertEncodingType, PKCS_CTL,
|
||||
content, contentSize, CRYPT_DECODE_ALLOC_FLAG, NULL,
|
||||
&ctlInfo, &size);
|
||||
(BYTE *)&ctlInfo, &size);
|
||||
if (ret)
|
||||
{
|
||||
ctl = Context_CreateDataContext(sizeof(CTL_CONTEXT));
|
||||
@@ -449,7 +450,7 @@ end:
|
||||
CryptMemFree(content);
|
||||
CryptMsgClose(msg);
|
||||
}
|
||||
return ctl;
|
||||
return (PCCTL_CONTEXT)ctl;
|
||||
}
|
||||
|
||||
PCCTL_CONTEXT WINAPI CertDuplicateCTLContext(PCCTL_CONTEXT pCtlContext)
|
||||
@@ -461,7 +462,7 @@ PCCTL_CONTEXT WINAPI CertDuplicateCTLContext(PCCTL_CONTEXT pCtlContext)
|
||||
|
||||
static void CTLDataContext_Free(void *context)
|
||||
{
|
||||
PCTL_CONTEXT ctlContext = context;
|
||||
PCTL_CONTEXT ctlContext = (PCTL_CONTEXT)context;
|
||||
|
||||
CryptMsgClose(ctlContext->hCryptMsg);
|
||||
CryptMemFree(ctlContext->pbCtlEncoded);
|
||||
@@ -483,7 +484,7 @@ DWORD WINAPI CertEnumCTLContextProperties(PCCTL_CONTEXT pCTLContext,
|
||||
DWORD dwPropId)
|
||||
{
|
||||
PCONTEXT_PROPERTY_LIST properties = Context_GetProperties(
|
||||
pCTLContext, sizeof(CTL_CONTEXT));
|
||||
(void *)pCTLContext, sizeof(CTL_CONTEXT));
|
||||
DWORD ret;
|
||||
|
||||
TRACE("(%p, %d)\n", pCTLContext, dwPropId);
|
||||
@@ -655,7 +656,7 @@ static BOOL CTLContext_SetProperty(PCCTL_CONTEXT context, DWORD dwPropId,
|
||||
}
|
||||
case CERT_DATE_STAMP_PROP_ID:
|
||||
ret = ContextPropertyList_SetProperty(properties, dwPropId,
|
||||
pvData, sizeof(FILETIME));
|
||||
(const BYTE *)pvData, sizeof(FILETIME));
|
||||
break;
|
||||
default:
|
||||
FIXME("%d: stub\n", dwPropId);
|
||||
|
@@ -537,7 +537,7 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[],
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
if (startingPointer)
|
||||
nextData = startingPointer;
|
||||
nextData = (BYTE *)startingPointer;
|
||||
else
|
||||
nextData = (BYTE *)pvStructInfo + structSize;
|
||||
memset(pvStructInfo, 0, structSize);
|
||||
@@ -704,7 +704,7 @@ static BOOL CRYPT_AsnDecodeArray(const struct AsnArrayDescriptor *arrayDesc,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
array = pvStructInfo;
|
||||
array = (struct GenericArray *)pvStructInfo;
|
||||
array->cItems = cItems;
|
||||
if (startingPointer)
|
||||
array->rgItems = startingPointer;
|
||||
@@ -779,7 +779,7 @@ static BOOL CRYPT_AsnDecodeDerBlob(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
blob = pvStructInfo;
|
||||
blob = (CRYPT_DER_BLOB *)pvStructInfo;
|
||||
blob->cbData = 1 + lenBytes + dataLen;
|
||||
if (blob->cbData)
|
||||
{
|
||||
@@ -819,7 +819,7 @@ static BOOL CRYPT_AsnDecodeBitsSwapBytes(const BYTE *pbEncoded,
|
||||
pcbDecoded);
|
||||
if (ret && pvStructInfo)
|
||||
{
|
||||
CRYPT_BIT_BLOB *blob = pvStructInfo;
|
||||
CRYPT_BIT_BLOB *blob = (CRYPT_BIT_BLOB *)pvStructInfo;
|
||||
|
||||
if (blob->cbData)
|
||||
{
|
||||
@@ -985,7 +985,7 @@ static BOOL CRYPT_AsnDecodeCertInfo(DWORD dwCertEncodingType,
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
info = *(CERT_INFO **)pvStructInfo;
|
||||
else
|
||||
info = pvStructInfo;
|
||||
info = (CERT_INFO *)pvStructInfo;
|
||||
if (!info->SerialNumber.cbData || !info->Issuer.cbData ||
|
||||
!info->Subject.cbData)
|
||||
{
|
||||
@@ -1021,7 +1021,7 @@ static BOOL WINAPI CRYPT_AsnDecodeCert(DWORD dwCertEncodingType,
|
||||
|
||||
ret = CRYPT_AsnDecodeCertSignedContent(dwCertEncodingType,
|
||||
X509_CERT, pbEncoded, cbEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL,
|
||||
&signedCert, &size);
|
||||
(BYTE *)&signedCert, &size);
|
||||
if (ret)
|
||||
{
|
||||
size = 0;
|
||||
@@ -1065,7 +1065,7 @@ static BOOL CRYPT_AsnDecodeCRLEntry(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
CRYPT_AsnDecodeExtensionsInternal, sizeof(CERT_EXTENSIONS), TRUE, TRUE,
|
||||
offsetof(CRL_ENTRY, rgExtension), 0 },
|
||||
};
|
||||
PCRL_ENTRY entry = pvStructInfo;
|
||||
PCRL_ENTRY entry = (PCRL_ENTRY)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags, entry,
|
||||
*pcbStructInfo);
|
||||
@@ -1092,7 +1092,7 @@ static BOOL CRYPT_AsnDecodeCRLEntries(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { ASN_SEQUENCEOF,
|
||||
CRYPT_AsnDecodeCRLEntry, sizeof(CRL_ENTRY), TRUE,
|
||||
offsetof(CRL_ENTRY, SerialNumber.pbData) };
|
||||
struct GenericArray *entries = pvStructInfo;
|
||||
struct GenericArray *entries = (struct GenericArray *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo, pcbDecoded);
|
||||
@@ -1161,7 +1161,7 @@ static BOOL WINAPI CRYPT_AsnDecodeCRL(DWORD dwCertEncodingType,
|
||||
|
||||
ret = CRYPT_AsnDecodeCertSignedContent(dwCertEncodingType,
|
||||
X509_CERT, pbEncoded, cbEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL,
|
||||
&signedCrl, &size);
|
||||
(BYTE *)&signedCrl, &size);
|
||||
if (ret)
|
||||
{
|
||||
size = 0;
|
||||
@@ -1331,7 +1331,7 @@ static BOOL CRYPT_AsnDecodeExtension(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
offsetof(CERT_EXTENSION, Value.pbData) },
|
||||
};
|
||||
BOOL ret = TRUE;
|
||||
PCERT_EXTENSION ext = pvStructInfo;
|
||||
PCERT_EXTENSION ext = (PCERT_EXTENSION)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags, ext,
|
||||
*pcbStructInfo);
|
||||
@@ -1356,7 +1356,7 @@ static BOOL CRYPT_AsnDecodeExtensionsInternal(const BYTE *pbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { ASN_SEQUENCEOF,
|
||||
CRYPT_AsnDecodeExtension, sizeof(CERT_EXTENSION), TRUE,
|
||||
offsetof(CERT_EXTENSION, pszObjId) };
|
||||
PCERT_EXTENSIONS exts = pvStructInfo;
|
||||
PCERT_EXTENSIONS exts = (PCERT_EXTENSIONS)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo, pcbDecoded);
|
||||
@@ -1387,7 +1387,7 @@ static BOOL WINAPI CRYPT_AsnDecodeExtensions(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
exts = pvStructInfo;
|
||||
exts = (CERT_EXTENSIONS *)pvStructInfo;
|
||||
exts->rgExtension = (CERT_EXTENSION *)((BYTE *)exts +
|
||||
sizeof(CERT_EXTENSIONS));
|
||||
ret = CRYPT_AsnDecodeExtensionsInternal(pbEncoded, cbEncoded,
|
||||
@@ -1415,7 +1415,7 @@ static BOOL CRYPT_AsnDecodeNameValueInternal(const BYTE *pbEncoded,
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
DWORD dataLen;
|
||||
CERT_NAME_VALUE *value = pvStructInfo;
|
||||
CERT_NAME_VALUE *value = (CERT_NAME_VALUE *)pvStructInfo;
|
||||
|
||||
if ((ret = CRYPT_GetLen(pbEncoded, cbEncoded, &dataLen)))
|
||||
{
|
||||
@@ -1579,7 +1579,7 @@ static BOOL WINAPI CRYPT_AsnDecodeNameValue(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
value = pvStructInfo;
|
||||
value = (CERT_NAME_VALUE *)pvStructInfo;
|
||||
value->Value.pbData = ((BYTE *)value + sizeof(CERT_NAME_VALUE));
|
||||
ret = CRYPT_AsnDecodeNameValueInternal( pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo,
|
||||
@@ -1602,7 +1602,7 @@ static BOOL CRYPT_AsnDecodeUnicodeNameValueInternal(const BYTE *pbEncoded,
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
DWORD dataLen;
|
||||
CERT_NAME_VALUE *value = pvStructInfo;
|
||||
CERT_NAME_VALUE *value = (CERT_NAME_VALUE *)pvStructInfo;
|
||||
|
||||
if ((ret = CRYPT_GetLen(pbEncoded, cbEncoded, &dataLen)))
|
||||
{
|
||||
@@ -1761,7 +1761,7 @@ static BOOL WINAPI CRYPT_AsnDecodeUnicodeNameValue(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
value = pvStructInfo;
|
||||
value = (CERT_NAME_VALUE *)pvStructInfo;
|
||||
value->Value.pbData = ((BYTE *)value + sizeof(CERT_NAME_VALUE));
|
||||
ret = CRYPT_AsnDecodeUnicodeNameValueInternal(pbEncoded,
|
||||
cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo,
|
||||
@@ -1790,7 +1790,7 @@ static BOOL CRYPT_AsnDecodeRdnAttr(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
CRYPT_AsnDecodeNameValueInternal, sizeof(CERT_NAME_VALUE),
|
||||
FALSE, TRUE, offsetof(CERT_RDN_ATTR, Value.pbData), 0 },
|
||||
};
|
||||
CERT_RDN_ATTR *attr = pvStructInfo;
|
||||
CERT_RDN_ATTR *attr = (CERT_RDN_ATTR *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo);
|
||||
@@ -1817,7 +1817,7 @@ static BOOL CRYPT_AsnDecodeRdn(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { ASN_CONSTRUCTOR | ASN_SETOF,
|
||||
CRYPT_AsnDecodeRdnAttr, sizeof(CERT_RDN_ATTR), TRUE,
|
||||
offsetof(CERT_RDN_ATTR, pszObjId) };
|
||||
PCERT_RDN rdn = pvStructInfo;
|
||||
PCERT_RDN rdn = (PCERT_RDN)pvStructInfo;
|
||||
|
||||
ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded, dwFlags,
|
||||
NULL, pvStructInfo, pcbStructInfo, pcbDecoded,
|
||||
@@ -1862,7 +1862,7 @@ static BOOL CRYPT_AsnDecodeUnicodeRdnAttr(const BYTE *pbEncoded,
|
||||
CRYPT_AsnDecodeUnicodeNameValueInternal, sizeof(CERT_NAME_VALUE),
|
||||
FALSE, TRUE, offsetof(CERT_RDN_ATTR, Value.pbData), 0 },
|
||||
};
|
||||
CERT_RDN_ATTR *attr = pvStructInfo;
|
||||
CERT_RDN_ATTR *attr = (CERT_RDN_ATTR *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo);
|
||||
@@ -1889,7 +1889,7 @@ static BOOL CRYPT_AsnDecodeUnicodeRdn(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { ASN_CONSTRUCTOR | ASN_SETOF,
|
||||
CRYPT_AsnDecodeUnicodeRdnAttr, sizeof(CERT_RDN_ATTR), TRUE,
|
||||
offsetof(CERT_RDN_ATTR, pszObjId) };
|
||||
PCERT_RDN rdn = pvStructInfo;
|
||||
PCERT_RDN rdn = (PCERT_RDN)pvStructInfo;
|
||||
|
||||
ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded, dwFlags,
|
||||
NULL, pvStructInfo, pcbStructInfo, pcbDecoded,
|
||||
@@ -2001,7 +2001,7 @@ static BOOL CRYPT_AsnDecodeCopyBytes(const BYTE *pbEncoded,
|
||||
}
|
||||
else
|
||||
{
|
||||
PCRYPT_OBJID_BLOB blob = pvStructInfo;
|
||||
PCRYPT_OBJID_BLOB blob = (PCRYPT_OBJID_BLOB)pvStructInfo;
|
||||
|
||||
*pcbStructInfo = bytesNeeded;
|
||||
blob->cbData = encodedLen;
|
||||
@@ -2030,7 +2030,7 @@ static BOOL CRYPT_DecodeDERArray(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
BOOL ret;
|
||||
struct AsnArrayDescriptor arrayDesc = { 0, CRYPT_AsnDecodeCopyBytes,
|
||||
sizeof(CRYPT_DER_BLOB), TRUE, offsetof(CRYPT_DER_BLOB, pbData) };
|
||||
struct GenericArray *array = pvStructInfo;
|
||||
struct GenericArray *array = (struct GenericArray *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo, pcbDecoded);
|
||||
@@ -2047,7 +2047,7 @@ static BOOL CRYPT_AsnDecodeCTLUsage(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
BOOL ret;
|
||||
struct AsnArrayDescriptor arrayDesc = { ASN_SEQUENCEOF,
|
||||
CRYPT_AsnDecodeOidInternal, sizeof(LPSTR), TRUE, 0 };
|
||||
CTL_USAGE *usage = pvStructInfo;
|
||||
CTL_USAGE *usage = (CTL_USAGE *)pvStructInfo;
|
||||
|
||||
ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded, dwFlags,
|
||||
NULL, pvStructInfo, pcbStructInfo, pcbDecoded,
|
||||
@@ -2067,7 +2067,7 @@ static BOOL CRYPT_AsnDecodeCTLEntry(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
TRUE, offsetof(CTL_ENTRY, rgAttribute), 0 },
|
||||
};
|
||||
BOOL ret = TRUE;
|
||||
CTL_ENTRY *entry = pvStructInfo;
|
||||
CTL_ENTRY *entry = (CTL_ENTRY *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags, entry,
|
||||
*pcbStructInfo);
|
||||
@@ -2085,7 +2085,7 @@ static BOOL CRYPT_AsnDecodeCTLEntries(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { ASN_SEQUENCEOF,
|
||||
CRYPT_AsnDecodeCTLEntry, sizeof(CTL_ENTRY), TRUE,
|
||||
offsetof(CTL_ENTRY, SubjectIdentifier.pbData) };
|
||||
struct GenericArray *entries = pvStructInfo;
|
||||
struct GenericArray *entries = (struct GenericArray *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo, pcbDecoded);
|
||||
@@ -2164,7 +2164,7 @@ static BOOL CRYPT_AsnDecodeSMIMECapability(const BYTE *pbEncoded,
|
||||
CRYPT_AsnDecodeCopyBytes, sizeof(CRYPT_OBJID_BLOB), TRUE, TRUE,
|
||||
offsetof(CRYPT_SMIME_CAPABILITY, Parameters.pbData), 0 },
|
||||
};
|
||||
PCRYPT_SMIME_CAPABILITY capability = pvStructInfo;
|
||||
PCRYPT_SMIME_CAPABILITY capability = (PCRYPT_SMIME_CAPABILITY)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo);
|
||||
@@ -2183,7 +2183,8 @@ static BOOL CRYPT_AsnDecodeSMIMECapabilitiesInternal(const BYTE *pbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { 0,
|
||||
CRYPT_AsnDecodeSMIMECapability, sizeof(CRYPT_SMIME_CAPABILITY), TRUE,
|
||||
offsetof(CRYPT_SMIME_CAPABILITY, pszObjId) };
|
||||
PCRYPT_SMIME_CAPABILITIES capabilities = pvStructInfo;
|
||||
PCRYPT_SMIME_CAPABILITIES capabilities =
|
||||
(PCRYPT_SMIME_CAPABILITIES)pvStructInfo;
|
||||
BOOL ret;
|
||||
|
||||
ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded, dwFlags,
|
||||
@@ -2222,7 +2223,7 @@ static BOOL WINAPI CRYPT_AsnDecodeSMIMECapabilities(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
capabilities = pvStructInfo;
|
||||
capabilities = (PCRYPT_SMIME_CAPABILITIES)pvStructInfo;
|
||||
capabilities->rgCapability =
|
||||
(PCRYPT_SMIME_CAPABILITY)((BYTE *)pvStructInfo +
|
||||
sizeof(CRYPT_SMIME_CAPABILITIES));
|
||||
@@ -2590,7 +2591,7 @@ static BOOL CRYPT_AsnDecodePKCSAttributeInternal(const BYTE *pbEncoded,
|
||||
CRYPT_DecodeDERArray, sizeof(struct GenericArray), FALSE, TRUE,
|
||||
offsetof(CRYPT_ATTRIBUTE, rgValue), 0 },
|
||||
};
|
||||
PCRYPT_ATTRIBUTE attr = pvStructInfo;
|
||||
PCRYPT_ATTRIBUTE attr = (PCRYPT_ATTRIBUTE)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo);
|
||||
@@ -2628,7 +2629,7 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSAttribute(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
attr = pvStructInfo;
|
||||
attr = (PCRYPT_ATTRIBUTE)pvStructInfo;
|
||||
attr->pszObjId = (LPSTR)((BYTE *)pvStructInfo +
|
||||
sizeof(CRYPT_ATTRIBUTE));
|
||||
ret = CRYPT_AsnDecodePKCSAttributeInternal(pbEncoded, cbEncoded,
|
||||
@@ -2653,7 +2654,7 @@ static BOOL CRYPT_AsnDecodePKCSAttributesInternal(const BYTE *pbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { 0,
|
||||
CRYPT_AsnDecodePKCSAttributeInternal, sizeof(CRYPT_ATTRIBUTE), TRUE,
|
||||
offsetof(CRYPT_ATTRIBUTE, pszObjId) };
|
||||
PCRYPT_ATTRIBUTES attrs = pvStructInfo;
|
||||
PCRYPT_ATTRIBUTES attrs = (PCRYPT_ATTRIBUTES)pvStructInfo;
|
||||
BOOL ret;
|
||||
|
||||
ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded, dwFlags,
|
||||
@@ -2692,7 +2693,7 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSAttributes(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
attrs = pvStructInfo;
|
||||
attrs = (PCRYPT_ATTRIBUTES)pvStructInfo;
|
||||
attrs->rgAttr = (PCRYPT_ATTRIBUTE)((BYTE *)pvStructInfo +
|
||||
sizeof(CRYPT_ATTRIBUTES));
|
||||
ret = CRYPT_AsnDecodePKCSAttributesInternal(pbEncoded,
|
||||
@@ -2713,7 +2714,8 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSAttributes(DWORD dwCertEncodingType,
|
||||
static BOOL CRYPT_AsnDecodeAlgorithmId(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo, DWORD *pcbDecoded)
|
||||
{
|
||||
CRYPT_ALGORITHM_IDENTIFIER *algo = pvStructInfo;
|
||||
CRYPT_ALGORITHM_IDENTIFIER *algo =
|
||||
(CRYPT_ALGORITHM_IDENTIFIER *)pvStructInfo;
|
||||
BOOL ret = TRUE;
|
||||
struct AsnDecodeSequenceItem items[] = {
|
||||
{ ASN_OBJECTIDENTIFIER, offsetof(CRYPT_ALGORITHM_IDENTIFIER, pszObjId),
|
||||
@@ -2752,7 +2754,7 @@ static BOOL CRYPT_AsnDecodePubKeyInfoInternal(const BYTE *pbEncoded,
|
||||
CRYPT_AsnDecodeBitsInternal, sizeof(CRYPT_BIT_BLOB), FALSE, TRUE,
|
||||
offsetof(CERT_PUBLIC_KEY_INFO, PublicKey.pbData) },
|
||||
};
|
||||
PCERT_PUBLIC_KEY_INFO info = pvStructInfo;
|
||||
PCERT_PUBLIC_KEY_INFO info = (PCERT_PUBLIC_KEY_INFO)pvStructInfo;
|
||||
|
||||
ret = CRYPT_AsnDecodeSequence(items, sizeof(items) / sizeof(items[0]),
|
||||
pbEncoded, cbEncoded, dwFlags, NULL, pvStructInfo, pcbStructInfo,
|
||||
@@ -2782,7 +2784,7 @@ static BOOL WINAPI CRYPT_AsnDecodePubKeyInfo(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
info = pvStructInfo;
|
||||
info = (PCERT_PUBLIC_KEY_INFO)pvStructInfo;
|
||||
info->Algorithm.Parameters.pbData = (BYTE *)pvStructInfo +
|
||||
sizeof(CERT_PUBLIC_KEY_INFO);
|
||||
ret = CRYPT_AsnDecodePubKeyInfoInternal(pbEncoded, cbEncoded,
|
||||
@@ -2846,7 +2848,7 @@ static BOOL CRYPT_AsnDecodeBool(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
static BOOL CRYPT_AsnDecodeAltNameEntry(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo, DWORD *pcbDecoded)
|
||||
{
|
||||
PCERT_ALT_NAME_ENTRY entry = pvStructInfo;
|
||||
PCERT_ALT_NAME_ENTRY entry = (PCERT_ALT_NAME_ENTRY)pvStructInfo;
|
||||
DWORD dataLen, lenBytes, bytesNeeded = sizeof(CERT_ALT_NAME_ENTRY);
|
||||
BOOL ret;
|
||||
|
||||
@@ -2969,7 +2971,7 @@ static BOOL CRYPT_AsnDecodeAltNameInternal(const BYTE *pbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { 0,
|
||||
CRYPT_AsnDecodeAltNameEntry, sizeof(CERT_ALT_NAME_ENTRY), TRUE,
|
||||
offsetof(CERT_ALT_NAME_ENTRY, u.pwszURL) };
|
||||
PCERT_ALT_NAME_INFO info = pvStructInfo;
|
||||
PCERT_ALT_NAME_INFO info = (PCERT_ALT_NAME_INFO)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo, pcbDecoded);
|
||||
@@ -3000,7 +3002,7 @@ static BOOL CRYPT_AsnDecodeIntegerSwapBytes(const BYTE *pbEncoded,
|
||||
pcbDecoded);
|
||||
if (ret && pvStructInfo)
|
||||
{
|
||||
CRYPT_DATA_BLOB *blob = pvStructInfo;
|
||||
CRYPT_DATA_BLOB *blob = (CRYPT_DATA_BLOB *)pvStructInfo;
|
||||
|
||||
if (blob->cbData)
|
||||
{
|
||||
@@ -3103,7 +3105,7 @@ static BOOL CRYPT_AsnDecodeAccessDescription(const BYTE *pbEncoded,
|
||||
CRYPT_AsnDecodeAltNameEntry, sizeof(CERT_ALT_NAME_ENTRY), FALSE,
|
||||
TRUE, offsetof(CERT_ACCESS_DESCRIPTION, AccessLocation.u.pwszURL), 0 },
|
||||
};
|
||||
CERT_ACCESS_DESCRIPTION *descr = pvStructInfo;
|
||||
CERT_ACCESS_DESCRIPTION *descr = (CERT_ACCESS_DESCRIPTION *)pvStructInfo;
|
||||
|
||||
return CRYPT_AsnDecodeSequence(items, sizeof(items) / sizeof(items[0]),
|
||||
pbEncoded, cbEncoded, dwFlags, NULL, pvStructInfo, pcbStructInfo,
|
||||
@@ -3193,7 +3195,7 @@ static BOOL CRYPT_AsnDecodePKCSContentInfoInternal(const BYTE *pbEncoded,
|
||||
DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo,
|
||||
DWORD *pcbDecoded)
|
||||
{
|
||||
CRYPT_CONTENT_INFO *info = pvStructInfo;
|
||||
CRYPT_CONTENT_INFO *info = (CRYPT_CONTENT_INFO *)pvStructInfo;
|
||||
struct AsnDecodeSequenceItem items[] = {
|
||||
{ ASN_OBJECTIDENTIFIER, offsetof(CRYPT_CONTENT_INFO, pszObjId),
|
||||
CRYPT_AsnDecodeOidIgnoreTag, sizeof(LPSTR), FALSE, TRUE,
|
||||
@@ -3237,7 +3239,7 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSContentInfo(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
info = pvStructInfo;
|
||||
info = (CRYPT_CONTENT_INFO *)pvStructInfo;
|
||||
info->pszObjId = (LPSTR)((BYTE *)info +
|
||||
sizeof(CRYPT_CONTENT_INFO));
|
||||
ret = CRYPT_AsnDecodePKCSContentInfoInternal(pbEncoded,
|
||||
@@ -3306,7 +3308,7 @@ static BOOL WINAPI CRYPT_AsnDecodeAltName(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
name = pvStructInfo;
|
||||
name = (CERT_ALT_NAME_INFO *)pvStructInfo;
|
||||
name->rgAltEntry = (PCERT_ALT_NAME_ENTRY)
|
||||
((BYTE *)pvStructInfo + sizeof(CERT_ALT_NAME_INFO));
|
||||
ret = CRYPT_AsnDecodeAltNameInternal(pbEncoded, cbEncoded,
|
||||
@@ -3354,7 +3356,8 @@ static BOOL CRYPT_AsnDecodePathLenConstraint(const BYTE *pbEncoded,
|
||||
}
|
||||
else
|
||||
{
|
||||
struct PATH_LEN_CONSTRAINT *constraint = pvStructInfo;
|
||||
struct PATH_LEN_CONSTRAINT *constraint =
|
||||
(struct PATH_LEN_CONSTRAINT *)pvStructInfo;
|
||||
|
||||
*pcbStructInfo = bytesNeeded;
|
||||
size = sizeof(constraint->dwPathLenConstraint);
|
||||
@@ -3377,7 +3380,7 @@ static BOOL CRYPT_AsnDecodeSubtreeConstraints(const BYTE *pbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { ASN_SEQUENCEOF,
|
||||
CRYPT_AsnDecodeCopyBytes, sizeof(CERT_NAME_BLOB), TRUE,
|
||||
offsetof(CERT_NAME_BLOB, pbData) };
|
||||
struct GenericArray *entries = pvStructInfo;
|
||||
struct GenericArray *entries = (struct GenericArray *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo, pcbDecoded);
|
||||
@@ -3594,7 +3597,7 @@ static BOOL WINAPI CRYPT_AsnDecodeRsaPubKey(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
hdr = pvStructInfo;
|
||||
hdr = (BLOBHEADER *)pvStructInfo;
|
||||
hdr->bType = PUBLICKEYBLOB;
|
||||
hdr->bVersion = CUR_BLOB_VERSION;
|
||||
hdr->reserved = 0;
|
||||
@@ -3653,7 +3656,7 @@ static BOOL CRYPT_AsnDecodeOctetsInternal(const BYTE *pbEncoded,
|
||||
CRYPT_DATA_BLOB *blob;
|
||||
|
||||
*pcbStructInfo = bytesNeeded;
|
||||
blob = pvStructInfo;
|
||||
blob = (CRYPT_DATA_BLOB *)pvStructInfo;
|
||||
blob->cbData = dataLen;
|
||||
if (dwFlags & CRYPT_DECODE_NOCOPY_FLAG)
|
||||
blob->pbData = (BYTE *)pbEncoded + 1 + lenBytes;
|
||||
@@ -3704,7 +3707,7 @@ static BOOL WINAPI CRYPT_AsnDecodeOctets(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
blob = pvStructInfo;
|
||||
blob = (CRYPT_DATA_BLOB *)pvStructInfo;
|
||||
blob->pbData = (BYTE *)pvStructInfo + sizeof(CRYPT_DATA_BLOB);
|
||||
ret = CRYPT_AsnDecodeOctetsInternal(pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo,
|
||||
@@ -3752,7 +3755,7 @@ static BOOL CRYPT_AsnDecodeBitsInternal(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
CRYPT_BIT_BLOB *blob;
|
||||
|
||||
*pcbStructInfo = bytesNeeded;
|
||||
blob = pvStructInfo;
|
||||
blob = (CRYPT_BIT_BLOB *)pvStructInfo;
|
||||
blob->cbData = dataLen - 1;
|
||||
blob->cUnusedBits = *(pbEncoded + 1 + lenBytes);
|
||||
if (dwFlags & CRYPT_DECODE_NOCOPY_FLAG)
|
||||
@@ -3811,7 +3814,7 @@ static BOOL WINAPI CRYPT_AsnDecodeBits(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
blob = pvStructInfo;
|
||||
blob = (CRYPT_BIT_BLOB *)pvStructInfo;
|
||||
blob->pbData = (BYTE *)pvStructInfo + sizeof(CRYPT_BIT_BLOB);
|
||||
ret = CRYPT_AsnDecodeBitsInternal(pbEncoded, cbEncoded,
|
||||
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, pvStructInfo,
|
||||
@@ -3940,7 +3943,7 @@ static BOOL CRYPT_AsnDecodeIntegerInternal(const BYTE *pbEncoded,
|
||||
}
|
||||
else
|
||||
{
|
||||
CRYPT_INTEGER_BLOB *blob = pvStructInfo;
|
||||
CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)pvStructInfo;
|
||||
|
||||
*pcbStructInfo = bytesNeeded;
|
||||
blob->cbData = dataLen;
|
||||
@@ -3989,7 +3992,7 @@ static BOOL WINAPI CRYPT_AsnDecodeInteger(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
blob = pvStructInfo;
|
||||
blob = (CRYPT_INTEGER_BLOB *)pvStructInfo;
|
||||
blob->pbData = (BYTE *)pvStructInfo +
|
||||
sizeof(CRYPT_INTEGER_BLOB);
|
||||
ret = CRYPT_AsnDecodeIntegerInternal(pbEncoded, cbEncoded,
|
||||
@@ -4034,7 +4037,7 @@ static BOOL CRYPT_AsnDecodeUnsignedIntegerInternal(const BYTE *pbEncoded,
|
||||
}
|
||||
else
|
||||
{
|
||||
CRYPT_INTEGER_BLOB *blob = pvStructInfo;
|
||||
CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)pvStructInfo;
|
||||
|
||||
*pcbStructInfo = bytesNeeded;
|
||||
blob->cbData = dataLen;
|
||||
@@ -4088,7 +4091,7 @@ static BOOL WINAPI CRYPT_AsnDecodeUnsignedInteger(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
blob = pvStructInfo;
|
||||
blob = (CRYPT_INTEGER_BLOB *)pvStructInfo;
|
||||
blob->pbData = (BYTE *)pvStructInfo +
|
||||
sizeof(CRYPT_INTEGER_BLOB);
|
||||
ret = CRYPT_AsnDecodeUnsignedIntegerInternal(pbEncoded,
|
||||
@@ -4310,7 +4313,8 @@ static BOOL CRYPT_AsnDecodeUtcTimeInternal(const BYTE *pbEncoded,
|
||||
*pcbStructInfo = sizeof(FILETIME);
|
||||
else if ((ret = CRYPT_DecodeCheckSpace(pcbStructInfo,
|
||||
sizeof(FILETIME))))
|
||||
ret = SystemTimeToFileTime(&sysTime, pvStructInfo);
|
||||
ret = SystemTimeToFileTime(&sysTime,
|
||||
(FILETIME *)pvStructInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4417,7 +4421,8 @@ static BOOL CRYPT_AsnDecodeGeneralizedTime(const BYTE *pbEncoded,
|
||||
*pcbStructInfo = sizeof(FILETIME);
|
||||
else if ((ret = CRYPT_DecodeCheckSpace(pcbStructInfo,
|
||||
sizeof(FILETIME))))
|
||||
ret = SystemTimeToFileTime(&sysTime, pvStructInfo);
|
||||
ret = SystemTimeToFileTime(&sysTime,
|
||||
(FILETIME *)pvStructInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4537,7 +4542,7 @@ static BOOL WINAPI CRYPT_AsnDecodeSequenceOfAny(DWORD dwCertEncodingType,
|
||||
{
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
seq = pvStructInfo;
|
||||
seq = (CRYPT_SEQUENCE_OF_ANY *)pvStructInfo;
|
||||
seq->cValue = cValue;
|
||||
seq->rgValue = (CRYPT_DER_BLOB *)((BYTE *)seq +
|
||||
sizeof(*seq));
|
||||
@@ -4635,7 +4640,7 @@ static BOOL CRYPT_AsnDecodeDistPointName(const BYTE *pbEncoded,
|
||||
}
|
||||
else
|
||||
{
|
||||
CRL_DIST_POINT_NAME *name = pvStructInfo;
|
||||
CRL_DIST_POINT_NAME *name = (CRL_DIST_POINT_NAME *)pvStructInfo;
|
||||
|
||||
*pcbStructInfo = bytesNeeded;
|
||||
if (dataLen)
|
||||
@@ -4674,7 +4679,7 @@ static BOOL CRYPT_AsnDecodeDistPoint(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
CRYPT_AsnDecodeAltNameInternal, sizeof(CERT_ALT_NAME_INFO), TRUE, TRUE,
|
||||
offsetof(CRL_DIST_POINT, CRLIssuer.rgAltEntry), 0 },
|
||||
};
|
||||
CRL_DIST_POINT *point = pvStructInfo;
|
||||
CRL_DIST_POINT *point = (CRL_DIST_POINT *)pvStructInfo;
|
||||
BOOL ret;
|
||||
|
||||
ret = CRYPT_AsnDecodeSequence(items, sizeof(items) / sizeof(items[0]),
|
||||
@@ -4824,14 +4829,14 @@ static BOOL CRYPT_AsnDecodeSubtree(const BYTE *pbEncoded,
|
||||
CRYPT_AsnDecodeMaximum, sizeof(BOOL) + sizeof(DWORD), TRUE, FALSE, 0,
|
||||
0 },
|
||||
};
|
||||
CERT_GENERAL_SUBTREE *subtree = pvStructInfo;
|
||||
CERT_GENERAL_SUBTREE *subtree = (CERT_GENERAL_SUBTREE *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo, pcbDecoded);
|
||||
|
||||
ret = CRYPT_AsnDecodeSequence(items, sizeof(items) / sizeof(items[0]),
|
||||
pbEncoded, cbEncoded, dwFlags, NULL, pvStructInfo, pcbStructInfo,
|
||||
pcbDecoded, subtree ? subtree->Base.u.pwszURL : NULL);
|
||||
pcbDecoded, subtree ? (BYTE *)subtree->Base.u.pwszURL : NULL);
|
||||
if (pcbDecoded)
|
||||
{
|
||||
TRACE("%d\n", *pcbDecoded);
|
||||
@@ -4851,7 +4856,7 @@ static BOOL CRYPT_AsnDecodeSubtreeArray(const BYTE *pbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { 0,
|
||||
CRYPT_AsnDecodeSubtree, sizeof(CERT_GENERAL_SUBTREE), TRUE,
|
||||
offsetof(CERT_GENERAL_SUBTREE, Base.u.pwszURL) };
|
||||
struct GenericArray *array = pvStructInfo;
|
||||
struct GenericArray *array = (struct GenericArray *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo, pcbDecoded);
|
||||
@@ -4910,7 +4915,8 @@ static BOOL CRYPT_AsnDecodeIssuerSerialNumber(const BYTE *pbEncoded,
|
||||
CRYPT_AsnDecodeIntegerInternal, sizeof(CRYPT_INTEGER_BLOB), FALSE,
|
||||
TRUE, offsetof(CERT_ISSUER_SERIAL_NUMBER, SerialNumber.pbData), 0 },
|
||||
};
|
||||
CERT_ISSUER_SERIAL_NUMBER *issuerSerial = pvStructInfo;
|
||||
CERT_ISSUER_SERIAL_NUMBER *issuerSerial =
|
||||
(CERT_ISSUER_SERIAL_NUMBER *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo, pcbDecoded);
|
||||
@@ -4931,7 +4937,7 @@ static BOOL CRYPT_AsnDecodePKCSSignerInfoInternal(const BYTE *pbEncoded,
|
||||
DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo,
|
||||
DWORD *pcbDecoded)
|
||||
{
|
||||
CMSG_SIGNER_INFO *info = pvStructInfo;
|
||||
CMSG_SIGNER_INFO *info = (CMSG_SIGNER_INFO *)pvStructInfo;
|
||||
struct AsnDecodeSequenceItem items[] = {
|
||||
{ ASN_INTEGER, offsetof(CMSG_SIGNER_INFO, dwVersion),
|
||||
CRYPT_AsnDecodeIntInternal, sizeof(DWORD), FALSE, FALSE, 0, 0 },
|
||||
@@ -4991,7 +4997,7 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSSignerInfo(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
info = pvStructInfo;
|
||||
info = (CMSG_SIGNER_INFO *)pvStructInfo;
|
||||
info->Issuer.pbData = ((BYTE *)info +
|
||||
sizeof(CMSG_SIGNER_INFO));
|
||||
ret = CRYPT_AsnDecodePKCSSignerInfoInternal(pbEncoded,
|
||||
@@ -5013,7 +5019,7 @@ static BOOL CRYPT_AsnDecodeCMSSignerId(const BYTE *pbEncoded,
|
||||
DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo,
|
||||
DWORD *pcbDecoded)
|
||||
{
|
||||
CERT_ID *id = pvStructInfo;
|
||||
CERT_ID *id = (CERT_ID *)pvStructInfo;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
if (*pbEncoded == ASN_SEQUENCEOF)
|
||||
@@ -5055,7 +5061,7 @@ static BOOL CRYPT_AsnDecodeCMSSignerInfoInternal(const BYTE *pbEncoded,
|
||||
DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo,
|
||||
DWORD *pcbDecoded)
|
||||
{
|
||||
CMSG_CMS_SIGNER_INFO *info = pvStructInfo;
|
||||
CMSG_CMS_SIGNER_INFO *info = (CMSG_CMS_SIGNER_INFO *)pvStructInfo;
|
||||
struct AsnDecodeSequenceItem items[] = {
|
||||
{ ASN_INTEGER, offsetof(CMSG_CMS_SIGNER_INFO, dwVersion),
|
||||
CRYPT_AsnDecodeIntInternal, sizeof(DWORD), FALSE, FALSE, 0, 0 },
|
||||
@@ -5115,7 +5121,7 @@ static BOOL WINAPI CRYPT_AsnDecodeCMSSignerInfo(DWORD dwCertEncodingType,
|
||||
|
||||
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)
|
||||
pvStructInfo = *(BYTE **)pvStructInfo;
|
||||
info = pvStructInfo;
|
||||
info = (CMSG_CMS_SIGNER_INFO *)pvStructInfo;
|
||||
info->SignerId.u.KeyId.pbData = ((BYTE *)info +
|
||||
sizeof(CMSG_CMS_SIGNER_INFO));
|
||||
ret = CRYPT_AsnDecodeCMSSignerInfoInternal(pbEncoded,
|
||||
@@ -5140,7 +5146,7 @@ static BOOL CRYPT_DecodeSignerArray(const BYTE *pbEncoded, DWORD cbEncoded,
|
||||
struct AsnArrayDescriptor arrayDesc = { ASN_CONSTRUCTOR | ASN_SETOF,
|
||||
CRYPT_AsnDecodeCMSSignerInfoInternal, sizeof(CMSG_CMS_SIGNER_INFO), TRUE,
|
||||
offsetof(CMSG_CMS_SIGNER_INFO, SignerId.u.KeyId.pbData) };
|
||||
struct GenericArray *array = pvStructInfo;
|
||||
struct GenericArray *array = (struct GenericArray *)pvStructInfo;
|
||||
|
||||
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,
|
||||
pvStructInfo, *pcbStructInfo, pcbDecoded);
|
||||
@@ -5511,45 +5517,3 @@ BOOL WINAPI CryptDecodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
|
||||
TRACE_(crypt)("returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL WINAPI PFXIsPFXBlob(CRYPT_DATA_BLOB *pPFX)
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
TRACE_(crypt)("(%p)\n", pPFX);
|
||||
|
||||
/* A PFX blob is an asn.1-encoded sequence, consisting of at least a
|
||||
* version integer of length 1 (3 encoded byes) and at least one other
|
||||
* datum (two encoded bytes), plus at least two bytes for the outer
|
||||
* sequence. Thus, even an empty PFX blob is at least 7 bytes in length.
|
||||
*/
|
||||
if (pPFX->cbData < 7)
|
||||
ret = FALSE;
|
||||
else if (pPFX->pbData[0] == ASN_SEQUENCE)
|
||||
{
|
||||
DWORD len;
|
||||
|
||||
if ((ret = CRYPT_GetLengthIndefinite(pPFX->pbData, pPFX->cbData, &len)))
|
||||
{
|
||||
BYTE lenLen = GET_LEN_BYTES(pPFX->pbData[1]);
|
||||
|
||||
/* Need at least three bytes for the integer version */
|
||||
if (pPFX->cbData < 1 + lenLen + 3)
|
||||
ret = FALSE;
|
||||
else if (pPFX->pbData[1 + lenLen] != ASN_INTEGER || /* Tag */
|
||||
pPFX->pbData[1 + lenLen + 1] != 1 || /* Definite length */
|
||||
pPFX->pbData[1 + lenLen + 2] != 3) /* PFX version */
|
||||
ret = FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
ret = FALSE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
HCERTSTORE WINAPI PFXImportCertStore(CRYPT_DATA_BLOB *pPFX, LPCWSTR szPassword,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME_(crypt)("(%p, %p, %08x): stub\n", pPFX, szPassword, dwFlags);
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -228,7 +228,8 @@ BOOL WINAPI CRYPT_AsnEncodeConstructed(DWORD dwCertEncodingType,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
BOOL ret;
|
||||
const struct AsnConstructedItem *item = pvStructInfo;
|
||||
const struct AsnConstructedItem *item =
|
||||
(const struct AsnConstructedItem *)pvStructInfo;
|
||||
DWORD len;
|
||||
|
||||
if ((ret = item->encodeFunc(dwCertEncodingType, lpszStructType,
|
||||
@@ -282,7 +283,8 @@ static BOOL WINAPI CRYPT_AsnEncodeSwapTag(DWORD dwCertEncodingType,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
BOOL ret;
|
||||
const struct AsnEncodeTagSwappedItem *item = pvStructInfo;
|
||||
const struct AsnEncodeTagSwappedItem *item =
|
||||
(const struct AsnEncodeTagSwappedItem *)pvStructInfo;
|
||||
|
||||
ret = item->encodeFunc(dwCertEncodingType, lpszStructType,
|
||||
item->pvStructInfo, dwFlags, pEncodePara, pbEncoded, pcbEncoded);
|
||||
@@ -295,7 +297,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCertVersion(DWORD dwCertEncodingType,
|
||||
LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
const DWORD *ver = pvStructInfo;
|
||||
const DWORD *ver = (const DWORD *)pvStructInfo;
|
||||
BOOL ret;
|
||||
|
||||
/* CERT_V1 is not encoded */
|
||||
@@ -318,7 +320,7 @@ static BOOL WINAPI CRYPT_CopyEncodedBlob(DWORD dwCertEncodingType,
|
||||
LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
const CRYPT_DER_BLOB *blob = pvStructInfo;
|
||||
const CRYPT_DER_BLOB *blob = (const CRYPT_DER_BLOB *)pvStructInfo;
|
||||
BOOL ret;
|
||||
|
||||
if (!pbEncoded)
|
||||
@@ -348,7 +350,7 @@ static BOOL WINAPI CRYPT_AsnEncodeValidity(DWORD dwCertEncodingType,
|
||||
{
|
||||
BOOL ret;
|
||||
/* This has two filetimes in a row, a NotBefore and a NotAfter */
|
||||
const FILETIME *timePtr = pvStructInfo;
|
||||
const FILETIME *timePtr = (const FILETIME *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[] = {
|
||||
{ timePtr, CRYPT_AsnEncodeChoiceOfTime, 0 },
|
||||
{ timePtr + 1, CRYPT_AsnEncodeChoiceOfTime, 0 },
|
||||
@@ -368,7 +370,8 @@ static BOOL WINAPI CRYPT_AsnEncodeAlgorithmIdWithNullParams(
|
||||
DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded,
|
||||
DWORD *pcbEncoded)
|
||||
{
|
||||
const CRYPT_ALGORITHM_IDENTIFIER *algo = pvStructInfo;
|
||||
const CRYPT_ALGORITHM_IDENTIFIER *algo =
|
||||
(const CRYPT_ALGORITHM_IDENTIFIER *)pvStructInfo;
|
||||
static const BYTE asn1Null[] = { ASN_NULL, 0 };
|
||||
static const CRYPT_DATA_BLOB nullBlob = { sizeof(asn1Null),
|
||||
(LPBYTE)asn1Null };
|
||||
@@ -392,7 +395,8 @@ static BOOL WINAPI CRYPT_AsnEncodeAlgorithmId(DWORD dwCertEncodingType,
|
||||
LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
const CRYPT_ALGORITHM_IDENTIFIER *algo = pvStructInfo;
|
||||
const CRYPT_ALGORITHM_IDENTIFIER *algo =
|
||||
(const CRYPT_ALGORITHM_IDENTIFIER *)pvStructInfo;
|
||||
BOOL ret;
|
||||
struct AsnEncodeSequenceItem items[] = {
|
||||
{ algo->pszObjId, CRYPT_AsnEncodeOid, 0 },
|
||||
@@ -413,7 +417,8 @@ static BOOL WINAPI CRYPT_AsnEncodePubKeyInfo(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_PUBLIC_KEY_INFO *info = pvStructInfo;
|
||||
const CERT_PUBLIC_KEY_INFO *info =
|
||||
(const CERT_PUBLIC_KEY_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[] = {
|
||||
{ &info->Algorithm, CRYPT_AsnEncodeAlgorithmId, 0 },
|
||||
{ &info->PublicKey, CRYPT_AsnEncodeBits, 0 },
|
||||
@@ -442,7 +447,8 @@ static BOOL WINAPI CRYPT_AsnEncodeCert(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_SIGNED_CONTENT_INFO *info = pvStructInfo;
|
||||
const CERT_SIGNED_CONTENT_INFO *info =
|
||||
(const CERT_SIGNED_CONTENT_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[] = {
|
||||
{ &info->ToBeSigned, CRYPT_CopyEncodedBlob, 0 },
|
||||
{ &info->SignatureAlgorithm, CRYPT_AsnEncodeAlgorithmId, 0 },
|
||||
@@ -476,7 +482,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCertInfo(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_INFO *info = pvStructInfo;
|
||||
const CERT_INFO *info = (const CERT_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[10] = {
|
||||
{ &info->dwVersion, CRYPT_AsnEncodeCertVersion, 0 },
|
||||
{ &info->SerialNumber, CRYPT_AsnEncodeInteger, 0 },
|
||||
@@ -613,7 +619,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCRLVersion(DWORD dwCertEncodingType,
|
||||
LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
const DWORD *ver = pvStructInfo;
|
||||
const DWORD *ver = (const DWORD *)pvStructInfo;
|
||||
BOOL ret;
|
||||
|
||||
/* CRL_V1 is not encoded */
|
||||
@@ -640,7 +646,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCRLInfo(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRL_INFO *info = pvStructInfo;
|
||||
const CRL_INFO *info = (const CRL_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[7] = {
|
||||
{ &info->dwVersion, CRYPT_AsnEncodeCRLVersion, 0 },
|
||||
{ &info->SignatureAlgorithm, CRYPT_AsnEncodeAlgorithmId, 0 },
|
||||
@@ -724,7 +730,7 @@ static BOOL WINAPI CRYPT_AsnEncodeExtensions(DWORD dwCertEncodingType,
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded, dataLen, lenBytes, i;
|
||||
const CERT_EXTENSIONS *exts = pvStructInfo;
|
||||
const CERT_EXTENSIONS *exts = (const CERT_EXTENSIONS *)pvStructInfo;
|
||||
|
||||
ret = TRUE;
|
||||
for (i = 0, dataLen = 0; ret && i < exts->cExtension; i++)
|
||||
@@ -777,7 +783,7 @@ BOOL WINAPI CRYPT_AsnEncodeOid(DWORD dwCertEncodingType,
|
||||
LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
LPCSTR pszObjId = pvStructInfo;
|
||||
LPCSTR pszObjId = (LPCSTR)pvStructInfo;
|
||||
DWORD bytesNeeded = 0, lenBytes;
|
||||
BOOL ret = TRUE;
|
||||
int firstPos = 0;
|
||||
@@ -1001,7 +1007,7 @@ static BOOL WINAPI CRYPT_AsnEncodeNameValue(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_NAME_VALUE *value = pvStructInfo;
|
||||
const CERT_NAME_VALUE *value = (const CERT_NAME_VALUE *)pvStructInfo;
|
||||
|
||||
switch (value->dwValueType)
|
||||
{
|
||||
@@ -1092,8 +1098,8 @@ static BOOL CRYPT_AsnEncodeRdnAttr(DWORD dwCertEncodingType,
|
||||
/* hack: a CERT_RDN_ATTR is identical to a CERT_NAME_VALUE beginning
|
||||
* with dwValueType, so "cast" it to get its encoded size
|
||||
*/
|
||||
ret = nameValueEncodeFunc(dwCertEncodingType, NULL, &attr->dwValueType,
|
||||
0, NULL, NULL, &size);
|
||||
ret = nameValueEncodeFunc(dwCertEncodingType, NULL,
|
||||
(CERT_NAME_VALUE *)&attr->dwValueType, 0, NULL, NULL, &size);
|
||||
if (ret)
|
||||
{
|
||||
bytesNeeded += size;
|
||||
@@ -1119,8 +1125,9 @@ static BOOL CRYPT_AsnEncodeRdnAttr(DWORD dwCertEncodingType,
|
||||
{
|
||||
pbEncoded += size;
|
||||
size = bytesNeeded - 1 - lenBytes - size;
|
||||
ret = nameValueEncodeFunc(dwCertEncodingType, NULL,
|
||||
&attr->dwValueType, 0, NULL, pbEncoded, &size);
|
||||
ret = nameValueEncodeFunc(dwCertEncodingType,
|
||||
NULL, (CERT_NAME_VALUE *)&attr->dwValueType,
|
||||
0, NULL, pbEncoded, &size);
|
||||
if (!ret)
|
||||
*pcbEncoded = size;
|
||||
}
|
||||
@@ -1140,7 +1147,7 @@ static BOOL CRYPT_AsnEncodeRdnAttr(DWORD dwCertEncodingType,
|
||||
|
||||
static int BLOBComp(const void *l, const void *r)
|
||||
{
|
||||
const CRYPT_DER_BLOB *a = l, *b = r;
|
||||
const CRYPT_DER_BLOB *a = (const CRYPT_DER_BLOB *)l, *b = (const CRYPT_DER_BLOB *)r;
|
||||
int ret;
|
||||
|
||||
if (!(ret = memcmp(a->pbData, b->pbData, min(a->cbData, b->cbData))))
|
||||
@@ -1154,7 +1161,7 @@ static BOOL WINAPI CRYPT_DEREncodeSet(DWORD dwCertEncodingType,
|
||||
LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
const CRYPT_BLOB_ARRAY *set = pvStructInfo;
|
||||
const CRYPT_BLOB_ARRAY *set = (const CRYPT_BLOB_ARRAY *)pvStructInfo;
|
||||
DWORD bytesNeeded = 0, lenBytes, i;
|
||||
BOOL ret;
|
||||
|
||||
@@ -1198,7 +1205,8 @@ static BOOL WINAPI CRYPT_DEREncodeItemsAsSet(DWORD dwCertEncodingType,
|
||||
LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
const struct DERSetDescriptor *desc = pvStructInfo;
|
||||
const struct DERSetDescriptor *desc =
|
||||
(const struct DERSetDescriptor *)pvStructInfo;
|
||||
CRYPT_BLOB_ARRAY setOf = { 0, NULL };
|
||||
BOOL ret = TRUE;
|
||||
DWORD i;
|
||||
@@ -1336,7 +1344,7 @@ static BOOL WINAPI CRYPT_AsnEncodeOrCopyUnicodeNameValue(
|
||||
DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded,
|
||||
DWORD *pcbEncoded)
|
||||
{
|
||||
const CERT_NAME_VALUE *value = pvStructInfo;
|
||||
const CERT_NAME_VALUE *value = (const CERT_NAME_VALUE *)pvStructInfo;
|
||||
BOOL ret;
|
||||
|
||||
if (value->dwValueType == CERT_RDN_ENCODED_BLOB)
|
||||
@@ -1356,7 +1364,7 @@ static BOOL WINAPI CRYPT_AsnEncodeUnicodeName(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_NAME_INFO *info = pvStructInfo;
|
||||
const CERT_NAME_INFO *info = (const CERT_NAME_INFO *)pvStructInfo;
|
||||
DWORD bytesNeeded = 0, lenBytes, size, i;
|
||||
|
||||
TRACE("encoding name with %d RDNs\n", info->cRDN);
|
||||
@@ -1418,7 +1426,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCTLVersion(DWORD dwCertEncodingType,
|
||||
LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
const DWORD *ver = pvStructInfo;
|
||||
const DWORD *ver = (const DWORD *)pvStructInfo;
|
||||
BOOL ret;
|
||||
|
||||
/* CTL_V1 is not encoded */
|
||||
@@ -1441,7 +1449,8 @@ static BOOL WINAPI CRYPT_AsnEncodeCTLSubjectAlgorithm(
|
||||
DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded,
|
||||
DWORD *pcbEncoded)
|
||||
{
|
||||
const CRYPT_ALGORITHM_IDENTIFIER *algo = pvStructInfo;
|
||||
const CRYPT_ALGORITHM_IDENTIFIER *algo =
|
||||
(const CRYPT_ALGORITHM_IDENTIFIER *)pvStructInfo;
|
||||
BOOL ret;
|
||||
struct AsnEncodeSequenceItem items[2] = {
|
||||
{ algo->pszObjId, CRYPT_AsnEncodeOid, 0 },
|
||||
@@ -1492,7 +1501,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCTLEntries(DWORD dwCertEncodingType,
|
||||
{
|
||||
BOOL ret;
|
||||
DWORD bytesNeeded, dataLen, lenBytes, i;
|
||||
const struct CTLEntries *entries = pvStructInfo;
|
||||
const struct CTLEntries *entries = (const struct CTLEntries *)pvStructInfo;
|
||||
|
||||
ret = TRUE;
|
||||
for (i = 0, dataLen = 0; ret && i < entries->cEntry; i++)
|
||||
@@ -1542,7 +1551,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCTL(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CTL_INFO *info = pvStructInfo;
|
||||
const CTL_INFO *info = (const CTL_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[9] = {
|
||||
{ &info->dwVersion, CRYPT_AsnEncodeCTLVersion, 0 },
|
||||
{ &info->SubjectUsage, CRYPT_AsnEncodeEnhancedKeyUsage, 0 },
|
||||
@@ -1608,7 +1617,8 @@ static BOOL CRYPT_AsnEncodeSMIMECapability(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRYPT_SMIME_CAPABILITY *capability = pvStructInfo;
|
||||
const CRYPT_SMIME_CAPABILITY *capability =
|
||||
(const CRYPT_SMIME_CAPABILITY *)pvStructInfo;
|
||||
|
||||
if (!capability->pszObjId)
|
||||
SetLastError(E_INVALIDARG);
|
||||
@@ -1641,7 +1651,8 @@ static BOOL WINAPI CRYPT_AsnEncodeSMIMECapabilities(DWORD dwCertEncodingType,
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded, dataLen, lenBytes, i;
|
||||
const CRYPT_SMIME_CAPABILITIES *capabilities = pvStructInfo;
|
||||
const CRYPT_SMIME_CAPABILITIES *capabilities =
|
||||
(const CRYPT_SMIME_CAPABILITIES *)pvStructInfo;
|
||||
|
||||
ret = TRUE;
|
||||
for (i = 0, dataLen = 0; ret && i < capabilities->cCapability; i++)
|
||||
@@ -1807,7 +1818,7 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSAttribute(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRYPT_ATTRIBUTE *attr = pvStructInfo;
|
||||
const CRYPT_ATTRIBUTE *attr = (const CRYPT_ATTRIBUTE *)pvStructInfo;
|
||||
|
||||
if (!attr->pszObjId)
|
||||
SetLastError(E_INVALIDARG);
|
||||
@@ -1839,7 +1850,8 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSAttributes(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRYPT_ATTRIBUTES *attributes = pvStructInfo;
|
||||
const CRYPT_ATTRIBUTES *attributes =
|
||||
(const CRYPT_ATTRIBUTES *)pvStructInfo;
|
||||
struct DERSetDescriptor desc = { attributes->cAttr, attributes->rgAttr,
|
||||
sizeof(CRYPT_ATTRIBUTE), 0, CRYPT_AsnEncodePKCSAttribute };
|
||||
|
||||
@@ -1860,7 +1872,7 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSContentInfoInternal(
|
||||
DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded,
|
||||
DWORD *pcbEncoded)
|
||||
{
|
||||
const CRYPT_CONTENT_INFO *info = pvStructInfo;
|
||||
const CRYPT_CONTENT_INFO *info = (const CRYPT_CONTENT_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[2] = {
|
||||
{ info->pszObjId, CRYPT_AsnEncodeOid, 0 },
|
||||
{ NULL, NULL, 0 },
|
||||
@@ -1904,7 +1916,8 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSContentInfo(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRYPT_CONTENT_INFO *info = pvStructInfo;
|
||||
const CRYPT_CONTENT_INFO *info =
|
||||
(const CRYPT_CONTENT_INFO *)pvStructInfo;
|
||||
|
||||
if (!info->pszObjId)
|
||||
SetLastError(E_INVALIDARG);
|
||||
@@ -2157,7 +2170,7 @@ static BOOL WINAPI CRYPT_AsnEncodeUnicodeNameValue(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_NAME_VALUE *value = pvStructInfo;
|
||||
const CERT_NAME_VALUE *value = (const CERT_NAME_VALUE *)pvStructInfo;
|
||||
|
||||
switch (value->dwValueType)
|
||||
{
|
||||
@@ -2230,7 +2243,7 @@ static BOOL WINAPI CRYPT_AsnEncodeName(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_NAME_INFO *info = pvStructInfo;
|
||||
const CERT_NAME_INFO *info = (const CERT_NAME_INFO *)pvStructInfo;
|
||||
DWORD bytesNeeded = 0, lenBytes, size, i;
|
||||
|
||||
TRACE("encoding name with %d RDNs\n", info->cRDN);
|
||||
@@ -2319,7 +2332,8 @@ static BOOL WINAPI CRYPT_AsnEncodeAltNameEntry(DWORD dwCertEncodingType,
|
||||
LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
const CERT_ALT_NAME_ENTRY *entry = pvStructInfo;
|
||||
const CERT_ALT_NAME_ENTRY *entry =
|
||||
(const CERT_ALT_NAME_ENTRY *)pvStructInfo;
|
||||
BOOL ret;
|
||||
DWORD dataLen;
|
||||
BYTE tag;
|
||||
@@ -2428,7 +2442,7 @@ static BOOL WINAPI CRYPT_AsnEncodeIntegerSwapBytes(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRYPT_DATA_BLOB *blob = pvStructInfo;
|
||||
const CRYPT_DATA_BLOB *blob = (const CRYPT_DATA_BLOB *)pvStructInfo;
|
||||
CRYPT_DATA_BLOB newBlob = { blob->cbData, NULL };
|
||||
|
||||
ret = TRUE;
|
||||
@@ -2467,7 +2481,8 @@ static BOOL WINAPI CRYPT_AsnEncodeAuthorityKeyId(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_AUTHORITY_KEY_ID_INFO *info = pvStructInfo;
|
||||
const CERT_AUTHORITY_KEY_ID_INFO *info =
|
||||
(const CERT_AUTHORITY_KEY_ID_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[3] = { { 0 } };
|
||||
struct AsnEncodeTagSwappedItem swapped[3] = { { 0 } };
|
||||
struct AsnConstructedItem constructed = { 0 };
|
||||
@@ -2522,7 +2537,8 @@ static BOOL WINAPI CRYPT_AsnEncodeAltName(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_ALT_NAME_INFO *info = pvStructInfo;
|
||||
const CERT_ALT_NAME_INFO *info =
|
||||
(const CERT_ALT_NAME_INFO *)pvStructInfo;
|
||||
DWORD bytesNeeded, dataLen, lenBytes, i;
|
||||
|
||||
ret = TRUE;
|
||||
@@ -2599,7 +2615,8 @@ static BOOL WINAPI CRYPT_AsnEncodeAuthorityKeyId2(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_AUTHORITY_KEY_ID2_INFO *info = pvStructInfo;
|
||||
const CERT_AUTHORITY_KEY_ID2_INFO *info =
|
||||
(const CERT_AUTHORITY_KEY_ID2_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[3] = { { 0 } };
|
||||
struct AsnEncodeTagSwappedItem swapped[3] = { { 0 } };
|
||||
DWORD cItem = 0, cSwapped = 0;
|
||||
@@ -2672,7 +2689,8 @@ static BOOL WINAPI CRYPT_AsnEncodeAuthorityInfoAccess(DWORD dwCertEncodingType,
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded, dataLen, lenBytes, i;
|
||||
const CERT_AUTHORITY_INFO_ACCESS *info = pvStructInfo;
|
||||
const CERT_AUTHORITY_INFO_ACCESS *info =
|
||||
(const CERT_AUTHORITY_INFO_ACCESS *)pvStructInfo;
|
||||
|
||||
ret = TRUE;
|
||||
for (i = 0, dataLen = 0; ret && i < info->cAccDescr; i++)
|
||||
@@ -2730,7 +2748,8 @@ static BOOL WINAPI CRYPT_AsnEncodeBasicConstraints(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_BASIC_CONSTRAINTS_INFO *info = pvStructInfo;
|
||||
const CERT_BASIC_CONSTRAINTS_INFO *info =
|
||||
(const CERT_BASIC_CONSTRAINTS_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[3] = {
|
||||
{ &info->SubjectType, CRYPT_AsnEncodeBits, 0 },
|
||||
{ 0 }
|
||||
@@ -2769,7 +2788,8 @@ static BOOL WINAPI CRYPT_AsnEncodeBasicConstraints2(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_BASIC_CONSTRAINTS2_INFO *info = pvStructInfo;
|
||||
const CERT_BASIC_CONSTRAINTS2_INFO *info =
|
||||
(const CERT_BASIC_CONSTRAINTS2_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[2] = { { 0 } };
|
||||
DWORD cItem = 0;
|
||||
|
||||
@@ -2961,7 +2981,8 @@ static BOOL WINAPI CRYPT_AsnEncodeRsaPubKey(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const BLOBHEADER *hdr = pvStructInfo;
|
||||
const BLOBHEADER *hdr =
|
||||
(const BLOBHEADER *)pvStructInfo;
|
||||
|
||||
if (hdr->bType != PUBLICKEYBLOB)
|
||||
{
|
||||
@@ -3001,7 +3022,7 @@ BOOL WINAPI CRYPT_AsnEncodeOctets(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRYPT_DATA_BLOB *blob = pvStructInfo;
|
||||
const CRYPT_DATA_BLOB *blob = (const CRYPT_DATA_BLOB *)pvStructInfo;
|
||||
DWORD bytesNeeded, lenBytes;
|
||||
|
||||
TRACE("(%d, %p), %08x, %p, %p, %d\n", blob->cbData, blob->pbData,
|
||||
@@ -3047,7 +3068,7 @@ static BOOL WINAPI CRYPT_AsnEncodeBits(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRYPT_BIT_BLOB *blob = pvStructInfo;
|
||||
const CRYPT_BIT_BLOB *blob = (const CRYPT_BIT_BLOB *)pvStructInfo;
|
||||
DWORD bytesNeeded, lenBytes, dataBytes;
|
||||
BYTE unusedBits;
|
||||
|
||||
@@ -3117,7 +3138,7 @@ static BOOL WINAPI CRYPT_AsnEncodeBitsSwapBytes(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRYPT_BIT_BLOB *blob = pvStructInfo;
|
||||
const CRYPT_BIT_BLOB *blob = (const CRYPT_BIT_BLOB *)pvStructInfo;
|
||||
CRYPT_BIT_BLOB newBlob = { blob->cbData, NULL, blob->cUnusedBits };
|
||||
|
||||
ret = TRUE;
|
||||
@@ -3169,7 +3190,8 @@ static BOOL WINAPI CRYPT_AsnEncodeInteger(DWORD dwCertEncodingType,
|
||||
DWORD significantBytes, lenBytes, bytesNeeded;
|
||||
BYTE padByte = 0;
|
||||
BOOL pad = FALSE;
|
||||
const CRYPT_INTEGER_BLOB *blob = pvStructInfo;
|
||||
const CRYPT_INTEGER_BLOB *blob =
|
||||
(const CRYPT_INTEGER_BLOB *)pvStructInfo;
|
||||
|
||||
significantBytes = blob->cbData;
|
||||
if (significantBytes)
|
||||
@@ -3256,7 +3278,8 @@ static BOOL WINAPI CRYPT_AsnEncodeUnsignedInteger(DWORD dwCertEncodingType,
|
||||
{
|
||||
DWORD significantBytes, lenBytes, bytesNeeded;
|
||||
BOOL pad = FALSE;
|
||||
const CRYPT_INTEGER_BLOB *blob = pvStructInfo;
|
||||
const CRYPT_INTEGER_BLOB *blob =
|
||||
(const CRYPT_INTEGER_BLOB *)pvStructInfo;
|
||||
|
||||
significantBytes = blob->cbData;
|
||||
if (significantBytes)
|
||||
@@ -3359,7 +3382,8 @@ static BOOL WINAPI CRYPT_AsnEncodeUtcTime(DWORD dwCertEncodingType,
|
||||
else
|
||||
{
|
||||
/* Sanity check the year, this is a two-digit year format */
|
||||
ret = FileTimeToSystemTime(pvStructInfo, &sysTime);
|
||||
ret = FileTimeToSystemTime((const FILETIME *)pvStructInfo,
|
||||
&sysTime);
|
||||
if (ret && (sysTime.wYear < 1950 || sysTime.wYear > 2050))
|
||||
{
|
||||
SetLastError(CRYPT_E_BAD_ENCODE);
|
||||
@@ -3415,7 +3439,8 @@ static BOOL CRYPT_AsnEncodeGeneralizedTime(DWORD dwCertEncodingType,
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = FileTimeToSystemTime(pvStructInfo, &sysTime);
|
||||
ret = FileTimeToSystemTime((const FILETIME *)pvStructInfo,
|
||||
&sysTime);
|
||||
if (ret)
|
||||
ret = CRYPT_EncodeEnsureSpace(dwFlags, pEncodePara, pbEncoded,
|
||||
pcbEncoded, bytesNeeded);
|
||||
@@ -3452,7 +3477,7 @@ static BOOL WINAPI CRYPT_AsnEncodeChoiceOfTime(DWORD dwCertEncodingType,
|
||||
SYSTEMTIME sysTime;
|
||||
|
||||
/* Check the year, if it's in the UTCTime range call that encode func */
|
||||
if (!FileTimeToSystemTime(pvStructInfo, &sysTime))
|
||||
if (!FileTimeToSystemTime((const FILETIME *)pvStructInfo, &sysTime))
|
||||
return FALSE;
|
||||
if (sysTime.wYear >= 1950 && sysTime.wYear <= 2050)
|
||||
ret = CRYPT_AsnEncodeUtcTime(dwCertEncodingType, lpszStructType,
|
||||
@@ -3480,7 +3505,8 @@ static BOOL WINAPI CRYPT_AsnEncodeSequenceOfAny(DWORD dwCertEncodingType,
|
||||
__TRY
|
||||
{
|
||||
DWORD bytesNeeded, dataLen, lenBytes, i;
|
||||
const CRYPT_SEQUENCE_OF_ANY *seq = pvStructInfo;
|
||||
const CRYPT_SEQUENCE_OF_ANY *seq =
|
||||
(const CRYPT_SEQUENCE_OF_ANY *)pvStructInfo;
|
||||
|
||||
for (i = 0, dataLen = 0; i < seq->cValue; i++)
|
||||
dataLen += seq->rgValue[i].cbData;
|
||||
@@ -3586,7 +3612,8 @@ static BOOL WINAPI CRYPT_AsnEncodeCRLDistPoints(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRL_DIST_POINTS_INFO *info = pvStructInfo;
|
||||
const CRL_DIST_POINTS_INFO *info =
|
||||
(const CRL_DIST_POINTS_INFO *)pvStructInfo;
|
||||
|
||||
if (!info->cDistPoint)
|
||||
{
|
||||
@@ -3665,7 +3692,8 @@ static BOOL WINAPI CRYPT_AsnEncodeEnhancedKeyUsage(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_ENHKEY_USAGE *usage = pvStructInfo;
|
||||
const CERT_ENHKEY_USAGE *usage =
|
||||
(const CERT_ENHKEY_USAGE *)pvStructInfo;
|
||||
DWORD bytesNeeded = 0, lenBytes, size, i;
|
||||
|
||||
ret = TRUE;
|
||||
@@ -3728,7 +3756,8 @@ static BOOL WINAPI CRYPT_AsnEncodeIssuingDistPoint(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CRL_ISSUING_DIST_POINT *point = pvStructInfo;
|
||||
const CRL_ISSUING_DIST_POINT *point =
|
||||
(const CRL_ISSUING_DIST_POINT *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[6] = { { 0 } };
|
||||
struct AsnConstructedItem constructed = { 0 };
|
||||
struct AsnEncodeTagSwappedItem swapped[5] = { { 0 } };
|
||||
@@ -3814,7 +3843,8 @@ static BOOL CRYPT_AsnEncodeGeneralSubtree(DWORD dwCertEncodingType,
|
||||
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded)
|
||||
{
|
||||
BOOL ret;
|
||||
const CERT_GENERAL_SUBTREE *subtree = pvStructInfo;
|
||||
const CERT_GENERAL_SUBTREE *subtree =
|
||||
(const CERT_GENERAL_SUBTREE *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[3] = {
|
||||
{ &subtree->Base, CRYPT_AsnEncodeAltNameEntry, 0 },
|
||||
{ 0 }
|
||||
@@ -3858,7 +3888,8 @@ static BOOL WINAPI CRYPT_AsnEncodeNameConstraints(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CERT_NAME_CONSTRAINTS_INFO *constraints = pvStructInfo;
|
||||
const CERT_NAME_CONSTRAINTS_INFO *constraints =
|
||||
(const CERT_NAME_CONSTRAINTS_INFO *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[2] = { { 0 } };
|
||||
struct AsnEncodeTagSwappedItem swapped[2] = { { 0 } };
|
||||
DWORD i, cItem = 0, cSwapped = 0;
|
||||
@@ -3947,7 +3978,8 @@ static BOOL WINAPI CRYPT_AsnEncodeIssuerSerialNumber(
|
||||
DWORD *pcbEncoded)
|
||||
{
|
||||
BOOL ret;
|
||||
const CERT_ISSUER_SERIAL_NUMBER *issuerSerial = pvStructInfo;
|
||||
const CERT_ISSUER_SERIAL_NUMBER *issuerSerial =
|
||||
(const CERT_ISSUER_SERIAL_NUMBER *)pvStructInfo;
|
||||
struct AsnEncodeSequenceItem items[] = {
|
||||
{ &issuerSerial->Issuer, CRYPT_CopyEncodedBlob, 0 },
|
||||
{ &issuerSerial->SerialNumber, CRYPT_AsnEncodeInteger, 0 },
|
||||
@@ -3973,7 +4005,7 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSSignerInfo(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CMSG_SIGNER_INFO *info = pvStructInfo;
|
||||
const CMSG_SIGNER_INFO *info = (const CMSG_SIGNER_INFO *)pvStructInfo;
|
||||
|
||||
if (!info->Issuer.cbData)
|
||||
SetLastError(E_INVALIDARG);
|
||||
@@ -4040,7 +4072,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCMSSignerInfo(DWORD dwCertEncodingType,
|
||||
|
||||
__TRY
|
||||
{
|
||||
const CMSG_CMS_SIGNER_INFO *info = pvStructInfo;
|
||||
const CMSG_CMS_SIGNER_INFO *info = (const CMSG_CMS_SIGNER_INFO *)pvStructInfo;
|
||||
|
||||
if (info->SignerId.dwIdChoice != CERT_ID_ISSUER_SERIAL_NUMBER &&
|
||||
info->SignerId.dwIdChoice != CERT_ID_KEY_IDENTIFIER)
|
||||
@@ -4499,20 +4531,6 @@ BOOL WINAPI CryptEncodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL WINAPI PFXExportCertStore(HCERTSTORE hStore, CRYPT_DATA_BLOB *pPFX,
|
||||
LPCWSTR szPassword, DWORD dwFlags)
|
||||
{
|
||||
return PFXExportCertStoreEx(hStore, pPFX, szPassword, NULL, dwFlags);
|
||||
}
|
||||
|
||||
BOOL WINAPI PFXExportCertStoreEx(HCERTSTORE hStore, CRYPT_DATA_BLOB *pPFX,
|
||||
LPCWSTR szPassword, void *pvReserved, DWORD dwFlags)
|
||||
{
|
||||
FIXME_(crypt)("(%p, %p, %p, %p, %08x): stub\n", hStore, pPFX, szPassword,
|
||||
pvReserved, dwFlags);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL WINAPI CryptExportPublicKeyInfo(HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hCryptProv, DWORD dwKeySpec,
|
||||
DWORD dwCertEncodingType, PCERT_PUBLIC_KEY_INFO pInfo, DWORD *pcbInfo)
|
||||
{
|
||||
|
@@ -37,7 +37,7 @@ typedef struct _WINE_FILESTOREINFO
|
||||
|
||||
static void WINAPI CRYPT_FileCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
|
||||
{
|
||||
PWINE_FILESTOREINFO store = hCertStore;
|
||||
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %08x)\n", store, dwFlags);
|
||||
if (store->dirty)
|
||||
@@ -51,7 +51,7 @@ static void WINAPI CRYPT_FileCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
|
||||
static BOOL WINAPI CRYPT_FileWriteCert(HCERTSTORE hCertStore,
|
||||
PCCERT_CONTEXT cert, DWORD dwFlags)
|
||||
{
|
||||
PWINE_FILESTOREINFO store = hCertStore;
|
||||
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %d)\n", hCertStore, cert, dwFlags);
|
||||
store->dirty = TRUE;
|
||||
@@ -61,7 +61,7 @@ static BOOL WINAPI CRYPT_FileWriteCert(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_FileDeleteCert(HCERTSTORE hCertStore,
|
||||
PCCERT_CONTEXT pCertContext, DWORD dwFlags)
|
||||
{
|
||||
PWINE_FILESTOREINFO store = hCertStore;
|
||||
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %08x)\n", hCertStore, pCertContext, dwFlags);
|
||||
store->dirty = TRUE;
|
||||
@@ -71,7 +71,7 @@ static BOOL WINAPI CRYPT_FileDeleteCert(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_FileWriteCRL(HCERTSTORE hCertStore,
|
||||
PCCRL_CONTEXT crl, DWORD dwFlags)
|
||||
{
|
||||
PWINE_FILESTOREINFO store = hCertStore;
|
||||
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %d)\n", hCertStore, crl, dwFlags);
|
||||
store->dirty = TRUE;
|
||||
@@ -81,7 +81,7 @@ static BOOL WINAPI CRYPT_FileWriteCRL(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_FileDeleteCRL(HCERTSTORE hCertStore,
|
||||
PCCRL_CONTEXT pCrlContext, DWORD dwFlags)
|
||||
{
|
||||
PWINE_FILESTOREINFO store = hCertStore;
|
||||
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %08x)\n", hCertStore, pCrlContext, dwFlags);
|
||||
store->dirty = TRUE;
|
||||
@@ -91,7 +91,7 @@ static BOOL WINAPI CRYPT_FileDeleteCRL(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_FileWriteCTL(HCERTSTORE hCertStore,
|
||||
PCCTL_CONTEXT ctl, DWORD dwFlags)
|
||||
{
|
||||
PWINE_FILESTOREINFO store = hCertStore;
|
||||
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %d)\n", hCertStore, ctl, dwFlags);
|
||||
store->dirty = TRUE;
|
||||
@@ -101,7 +101,7 @@ static BOOL WINAPI CRYPT_FileWriteCTL(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_FileDeleteCTL(HCERTSTORE hCertStore,
|
||||
PCCTL_CONTEXT pCtlContext, DWORD dwFlags)
|
||||
{
|
||||
PWINE_FILESTOREINFO store = hCertStore;
|
||||
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %08x)\n", hCertStore, pCtlContext, dwFlags);
|
||||
store->dirty = TRUE;
|
||||
@@ -129,7 +129,7 @@ static BOOL CRYPT_ReadBlobFromFile(HANDLE file, PCERT_BLOB blob)
|
||||
static BOOL WINAPI CRYPT_FileControl(HCERTSTORE hCertStore, DWORD dwFlags,
|
||||
DWORD dwCtrlType, void const *pvCtrlPara)
|
||||
{
|
||||
PWINE_FILESTOREINFO store = hCertStore;
|
||||
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
|
||||
BOOL ret;
|
||||
|
||||
TRACE("(%p, %08x, %d, %p)\n", hCertStore, dwFlags, dwCtrlType,
|
||||
@@ -292,7 +292,7 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
|
||||
DWORD dwFlags, const void *pvPara)
|
||||
{
|
||||
HCERTSTORE store = 0;
|
||||
LPCWSTR fileName = pvPara;
|
||||
LPCWSTR fileName = (LPCWSTR)pvPara;
|
||||
DWORD access, create;
|
||||
HANDLE file;
|
||||
|
||||
@@ -376,7 +376,7 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
|
||||
CryptReleaseContext(hCryptProv, 0);
|
||||
}
|
||||
}
|
||||
return store;
|
||||
return (PWINECRYPT_CERTSTORE)store;
|
||||
}
|
||||
|
||||
PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv,
|
||||
@@ -386,21 +386,21 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv,
|
||||
PWINECRYPT_CERTSTORE ret = NULL;
|
||||
|
||||
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
|
||||
debugstr_a(pvPara));
|
||||
debugstr_a((LPCSTR)pvPara));
|
||||
|
||||
if (!pvPara)
|
||||
{
|
||||
SetLastError(ERROR_FILE_NOT_FOUND);
|
||||
return NULL;
|
||||
}
|
||||
len = MultiByteToWideChar(CP_ACP, 0, pvPara, -1, NULL, 0);
|
||||
len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, NULL, 0);
|
||||
if (len)
|
||||
{
|
||||
LPWSTR storeName = CryptMemAlloc(len * sizeof(WCHAR));
|
||||
|
||||
if (storeName)
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, 0, pvPara, -1, storeName, len);
|
||||
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, storeName, len);
|
||||
ret = CRYPT_FileNameOpenStoreW(hCryptProv, dwFlags, storeName);
|
||||
CryptMemFree(storeName);
|
||||
}
|
||||
|
@@ -109,7 +109,7 @@ static const BYTE empty_data_content[] = { 0x04,0x00 };
|
||||
|
||||
static void CDataEncodeMsg_Close(HCRYPTMSG hCryptMsg)
|
||||
{
|
||||
CDataEncodeMsg *msg = hCryptMsg;
|
||||
CDataEncodeMsg *msg = (CDataEncodeMsg *)hCryptMsg;
|
||||
|
||||
if (msg->bare_content != empty_data_content)
|
||||
LocalFree(msg->bare_content);
|
||||
@@ -191,7 +191,7 @@ static BOOL CRYPT_EncodeDataContentInfoHeader(CDataEncodeMsg *msg,
|
||||
static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
|
||||
DWORD cbData, BOOL fFinal)
|
||||
{
|
||||
CDataEncodeMsg *msg = hCryptMsg;
|
||||
CDataEncodeMsg *msg = (CDataEncodeMsg *)hCryptMsg;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
if (msg->base.state == MsgStateFinalized)
|
||||
@@ -320,7 +320,7 @@ static BOOL CRYPT_CopyParam(void *pvData, DWORD *pcbData, const void *src,
|
||||
static BOOL CDataEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||
DWORD dwIndex, void *pvData, DWORD *pcbData)
|
||||
{
|
||||
CDataEncodeMsg *msg = hCryptMsg;
|
||||
CDataEncodeMsg *msg = (CDataEncodeMsg *)hCryptMsg;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
switch (dwParamType)
|
||||
@@ -372,7 +372,7 @@ static HCRYPTMSG CDataEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
|
||||
msg->bare_content_len = sizeof(empty_data_content);
|
||||
msg->bare_content = (LPBYTE)empty_data_content;
|
||||
}
|
||||
return msg;
|
||||
return (HCRYPTMSG)msg;
|
||||
}
|
||||
|
||||
typedef struct _CHashEncodeMsg
|
||||
@@ -385,7 +385,7 @@ typedef struct _CHashEncodeMsg
|
||||
|
||||
static void CHashEncodeMsg_Close(HCRYPTMSG hCryptMsg)
|
||||
{
|
||||
CHashEncodeMsg *msg = hCryptMsg;
|
||||
CHashEncodeMsg *msg = (CHashEncodeMsg *)hCryptMsg;
|
||||
|
||||
CryptMemFree(msg->data.pbData);
|
||||
CryptDestroyHash(msg->hash);
|
||||
@@ -444,7 +444,7 @@ static BOOL CRYPT_EncodePKCSDigestedData(CHashEncodeMsg *msg, void *pvData,
|
||||
static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||
DWORD dwIndex, void *pvData, DWORD *pcbData)
|
||||
{
|
||||
CHashEncodeMsg *msg = hCryptMsg;
|
||||
CHashEncodeMsg *msg = (CHashEncodeMsg *)hCryptMsg;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("(%p, %d, %d, %p, %p)\n", hCryptMsg, dwParamType, dwIndex,
|
||||
@@ -487,7 +487,8 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||
break;
|
||||
}
|
||||
case CMSG_COMPUTED_HASH_PARAM:
|
||||
ret = CryptGetHashParam(msg->hash, HP_HASHVAL, pvData, pcbData, 0);
|
||||
ret = CryptGetHashParam(msg->hash, HP_HASHVAL, (BYTE *)pvData, pcbData,
|
||||
0);
|
||||
break;
|
||||
case CMSG_VERSION_PARAM:
|
||||
if (msg->base.state != MsgStateFinalized)
|
||||
@@ -511,7 +512,7 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||
static BOOL CHashEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
|
||||
DWORD cbData, BOOL fFinal)
|
||||
{
|
||||
CHashEncodeMsg *msg = hCryptMsg;
|
||||
CHashEncodeMsg *msg = (CHashEncodeMsg *)hCryptMsg;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("(%p, %p, %d, %d)\n", hCryptMsg, pbData, cbData, fFinal);
|
||||
@@ -554,7 +555,8 @@ static HCRYPTMSG CHashEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
|
||||
LPSTR pszInnerContentObjID, PCMSG_STREAM_INFO pStreamInfo)
|
||||
{
|
||||
CHashEncodeMsg *msg;
|
||||
const CMSG_HASHED_ENCODE_INFO *info = pvMsgEncodeInfo;
|
||||
const CMSG_HASHED_ENCODE_INFO *info =
|
||||
(const CMSG_HASHED_ENCODE_INFO *)pvMsgEncodeInfo;
|
||||
HCRYPTPROV prov;
|
||||
ALG_ID algID;
|
||||
|
||||
@@ -590,7 +592,7 @@ static HCRYPTMSG CHashEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
|
||||
msg = NULL;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
return (HCRYPTMSG)msg;
|
||||
}
|
||||
|
||||
typedef struct _CMSG_SIGNER_ENCODE_INFO_WITH_CMS
|
||||
@@ -1084,7 +1086,7 @@ static BOOL CSignedMsgData_UpdateAuthenticatedAttributes(
|
||||
|
||||
ret = CryptEncodeObjectEx(X509_ASN_ENCODING, PKCS_ATTRIBUTES,
|
||||
&msg_data->info->rgSignerInfo[i].AuthAttrs,
|
||||
CRYPT_ENCODE_ALLOC_FLAG, NULL, &encodedAttrs, &size);
|
||||
CRYPT_ENCODE_ALLOC_FLAG, NULL, (LPBYTE)&encodedAttrs, &size);
|
||||
if (ret)
|
||||
{
|
||||
ret = CryptHashData(
|
||||
@@ -1174,7 +1176,7 @@ typedef struct _CSignedEncodeMsg
|
||||
|
||||
static void CSignedEncodeMsg_Close(HCRYPTMSG hCryptMsg)
|
||||
{
|
||||
CSignedEncodeMsg *msg = hCryptMsg;
|
||||
CSignedEncodeMsg *msg = (CSignedEncodeMsg *)hCryptMsg;
|
||||
DWORD i;
|
||||
|
||||
CryptMemFree(msg->innerOID);
|
||||
@@ -1191,7 +1193,7 @@ static void CSignedEncodeMsg_Close(HCRYPTMSG hCryptMsg)
|
||||
static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||
DWORD dwIndex, void *pvData, DWORD *pcbData)
|
||||
{
|
||||
CSignedEncodeMsg *msg = hCryptMsg;
|
||||
CSignedEncodeMsg *msg = (CSignedEncodeMsg *)hCryptMsg;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
switch (dwParamType)
|
||||
@@ -1299,7 +1301,7 @@ static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||
static BOOL CSignedEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
|
||||
DWORD cbData, BOOL fFinal)
|
||||
{
|
||||
CSignedEncodeMsg *msg = hCryptMsg;
|
||||
CSignedEncodeMsg *msg = (CSignedEncodeMsg *)hCryptMsg;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
if (msg->base.state == MsgStateFinalized)
|
||||
@@ -1343,7 +1345,8 @@ static HCRYPTMSG CSignedEncodeMsg_Open(DWORD dwFlags,
|
||||
const void *pvMsgEncodeInfo, LPSTR pszInnerContentObjID,
|
||||
PCMSG_STREAM_INFO pStreamInfo)
|
||||
{
|
||||
const CMSG_SIGNED_ENCODE_INFO_WITH_CMS *info = pvMsgEncodeInfo;
|
||||
const CMSG_SIGNED_ENCODE_INFO_WITH_CMS *info =
|
||||
(const CMSG_SIGNED_ENCODE_INFO_WITH_CMS *)pvMsgEncodeInfo;
|
||||
DWORD i;
|
||||
CSignedEncodeMsg *msg;
|
||||
|
||||
@@ -1507,7 +1510,7 @@ typedef struct _CDecodeMsg
|
||||
|
||||
static void CDecodeMsg_Close(HCRYPTMSG hCryptMsg)
|
||||
{
|
||||
CDecodeMsg *msg = hCryptMsg;
|
||||
CDecodeMsg *msg = (CDecodeMsg *)hCryptMsg;
|
||||
|
||||
if (msg->base.open_flags & CMSG_CRYPT_RELEASE_CONTEXT_FLAG)
|
||||
CryptReleaseContext(msg->crypt_prov, 0);
|
||||
@@ -1560,7 +1563,8 @@ static BOOL CDecodeMsg_DecodeDataContent(CDecodeMsg *msg, CRYPT_DER_BLOB *blob)
|
||||
DWORD size;
|
||||
|
||||
ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_OCTET_STRING,
|
||||
blob->pbData, blob->cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, &data, &size);
|
||||
blob->pbData, blob->cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, (LPBYTE)&data,
|
||||
&size);
|
||||
if (ret)
|
||||
{
|
||||
ret = ContextPropertyList_SetProperty(msg->properties,
|
||||
@@ -1699,7 +1703,7 @@ static BOOL CDecodeMsg_DecodeContent(CDecodeMsg *msg, CRYPT_DER_BLOB *blob,
|
||||
|
||||
ret = CryptDecodeObjectEx(X509_ASN_ENCODING, PKCS_CONTENT_INFO,
|
||||
msg->msg_data.pbData, msg->msg_data.cbData, CRYPT_DECODE_ALLOC_FLAG,
|
||||
NULL, &info, &size);
|
||||
NULL, (LPBYTE)&info, &size);
|
||||
if (ret)
|
||||
{
|
||||
if (!strcmp(info->pszObjId, szOID_RSA_data))
|
||||
@@ -1798,7 +1802,7 @@ static BOOL CDecodeMsg_FinalizeSignedContent(CDecodeMsg *msg,
|
||||
|
||||
ret = CryptDecodeObjectEx(X509_ASN_ENCODING,
|
||||
X509_OCTET_STRING, content->pbData, content->cbData,
|
||||
CRYPT_DECODE_ALLOC_FLAG, NULL, &blob, &size);
|
||||
CRYPT_DECODE_ALLOC_FLAG, NULL, (LPBYTE)&blob, &size);
|
||||
if (ret)
|
||||
{
|
||||
ret = CSignedMsgData_Update(&msg->u.signed_data,
|
||||
@@ -1835,7 +1839,7 @@ static BOOL CDecodeMsg_FinalizeContent(CDecodeMsg *msg, CRYPT_DER_BLOB *blob)
|
||||
static BOOL CDecodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
|
||||
DWORD cbData, BOOL fFinal)
|
||||
{
|
||||
CDecodeMsg *msg = hCryptMsg;
|
||||
CDecodeMsg *msg = (CDecodeMsg *)hCryptMsg;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("(%p, %p, %d, %d)\n", hCryptMsg, pbData, cbData, fFinal);
|
||||
@@ -1935,7 +1939,7 @@ static BOOL CDecodeHashMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
|
||||
{
|
||||
ret = CRYPT_CopyParam(pvData, pcbData, blob.pbData, blob.cbData);
|
||||
if (ret && pvData)
|
||||
CRYPT_FixUpAlgorithmID(pvData);
|
||||
CRYPT_FixUpAlgorithmID((CRYPT_ALGORITHM_IDENTIFIER *)pvData);
|
||||
}
|
||||
else
|
||||
SetLastError(CRYPT_E_INVALID_MSG_TYPE);
|
||||
@@ -2132,7 +2136,7 @@ static BOOL CRYPT_CopySignerInfo(void *pvData, DWORD *pcbData,
|
||||
else
|
||||
{
|
||||
LPBYTE nextData = (BYTE *)pvData + sizeof(CMSG_SIGNER_INFO);
|
||||
CMSG_SIGNER_INFO *out = pvData;
|
||||
CMSG_SIGNER_INFO *out = (CMSG_SIGNER_INFO *)pvData;
|
||||
|
||||
ret = TRUE;
|
||||
out->dwVersion = in->dwVersion;
|
||||
@@ -2202,7 +2206,7 @@ static BOOL CRYPT_CopyCMSSignerInfo(void *pvData, DWORD *pcbData,
|
||||
else
|
||||
{
|
||||
LPBYTE nextData = (BYTE *)pvData + sizeof(CMSG_CMS_SIGNER_INFO);
|
||||
CMSG_CMS_SIGNER_INFO *out = pvData;
|
||||
CMSG_CMS_SIGNER_INFO *out = (CMSG_CMS_SIGNER_INFO *)pvData;
|
||||
|
||||
out->dwVersion = in->dwVersion;
|
||||
out->SignerId.dwIdChoice = in->SignerId.dwIdChoice;
|
||||
@@ -2261,7 +2265,7 @@ static BOOL CRYPT_CopySignerCertInfo(void *pvData, DWORD *pcbData,
|
||||
else
|
||||
{
|
||||
LPBYTE nextData = (BYTE *)pvData + sizeof(CERT_INFO);
|
||||
CERT_INFO *out = pvData;
|
||||
CERT_INFO *out = (CERT_INFO *)pvData;
|
||||
|
||||
memset(out, 0, sizeof(CERT_INFO));
|
||||
if (in->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER)
|
||||
@@ -2302,7 +2306,7 @@ static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
|
||||
ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_OCTET_STRING,
|
||||
msg->u.signed_data.info->content.Content.pbData,
|
||||
msg->u.signed_data.info->content.Content.cbData,
|
||||
CRYPT_DECODE_ALLOC_FLAG, NULL, &blob, &size);
|
||||
CRYPT_DECODE_ALLOC_FLAG, NULL, (LPBYTE)&blob, &size);
|
||||
if (ret)
|
||||
{
|
||||
ret = CRYPT_CopyParam(pvData, pcbData, blob->pbData,
|
||||
@@ -2449,7 +2453,7 @@ static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
|
||||
static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||
DWORD dwIndex, void *pvData, DWORD *pcbData)
|
||||
{
|
||||
CDecodeMsg *msg = hCryptMsg;
|
||||
CDecodeMsg *msg = (CDecodeMsg *)hCryptMsg;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
switch (msg->type)
|
||||
@@ -2624,11 +2628,12 @@ static BOOL CDecodeSignedMsg_VerifySignatureEx(CDecodeMsg *msg,
|
||||
{
|
||||
case CMSG_VERIFY_SIGNER_PUBKEY:
|
||||
ret = CDecodeSignedMsg_VerifySignatureWithKey(msg,
|
||||
para->hCryptProv, para->dwSignerIndex, para->pvSigner);
|
||||
para->hCryptProv, para->dwSignerIndex,
|
||||
(PCERT_PUBLIC_KEY_INFO)para->pvSigner);
|
||||
break;
|
||||
case CMSG_VERIFY_SIGNER_CERT:
|
||||
{
|
||||
PCCERT_CONTEXT cert = para->pvSigner;
|
||||
PCCERT_CONTEXT cert = (PCCERT_CONTEXT)para->pvSigner;
|
||||
|
||||
ret = CDecodeSignedMsg_VerifySignatureWithKey(msg, para->hCryptProv,
|
||||
para->dwSignerIndex, &cert->pCertInfo->SubjectPublicKeyInfo);
|
||||
@@ -2645,7 +2650,7 @@ static BOOL CDecodeSignedMsg_VerifySignatureEx(CDecodeMsg *msg,
|
||||
static BOOL CDecodeMsg_Control(HCRYPTMSG hCryptMsg, DWORD dwFlags,
|
||||
DWORD dwCtrlType, const void *pvCtrlPara)
|
||||
{
|
||||
CDecodeMsg *msg = hCryptMsg;
|
||||
CDecodeMsg *msg = (CDecodeMsg *)hCryptMsg;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
switch (dwCtrlType)
|
||||
@@ -2738,7 +2743,7 @@ HCRYPTMSG WINAPI CryptMsgDuplicate(HCRYPTMSG hCryptMsg)
|
||||
|
||||
if (hCryptMsg)
|
||||
{
|
||||
CryptMsgBase *msg = hCryptMsg;
|
||||
CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg;
|
||||
|
||||
InterlockedIncrement(&msg->ref);
|
||||
}
|
||||
@@ -2751,7 +2756,7 @@ BOOL WINAPI CryptMsgClose(HCRYPTMSG hCryptMsg)
|
||||
|
||||
if (hCryptMsg)
|
||||
{
|
||||
CryptMsgBase *msg = hCryptMsg;
|
||||
CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg;
|
||||
|
||||
if (InterlockedDecrement(&msg->ref) == 0)
|
||||
{
|
||||
@@ -2767,7 +2772,7 @@ BOOL WINAPI CryptMsgClose(HCRYPTMSG hCryptMsg)
|
||||
BOOL WINAPI CryptMsgUpdate(HCRYPTMSG hCryptMsg, const BYTE *pbData,
|
||||
DWORD cbData, BOOL fFinal)
|
||||
{
|
||||
CryptMsgBase *msg = hCryptMsg;
|
||||
CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg;
|
||||
|
||||
TRACE("(%p, %p, %d, %d)\n", hCryptMsg, pbData, cbData, fFinal);
|
||||
|
||||
@@ -2777,7 +2782,7 @@ BOOL WINAPI CryptMsgUpdate(HCRYPTMSG hCryptMsg, const BYTE *pbData,
|
||||
BOOL WINAPI CryptMsgGetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||
DWORD dwIndex, void *pvData, DWORD *pcbData)
|
||||
{
|
||||
CryptMsgBase *msg = hCryptMsg;
|
||||
CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg;
|
||||
|
||||
TRACE("(%p, %d, %d, %p, %p)\n", hCryptMsg, dwParamType, dwIndex,
|
||||
pvData, pcbData);
|
||||
@@ -2787,7 +2792,7 @@ BOOL WINAPI CryptMsgGetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
||||
BOOL WINAPI CryptMsgControl(HCRYPTMSG hCryptMsg, DWORD dwFlags,
|
||||
DWORD dwCtrlType, const void *pvCtrlPara)
|
||||
{
|
||||
CryptMsgBase *msg = hCryptMsg;
|
||||
CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg;
|
||||
|
||||
TRACE("(%p, %08x, %d, %p)\n", hCryptMsg, dwFlags, dwCtrlType,
|
||||
pvCtrlPara);
|
||||
|
@@ -108,11 +108,11 @@ static BOOL CRYPT_QueryContextObject(DWORD dwObjectType, const void *pvObject,
|
||||
/* Cert, CRL, and CTL contexts can't be "embedded" in a file, so
|
||||
* just read the file directly
|
||||
*/
|
||||
ret = CRYPT_ReadBlobFromFile(pvObject, &fileBlob);
|
||||
ret = CRYPT_ReadBlobFromFile((LPCWSTR)pvObject, &fileBlob);
|
||||
blob = &fileBlob;
|
||||
break;
|
||||
case CERT_QUERY_OBJECT_BLOB:
|
||||
blob = pvObject;
|
||||
blob = (const CERT_BLOB *)pvObject;
|
||||
ret = TRUE;
|
||||
break;
|
||||
default:
|
||||
@@ -198,11 +198,11 @@ static BOOL CRYPT_QuerySerializedContextObject(DWORD dwObjectType,
|
||||
/* Cert, CRL, and CTL contexts can't be "embedded" in a file, so
|
||||
* just read the file directly
|
||||
*/
|
||||
ret = CRYPT_ReadBlobFromFile(pvObject, &fileBlob);
|
||||
ret = CRYPT_ReadBlobFromFile((LPCWSTR)pvObject, &fileBlob);
|
||||
blob = &fileBlob;
|
||||
break;
|
||||
case CERT_QUERY_OBJECT_BLOB:
|
||||
blob = pvObject;
|
||||
blob = (const CERT_BLOB *)pvObject;
|
||||
ret = TRUE;
|
||||
break;
|
||||
default:
|
||||
@@ -287,7 +287,7 @@ static BOOL CRYPT_QuerySerializedStoreObject(DWORD dwObjectType,
|
||||
const void *pvObject, DWORD *pdwMsgAndCertEncodingType, DWORD *pdwContentType,
|
||||
HCERTSTORE *phCertStore, HCRYPTMSG *phMsg)
|
||||
{
|
||||
LPCWSTR fileName = pvObject;
|
||||
LPCWSTR fileName = (LPCWSTR)pvObject;
|
||||
HANDLE file;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
@@ -450,11 +450,11 @@ static BOOL CRYPT_QueryMessageObject(DWORD dwObjectType, const void *pvObject,
|
||||
/* This isn't an embedded PKCS7 message, so just read the file
|
||||
* directly
|
||||
*/
|
||||
ret = CRYPT_ReadBlobFromFile(pvObject, &fileBlob);
|
||||
ret = CRYPT_ReadBlobFromFile((LPCWSTR)pvObject, &fileBlob);
|
||||
blob = &fileBlob;
|
||||
break;
|
||||
case CERT_QUERY_OBJECT_BLOB:
|
||||
blob = pvObject;
|
||||
blob = (const CERT_BLOB *)pvObject;
|
||||
ret = TRUE;
|
||||
break;
|
||||
default:
|
||||
@@ -583,7 +583,7 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
|
||||
GUID subject;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("%s\n", debugstr_w(pvObject));
|
||||
TRACE("%s\n", debugstr_w((LPCWSTR)pvObject));
|
||||
|
||||
if (dwObjectType != CERT_QUERY_OBJECT_FILE)
|
||||
{
|
||||
@@ -592,11 +592,11 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
|
||||
SetLastError(E_INVALIDARG);
|
||||
return FALSE;
|
||||
}
|
||||
file = CreateFileW(pvObject, GENERIC_READ, FILE_SHARE_READ,
|
||||
file = CreateFileW((LPCWSTR)pvObject, GENERIC_READ, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (file != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ret = CryptSIPRetrieveSubjectGuid(pvObject, file, &subject);
|
||||
ret = CryptSIPRetrieveSubjectGuid((LPCWSTR)pvObject, file, &subject);
|
||||
if (ret)
|
||||
{
|
||||
SIP_DISPATCH_INFO sip;
|
||||
@@ -614,7 +614,7 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
|
||||
subjectInfo.cbSize = sizeof(subjectInfo);
|
||||
subjectInfo.pgSubjectType = &subject;
|
||||
subjectInfo.hFile = file;
|
||||
subjectInfo.pwsFileName = pvObject;
|
||||
subjectInfo.pwsFileName = (LPCWSTR)pvObject;
|
||||
ret = sip.pfGet(&subjectInfo, &encodingType, 0, &blob.cbData,
|
||||
NULL);
|
||||
if (ret)
|
||||
@@ -1623,7 +1623,7 @@ static BOOL WINAPI CRYPT_FormatAuthorityInfoAccess(DWORD dwCertEncodingType,
|
||||
else
|
||||
{
|
||||
*pcbFormat = bytesNeeded;
|
||||
strcpyW(pbFormat, infoNotAvailable);
|
||||
strcpyW((LPWSTR)pbFormat, infoNotAvailable);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2021,7 +2021,7 @@ static BOOL WINAPI CRYPT_FormatCRLDistPoints(DWORD dwCertEncodingType,
|
||||
else
|
||||
{
|
||||
*pcbFormat = bytesNeeded;
|
||||
strcpyW(pbFormat, infoNotAvailable);
|
||||
strcpyW((LPWSTR)pbFormat, infoNotAvailable);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -81,9 +81,8 @@ static const WCHAR ROOT[] = {'R','O','O','T',0};
|
||||
static const WCHAR MY[] = {'M','Y',0};
|
||||
static const WCHAR CA[] = {'C','A',0};
|
||||
static const WCHAR ADDRESSBOOK[] = {'A','D','D','R','E','S','S','B','O','O','K',0};
|
||||
static const WCHAR TRUSTEDPUBLISHER[] = {'T','r','u','s','t','e','d','P','u','b','l','i','s','h','e','r',0};
|
||||
static const LPCWSTR LocalizedKeys[] = {ROOT,MY,CA,ADDRESSBOOK,TRUSTEDPUBLISHER};
|
||||
static WCHAR LocalizedNames[sizeof(LocalizedKeys)/sizeof(LocalizedKeys[0])][256];
|
||||
static const LPCWSTR LocalizedKeys[] = {ROOT,MY,CA,ADDRESSBOOK};
|
||||
static WCHAR LocalizedNames[4][256];
|
||||
|
||||
static void free_function_sets(void)
|
||||
{
|
||||
@@ -123,7 +122,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
|
||||
{
|
||||
if (!strcasecmp(pszFuncName, cursor->name))
|
||||
{
|
||||
ret = cursor;
|
||||
ret = (HCRYPTOIDFUNCSET)cursor;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -151,7 +150,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
|
||||
}
|
||||
LeaveCriticalSection(&funcSetCS);
|
||||
|
||||
return ret;
|
||||
return (HCRYPTOIDFUNCSET)ret;
|
||||
}
|
||||
|
||||
static char *CRYPT_GetKeyName(DWORD dwEncodingType, LPCSTR pszFuncName,
|
||||
@@ -194,7 +193,7 @@ BOOL WINAPI CryptGetDefaultOIDDllList(HCRYPTOIDFUNCSET hFuncSet,
|
||||
DWORD dwEncodingType, LPWSTR pwszDllList, DWORD *pcchDllList)
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
struct OIDFunctionSet *set = hFuncSet;
|
||||
struct OIDFunctionSet *set = (struct OIDFunctionSet *)hFuncSet;
|
||||
char *keyName;
|
||||
HKEY key;
|
||||
long rc;
|
||||
@@ -244,7 +243,7 @@ BOOL WINAPI CryptInstallOIDFunctionAddress(HMODULE hModule,
|
||||
TRACE("(%p, %d, %s, %d, %p, %08x)\n", hModule, dwEncodingType,
|
||||
debugstr_a(pszFuncName), cFuncEntry, rgFuncEntry, dwFlags);
|
||||
|
||||
set = CryptInitOIDFunctionSet(pszFuncName, 0);
|
||||
set = (struct OIDFunctionSet *)CryptInitOIDFunctionSet(pszFuncName, 0);
|
||||
if (set)
|
||||
{
|
||||
DWORD i;
|
||||
@@ -386,7 +385,7 @@ BOOL WINAPI CryptGetOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
|
||||
HCRYPTOIDFUNCADDR *phFuncAddr)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
struct OIDFunctionSet *set = hFuncSet;
|
||||
struct OIDFunctionSet *set = (struct OIDFunctionSet *)hFuncSet;
|
||||
|
||||
TRACE("(%p, %d, %s, %08x, %p, %p)\n", hFuncSet, dwEncodingType,
|
||||
debugstr_a(pszOID), dwFlags, ppvFuncAddr, phFuncAddr);
|
||||
@@ -441,7 +440,7 @@ BOOL WINAPI CryptFreeOIDFunctionAddress(HCRYPTOIDFUNCADDR hFuncAddr,
|
||||
*/
|
||||
if (hFuncAddr)
|
||||
{
|
||||
struct FuncAddr *addr = hFuncAddr;
|
||||
struct FuncAddr *addr = (struct FuncAddr *)hFuncAddr;
|
||||
|
||||
CryptMemFree(addr->dllList);
|
||||
FreeLibrary(addr->lib);
|
||||
@@ -474,7 +473,7 @@ BOOL WINAPI CryptGetDefaultOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
|
||||
DWORD dwEncodingType, LPCWSTR pwszDll, DWORD dwFlags, void **ppvFuncAddr,
|
||||
HCRYPTOIDFUNCADDR *phFuncAddr)
|
||||
{
|
||||
struct OIDFunctionSet *set = hFuncSet;
|
||||
struct OIDFunctionSet *set = (struct OIDFunctionSet *)hFuncSet;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("(%p, %d, %s, %08x, %p, %p)\n", hFuncSet, dwEncodingType,
|
||||
@@ -509,7 +508,7 @@ BOOL WINAPI CryptGetDefaultOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
|
||||
}
|
||||
else
|
||||
{
|
||||
struct FuncAddr *addr = *phFuncAddr;
|
||||
struct FuncAddr *addr = (struct FuncAddr *)*phFuncAddr;
|
||||
|
||||
if (!addr)
|
||||
{
|
||||
@@ -1504,11 +1503,11 @@ PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(DWORD dwKeyType, void *pvKey,
|
||||
{
|
||||
struct OIDInfo *info;
|
||||
|
||||
TRACE("CRYPT_OID_INFO_NAME_KEY: %s\n", debugstr_w(pvKey));
|
||||
TRACE("CRYPT_OID_INFO_NAME_KEY: %s\n", debugstr_w((LPWSTR)pvKey));
|
||||
EnterCriticalSection(&oidInfoCS);
|
||||
LIST_FOR_EACH_ENTRY(info, &oidInfo, struct OIDInfo, entry)
|
||||
{
|
||||
if (!lstrcmpW(info->info.pwszName, pvKey) &&
|
||||
if (!lstrcmpW(info->info.pwszName, (LPWSTR)pvKey) &&
|
||||
(!dwGroupId || info->info.dwGroupId == dwGroupId))
|
||||
{
|
||||
ret = &info->info;
|
||||
@@ -1521,7 +1520,7 @@ PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(DWORD dwKeyType, void *pvKey,
|
||||
case CRYPT_OID_INFO_OID_KEY:
|
||||
{
|
||||
struct OIDInfo *info;
|
||||
LPSTR oid = pvKey;
|
||||
LPSTR oid = (LPSTR)pvKey;
|
||||
|
||||
TRACE("CRYPT_OID_INFO_OID_KEY: %s\n", debugstr_a(oid));
|
||||
EnterCriticalSection(&oidInfoCS);
|
||||
|
@@ -43,7 +43,7 @@ typedef struct _WINE_PROVIDERSTORE
|
||||
|
||||
static void WINAPI CRYPT_ProvCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
|
||||
{
|
||||
PWINE_PROVIDERSTORE store = hCertStore;
|
||||
PWINE_PROVIDERSTORE store = (PWINE_PROVIDERSTORE)hCertStore;
|
||||
|
||||
TRACE("(%p, %08x)\n", store, dwFlags);
|
||||
|
||||
@@ -69,7 +69,7 @@ static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert,
|
||||
{
|
||||
ret = TRUE;
|
||||
if (ps->provWriteCert)
|
||||
ret = ps->provWriteCert(ps->hStoreProv, cert,
|
||||
ret = ps->provWriteCert(ps->hStoreProv, (PCCERT_CONTEXT)cert,
|
||||
CERT_STORE_PROV_WRITE_ADD_FLAG);
|
||||
if (ret)
|
||||
ret = ps->memStore->certs.addContext(ps->memStore, cert, NULL,
|
||||
@@ -135,7 +135,7 @@ static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl,
|
||||
{
|
||||
ret = TRUE;
|
||||
if (ps->provWriteCrl)
|
||||
ret = ps->provWriteCrl(ps->hStoreProv, crl,
|
||||
ret = ps->provWriteCrl(ps->hStoreProv, (PCCRL_CONTEXT)crl,
|
||||
CERT_STORE_PROV_WRITE_ADD_FLAG);
|
||||
if (ret)
|
||||
ret = ps->memStore->crls.addContext(ps->memStore, crl, NULL,
|
||||
@@ -202,7 +202,7 @@ static BOOL CRYPT_ProvAddCTL(PWINECRYPT_CERTSTORE store, void *ctl,
|
||||
{
|
||||
ret = TRUE;
|
||||
if (ps->provWriteCtl)
|
||||
ret = ps->provWriteCtl(ps->hStoreProv, ctl,
|
||||
ret = ps->provWriteCtl(ps->hStoreProv, (PCCTL_CONTEXT)ctl,
|
||||
CERT_STORE_PROV_WRITE_ADD_FLAG);
|
||||
if (ret)
|
||||
ret = ps->memStore->ctls.addContext(ps->memStore, ctl, NULL,
|
||||
@@ -250,7 +250,7 @@ static BOOL CRYPT_ProvDeleteCTL(PWINECRYPT_CERTSTORE store, void *ctl)
|
||||
static BOOL WINAPI CRYPT_ProvControl(HCERTSTORE hCertStore, DWORD dwFlags,
|
||||
DWORD dwCtrlType, void const *pvCtrlPara)
|
||||
{
|
||||
PWINE_PROVIDERSTORE store = hCertStore;
|
||||
PWINE_PROVIDERSTORE store = (PWINE_PROVIDERSTORE)hCertStore;
|
||||
BOOL ret = TRUE;
|
||||
|
||||
TRACE("(%p, %08x, %d, %p)\n", hCertStore, dwFlags, dwCtrlType,
|
||||
|
@@ -319,7 +319,7 @@ static BOOL CRYPT_RegFlushStore(PWINE_REGSTOREINFO store, BOOL force)
|
||||
|
||||
static void WINAPI CRYPT_RegCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
|
||||
{
|
||||
PWINE_REGSTOREINFO store = hCertStore;
|
||||
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %08x)\n", store, dwFlags);
|
||||
if (dwFlags)
|
||||
@@ -392,7 +392,7 @@ static BOOL CRYPT_RegDeleteContext(PWINE_REGSTOREINFO store,
|
||||
static BOOL WINAPI CRYPT_RegWriteCert(HCERTSTORE hCertStore,
|
||||
PCCERT_CONTEXT cert, DWORD dwFlags)
|
||||
{
|
||||
PWINE_REGSTOREINFO store = hCertStore;
|
||||
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %d)\n", hCertStore, cert, dwFlags);
|
||||
|
||||
@@ -402,7 +402,7 @@ static BOOL WINAPI CRYPT_RegWriteCert(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_RegDeleteCert(HCERTSTORE hCertStore,
|
||||
PCCERT_CONTEXT pCertContext, DWORD dwFlags)
|
||||
{
|
||||
PWINE_REGSTOREINFO store = hCertStore;
|
||||
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %08x)\n", store, pCertContext, dwFlags);
|
||||
|
||||
@@ -413,7 +413,7 @@ static BOOL WINAPI CRYPT_RegDeleteCert(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_RegWriteCRL(HCERTSTORE hCertStore,
|
||||
PCCRL_CONTEXT crl, DWORD dwFlags)
|
||||
{
|
||||
PWINE_REGSTOREINFO store = hCertStore;
|
||||
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %d)\n", hCertStore, crl, dwFlags);
|
||||
|
||||
@@ -423,7 +423,7 @@ static BOOL WINAPI CRYPT_RegWriteCRL(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_RegDeleteCRL(HCERTSTORE hCertStore,
|
||||
PCCRL_CONTEXT pCrlContext, DWORD dwFlags)
|
||||
{
|
||||
PWINE_REGSTOREINFO store = hCertStore;
|
||||
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %08x)\n", store, pCrlContext, dwFlags);
|
||||
|
||||
@@ -434,7 +434,7 @@ static BOOL WINAPI CRYPT_RegDeleteCRL(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_RegWriteCTL(HCERTSTORE hCertStore,
|
||||
PCCTL_CONTEXT ctl, DWORD dwFlags)
|
||||
{
|
||||
PWINE_REGSTOREINFO store = hCertStore;
|
||||
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %d)\n", hCertStore, ctl, dwFlags);
|
||||
|
||||
@@ -444,7 +444,7 @@ static BOOL WINAPI CRYPT_RegWriteCTL(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_RegDeleteCTL(HCERTSTORE hCertStore,
|
||||
PCCTL_CONTEXT pCtlContext, DWORD dwFlags)
|
||||
{
|
||||
PWINE_REGSTOREINFO store = hCertStore;
|
||||
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
|
||||
|
||||
TRACE("(%p, %p, %08x)\n", store, pCtlContext, dwFlags);
|
||||
|
||||
@@ -455,7 +455,7 @@ static BOOL WINAPI CRYPT_RegDeleteCTL(HCERTSTORE hCertStore,
|
||||
static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags,
|
||||
DWORD dwCtrlType, void const *pvCtrlPara)
|
||||
{
|
||||
PWINE_REGSTOREINFO store = hCertStore;
|
||||
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
|
||||
BOOL ret;
|
||||
|
||||
TRACE("(%p, %08x, %d, %p)\n", hCertStore, dwFlags, dwCtrlType,
|
||||
|
@@ -744,6 +744,17 @@ PWINECRYPT_CERTSTORE CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags)
|
||||
SetLastError(ERROR_ACCESS_DENIED);
|
||||
return NULL;
|
||||
}
|
||||
switch (dwFlags & CERT_SYSTEM_STORE_LOCATION_MASK)
|
||||
{
|
||||
case CERT_SYSTEM_STORE_LOCAL_MACHINE:
|
||||
case CERT_SYSTEM_STORE_CURRENT_USER:
|
||||
break;
|
||||
default:
|
||||
TRACE("location %08x unsupported\n",
|
||||
dwFlags & CERT_SYSTEM_STORE_LOCATION_MASK);
|
||||
SetLastError(E_INVALIDARG);
|
||||
return NULL;
|
||||
}
|
||||
if (!CRYPT_rootStore)
|
||||
{
|
||||
HCERTSTORE root = create_root_store();
|
||||
|
@@ -627,7 +627,7 @@ static BOOL CRYPT_WriteSerializedStoreToFile(HANDLE file, HCERTSTORE store)
|
||||
static BOOL CRYPT_SavePKCSToMem(HCERTSTORE store,
|
||||
DWORD dwMsgAndCertEncodingType, void *handle)
|
||||
{
|
||||
CERT_BLOB *blob = handle;
|
||||
CERT_BLOB *blob = (CERT_BLOB *)handle;
|
||||
CRYPT_SIGNED_INFO signedInfo = { 0 };
|
||||
PCCERT_CONTEXT cert = NULL;
|
||||
PCCRL_CONTEXT crl = NULL;
|
||||
@@ -767,7 +767,7 @@ struct MemWrittenTracker
|
||||
/* handle is a pointer to a MemWrittenTracker. Assumes its pointer is valid. */
|
||||
static BOOL CRYPT_MemOutputFunc(void *handle, const void *buffer, DWORD size)
|
||||
{
|
||||
struct MemWrittenTracker *tracker = handle;
|
||||
struct MemWrittenTracker *tracker = (struct MemWrittenTracker *)handle;
|
||||
BOOL ret;
|
||||
|
||||
if (tracker->written + size > tracker->cbData)
|
||||
@@ -797,7 +797,7 @@ static BOOL CRYPT_CountSerializedBytes(void *handle, const void *buffer,
|
||||
static BOOL CRYPT_SaveSerializedToMem(HCERTSTORE store,
|
||||
DWORD dwMsgAndCertEncodingType, void *handle)
|
||||
{
|
||||
CERT_BLOB *blob = handle;
|
||||
CERT_BLOB *blob = (CERT_BLOB *)handle;
|
||||
DWORD size = 0;
|
||||
BOOL ret;
|
||||
|
||||
@@ -833,7 +833,7 @@ BOOL WINAPI CertSaveStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType,
|
||||
{
|
||||
BOOL (*saveFunc)(HCERTSTORE, DWORD, void *);
|
||||
void *handle;
|
||||
BOOL ret, closeFile = TRUE;
|
||||
BOOL ret;
|
||||
|
||||
TRACE("(%p, %08x, %d, %d, %p, %08x)\n", hCertStore,
|
||||
dwMsgAndCertEncodingType, dwSaveAs, dwSaveTo, pvSaveToPara, dwFlags);
|
||||
@@ -841,16 +841,7 @@ BOOL WINAPI CertSaveStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType,
|
||||
switch (dwSaveAs)
|
||||
{
|
||||
case CERT_STORE_SAVE_AS_STORE:
|
||||
if (dwSaveTo == CERT_STORE_SAVE_TO_MEMORY)
|
||||
saveFunc = CRYPT_SaveSerializedToMem;
|
||||
else
|
||||
saveFunc = CRYPT_SaveSerializedToFile;
|
||||
break;
|
||||
case CERT_STORE_SAVE_AS_PKCS7:
|
||||
if (dwSaveTo == CERT_STORE_SAVE_TO_MEMORY)
|
||||
saveFunc = CRYPT_SavePKCSToMem;
|
||||
else
|
||||
saveFunc = CRYPT_SavePKCSToFile;
|
||||
break;
|
||||
default:
|
||||
WARN("unimplemented for %d\n", dwSaveAs);
|
||||
@@ -861,18 +852,25 @@ BOOL WINAPI CertSaveStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType,
|
||||
{
|
||||
case CERT_STORE_SAVE_TO_FILE:
|
||||
handle = pvSaveToPara;
|
||||
closeFile = FALSE;
|
||||
saveFunc = dwSaveAs == CERT_STORE_SAVE_AS_STORE ?
|
||||
CRYPT_SaveSerializedToFile : CRYPT_SavePKCSToFile;
|
||||
break;
|
||||
case CERT_STORE_SAVE_TO_FILENAME_A:
|
||||
handle = CreateFileA(pvSaveToPara, GENERIC_WRITE, 0, NULL,
|
||||
handle = CreateFileA((LPCSTR)pvSaveToPara, GENERIC_WRITE, 0, NULL,
|
||||
CREATE_ALWAYS, 0, NULL);
|
||||
saveFunc = dwSaveAs == CERT_STORE_SAVE_AS_STORE ?
|
||||
CRYPT_SaveSerializedToFile : CRYPT_SavePKCSToFile;
|
||||
break;
|
||||
case CERT_STORE_SAVE_TO_FILENAME_W:
|
||||
handle = CreateFileW(pvSaveToPara, GENERIC_WRITE, 0, NULL,
|
||||
handle = CreateFileW((LPCWSTR)pvSaveToPara, GENERIC_WRITE, 0, NULL,
|
||||
CREATE_ALWAYS, 0, NULL);
|
||||
saveFunc = dwSaveAs == CERT_STORE_SAVE_AS_STORE ?
|
||||
CRYPT_SaveSerializedToFile : CRYPT_SavePKCSToFile;
|
||||
break;
|
||||
case CERT_STORE_SAVE_TO_MEMORY:
|
||||
handle = pvSaveToPara;
|
||||
saveFunc = dwSaveAs == CERT_STORE_SAVE_AS_STORE ?
|
||||
CRYPT_SaveSerializedToMem : CRYPT_SavePKCSToMem;
|
||||
break;
|
||||
default:
|
||||
WARN("unimplemented for %d\n", dwSaveTo);
|
||||
@@ -880,8 +878,6 @@ BOOL WINAPI CertSaveStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType,
|
||||
return FALSE;
|
||||
}
|
||||
ret = saveFunc(hCertStore, dwMsgAndCertEncodingType, handle);
|
||||
if (closeFile)
|
||||
CloseHandle(handle);
|
||||
TRACE("returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
@@ -273,7 +273,7 @@ static BOOL CRYPT_MemDeleteCtl(PWINECRYPT_CERTSTORE store, void *pCtlContext)
|
||||
|
||||
static void WINAPI CRYPT_MemCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
|
||||
{
|
||||
WINE_MEMSTORE *store = hCertStore;
|
||||
WINE_MEMSTORE *store = (WINE_MEMSTORE *)hCertStore;
|
||||
|
||||
TRACE("(%p, %08x)\n", store, dwFlags);
|
||||
if (dwFlags)
|
||||
@@ -329,34 +329,26 @@ static WINECRYPT_CERTSTORE *CRYPT_MemOpenStore(HCRYPTPROV hCryptProv,
|
||||
return (PWINECRYPT_CERTSTORE)store;
|
||||
}
|
||||
|
||||
static const WCHAR rootW[] = { 'R','o','o','t',0 };
|
||||
|
||||
static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv,
|
||||
DWORD dwFlags, const void *pvPara)
|
||||
{
|
||||
static const WCHAR rootW[] = { 'R','o','o','t',0 };
|
||||
static const WCHAR fmt[] = { '%','s','\\','%','s',0 };
|
||||
LPCWSTR storeName = pvPara;
|
||||
LPCWSTR storeName = (LPCWSTR)pvPara;
|
||||
LPWSTR storePath;
|
||||
PWINECRYPT_CERTSTORE store = NULL;
|
||||
HKEY root;
|
||||
LPCWSTR base;
|
||||
|
||||
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
|
||||
debugstr_w(pvPara));
|
||||
debugstr_w((LPCWSTR)pvPara));
|
||||
|
||||
if (!pvPara)
|
||||
{
|
||||
SetLastError(E_INVALIDARG);
|
||||
return NULL;
|
||||
}
|
||||
/* FIXME: In Windows, the root store (even the current user location) is
|
||||
* protected: adding to it or removing from it present a user interface,
|
||||
* and the keys are owned by the system process, not the current user.
|
||||
* Wine's registry doesn't implement access controls, so a similar
|
||||
* mechanism isn't possible yet.
|
||||
*/
|
||||
if ((dwFlags & CERT_SYSTEM_STORE_LOCATION_MASK) ==
|
||||
CERT_SYSTEM_STORE_LOCAL_MACHINE && !lstrcmpiW(storeName, rootW))
|
||||
if (!lstrcmpiW(storeName, rootW))
|
||||
return CRYPT_RootOpenStore(hCryptProv, dwFlags);
|
||||
|
||||
switch (dwFlags & CERT_SYSTEM_STORE_LOCATION_MASK)
|
||||
@@ -450,21 +442,21 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreA(HCRYPTPROV hCryptProv,
|
||||
PWINECRYPT_CERTSTORE ret = NULL;
|
||||
|
||||
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
|
||||
debugstr_a(pvPara));
|
||||
debugstr_a((LPCSTR)pvPara));
|
||||
|
||||
if (!pvPara)
|
||||
{
|
||||
SetLastError(ERROR_FILE_NOT_FOUND);
|
||||
return NULL;
|
||||
}
|
||||
len = MultiByteToWideChar(CP_ACP, 0, pvPara, -1, NULL, 0);
|
||||
len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, NULL, 0);
|
||||
if (len)
|
||||
{
|
||||
LPWSTR storeName = CryptMemAlloc(len * sizeof(WCHAR));
|
||||
|
||||
if (storeName)
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, 0, pvPara, -1, storeName, len);
|
||||
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, storeName, len);
|
||||
ret = CRYPT_SysRegOpenStoreW(hCryptProv, dwFlags, storeName);
|
||||
CryptMemFree(storeName);
|
||||
}
|
||||
@@ -479,7 +471,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
|
||||
BOOL ret;
|
||||
|
||||
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
|
||||
debugstr_w(pvPara));
|
||||
debugstr_w((LPCWSTR)pvPara));
|
||||
|
||||
if (!pvPara)
|
||||
{
|
||||
@@ -541,7 +533,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
|
||||
CryptReleaseContext(hCryptProv, 0);
|
||||
}
|
||||
}
|
||||
return store;
|
||||
return (PWINECRYPT_CERTSTORE)store;
|
||||
}
|
||||
|
||||
static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv,
|
||||
@@ -551,21 +543,21 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv,
|
||||
PWINECRYPT_CERTSTORE ret = NULL;
|
||||
|
||||
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
|
||||
debugstr_a(pvPara));
|
||||
debugstr_a((LPCSTR)pvPara));
|
||||
|
||||
if (!pvPara)
|
||||
{
|
||||
SetLastError(ERROR_FILE_NOT_FOUND);
|
||||
return NULL;
|
||||
}
|
||||
len = MultiByteToWideChar(CP_ACP, 0, pvPara, -1, NULL, 0);
|
||||
len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, NULL, 0);
|
||||
if (len)
|
||||
{
|
||||
LPWSTR storeName = CryptMemAlloc(len * sizeof(WCHAR));
|
||||
|
||||
if (storeName)
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, 0, pvPara, -1, storeName, len);
|
||||
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, storeName, len);
|
||||
ret = CRYPT_SysOpenStoreW(hCryptProv, dwFlags, storeName);
|
||||
CryptMemFree(storeName);
|
||||
}
|
||||
@@ -669,7 +661,7 @@ static PWINECRYPT_CERTSTORE CRYPT_PKCSOpenStore(HCRYPTPROV hCryptProv,
|
||||
{
|
||||
HCRYPTMSG msg;
|
||||
PWINECRYPT_CERTSTORE store = NULL;
|
||||
const CRYPT_DATA_BLOB *data = pvPara;
|
||||
const CRYPT_DATA_BLOB *data = (const CRYPT_DATA_BLOB *)pvPara;
|
||||
BOOL ret;
|
||||
DWORD msgOpenFlags = dwFlags & CERT_STORE_NO_CRYPT_RELEASE_FLAG ? 0 :
|
||||
CMSG_CRYPT_RELEASE_CONTEXT_FLAG;
|
||||
@@ -712,7 +704,7 @@ static PWINECRYPT_CERTSTORE CRYPT_PhysOpenStoreW(HCRYPTPROV hCryptProv,
|
||||
FIXME("(%ld, %08x, %p): stub\n", hCryptProv, dwFlags, pvPara);
|
||||
else
|
||||
FIXME("(%ld, %08x, %s): stub\n", hCryptProv, dwFlags,
|
||||
debugstr_w(pvPara));
|
||||
debugstr_w((LPCWSTR)pvPara));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -795,7 +787,7 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider,
|
||||
hCryptProv, dwFlags, pvPara);
|
||||
else
|
||||
hcs = openFunc(hCryptProv, dwFlags, pvPara);
|
||||
return hcs;
|
||||
return (HCERTSTORE)hcs;
|
||||
}
|
||||
|
||||
HCERTSTORE WINAPI CertOpenSystemStoreA(HCRYPTPROV_LEGACY hProv,
|
||||
@@ -829,7 +821,7 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
|
||||
PCCERT_CONTEXT pCertContext, DWORD dwAddDisposition,
|
||||
PCCERT_CONTEXT *ppStoreContext)
|
||||
{
|
||||
PWINECRYPT_CERTSTORE store = hCertStore;
|
||||
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore;
|
||||
BOOL ret = TRUE;
|
||||
PCCERT_CONTEXT toAdd = NULL, existing = NULL;
|
||||
|
||||
@@ -944,7 +936,7 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
|
||||
PCCERT_CONTEXT WINAPI CertEnumCertificatesInStore(HCERTSTORE hCertStore,
|
||||
PCCERT_CONTEXT pPrev)
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = hCertStore;
|
||||
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;
|
||||
PCCERT_CONTEXT ret;
|
||||
|
||||
TRACE("(%p, %p)\n", hCertStore, pPrev);
|
||||
@@ -972,7 +964,8 @@ BOOL WINAPI CertDeleteCertificateFromStore(PCCERT_CONTEXT pCertContext)
|
||||
}
|
||||
else
|
||||
{
|
||||
PWINECRYPT_CERTSTORE hcs = pCertContext->hCertStore;
|
||||
PWINECRYPT_CERTSTORE hcs =
|
||||
(PWINECRYPT_CERTSTORE)pCertContext->hCertStore;
|
||||
|
||||
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
|
||||
ret = FALSE;
|
||||
@@ -990,7 +983,7 @@ BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
|
||||
PCCRL_CONTEXT pCrlContext, DWORD dwAddDisposition,
|
||||
PCCRL_CONTEXT* ppStoreContext)
|
||||
{
|
||||
PWINECRYPT_CERTSTORE store = hCertStore;
|
||||
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore;
|
||||
BOOL ret = TRUE;
|
||||
PCCRL_CONTEXT toAdd = NULL, existing = NULL;
|
||||
|
||||
@@ -1110,7 +1103,8 @@ BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
|
||||
}
|
||||
else
|
||||
{
|
||||
PWINECRYPT_CERTSTORE hcs = pCrlContext->hCertStore;
|
||||
PWINECRYPT_CERTSTORE hcs =
|
||||
(PWINECRYPT_CERTSTORE)pCrlContext->hCertStore;
|
||||
|
||||
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
|
||||
ret = FALSE;
|
||||
@@ -1124,7 +1118,7 @@ BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
|
||||
PCCRL_CONTEXT WINAPI CertEnumCRLsInStore(HCERTSTORE hCertStore,
|
||||
PCCRL_CONTEXT pPrev)
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = hCertStore;
|
||||
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;
|
||||
PCCRL_CONTEXT ret;
|
||||
|
||||
TRACE("(%p, %p)\n", hCertStore, pPrev);
|
||||
@@ -1139,7 +1133,7 @@ PCCRL_CONTEXT WINAPI CertEnumCRLsInStore(HCERTSTORE hCertStore,
|
||||
|
||||
HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = hCertStore;
|
||||
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;
|
||||
|
||||
TRACE("(%p)\n", hCertStore);
|
||||
|
||||
@@ -1150,7 +1144,7 @@ HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
|
||||
|
||||
BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = hCertStore;
|
||||
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *) hCertStore;
|
||||
|
||||
TRACE("(%p, %08x)\n", hCertStore, dwFlags);
|
||||
|
||||
@@ -1174,7 +1168,7 @@ BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
|
||||
BOOL WINAPI CertControlStore(HCERTSTORE hCertStore, DWORD dwFlags,
|
||||
DWORD dwCtrlType, void const *pvCtrlPara)
|
||||
{
|
||||
WINECRYPT_CERTSTORE *hcs = hCertStore;
|
||||
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;
|
||||
BOOL ret;
|
||||
|
||||
TRACE("(%p, %08x, %d, %p)\n", hCertStore, dwFlags, dwCtrlType,
|
||||
@@ -1197,7 +1191,7 @@ BOOL WINAPI CertControlStore(HCERTSTORE hCertStore, DWORD dwFlags,
|
||||
BOOL WINAPI CertGetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
|
||||
void *pvData, DWORD *pcbData)
|
||||
{
|
||||
PWINECRYPT_CERTSTORE store = hCertStore;
|
||||
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("(%p, %d, %p, %p)\n", hCertStore, dwPropId, pvData, pcbData);
|
||||
@@ -1261,7 +1255,7 @@ BOOL WINAPI CertGetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
|
||||
BOOL WINAPI CertSetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
|
||||
DWORD dwFlags, const void *pvData)
|
||||
{
|
||||
PWINECRYPT_CERTSTORE store = hCertStore;
|
||||
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("(%p, %d, %08x, %p)\n", hCertStore, dwPropId, dwFlags, pvData);
|
||||
@@ -1276,7 +1270,7 @@ BOOL WINAPI CertSetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
|
||||
default:
|
||||
if (pvData)
|
||||
{
|
||||
const CRYPT_DATA_BLOB *blob = pvData;
|
||||
const CRYPT_DATA_BLOB *blob = (const CRYPT_DATA_BLOB *)pvData;
|
||||
|
||||
ret = ContextPropertyList_SetProperty(store->properties, dwPropId,
|
||||
blob->pbData, blob->cbData);
|
||||
@@ -1349,7 +1343,6 @@ BOOL WINAPI CertEnumSystemStore(DWORD dwFlags, void *pvSystemStoreLocationPara,
|
||||
BOOL ret = FALSE;
|
||||
LONG rc;
|
||||
HKEY key;
|
||||
CERT_SYSTEM_STORE_INFO info = { sizeof(info) };
|
||||
|
||||
TRACE("(%08x, %p, %p, %p)\n", dwFlags, pvSystemStoreLocationPara, pvArg,
|
||||
pfnEnum);
|
||||
@@ -1358,6 +1351,7 @@ BOOL WINAPI CertEnumSystemStore(DWORD dwFlags, void *pvSystemStoreLocationPara,
|
||||
if (!rc)
|
||||
{
|
||||
DWORD index = 0;
|
||||
CERT_SYSTEM_STORE_INFO info = { sizeof(info) };
|
||||
|
||||
ret = TRUE;
|
||||
do {
|
||||
@@ -1374,12 +1368,6 @@ BOOL WINAPI CertEnumSystemStore(DWORD dwFlags, void *pvSystemStoreLocationPara,
|
||||
}
|
||||
else
|
||||
SetLastError(rc);
|
||||
/* Include root store for the local machine location (it isn't in the
|
||||
* registry)
|
||||
*/
|
||||
if (ret && (dwFlags & CERT_SYSTEM_STORE_LOCATION_MASK) ==
|
||||
CERT_SYSTEM_STORE_LOCAL_MACHINE)
|
||||
ret = pfnEnum(rootW, dwFlags, &info, NULL, pvArg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1390,7 +1378,7 @@ BOOL WINAPI CertEnumPhysicalStore(const void *pvSystemStore, DWORD dwFlags,
|
||||
FIXME("(%p, %08x, %p, %p): stub\n", pvSystemStore, dwFlags, pvArg,
|
||||
pfnEnum);
|
||||
else
|
||||
FIXME("(%s, %08x, %p, %p): stub\n", debugstr_w(pvSystemStore),
|
||||
FIXME("(%s, %08x, %p, %p): stub\n", debugstr_w((LPCWSTR)pvSystemStore),
|
||||
dwFlags, pvArg,
|
||||
pfnEnum);
|
||||
return FALSE;
|
||||
|
@@ -25,4 +25,3 @@
|
||||
#include "cryptdlg_En.rc"
|
||||
#include "cryptdlg_Fr.rc"
|
||||
#include "cryptdlg_Ko.rc"
|
||||
#include "cryptdlg_Nl.rc"
|
||||
|
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* cryptdlg dll Dutch resources
|
||||
*
|
||||
* Copyright 2009 Frans Kool
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CERT_POLICY "Certificaat beleid"
|
||||
IDS_POLICY_ID "Beleid Identificatie: "
|
||||
IDS_POLICY_QUALIFIER_INFO "Beleid kwalificator informatie"
|
||||
IDS_POLICY_QUALIFIER_ID "Beleid kwalificator Id="
|
||||
IDS_CPS "CPS"
|
||||
IDS_USER_NOTICE "Gebruikers verklaring"
|
||||
IDS_QUALIFIER "Kwalificator"
|
||||
IDS_NOTICE_REF "Verklaring referentie"
|
||||
IDS_ORGANIZATION "Organisatie="
|
||||
IDS_NOTICE_NUM "Verklaring nummer="
|
||||
IDS_NOTICE_TEXT "Verklaring tekst="
|
||||
}
|
@@ -31,7 +31,7 @@
|
||||
31 stub CryptUIWizCertRequest
|
||||
32 stub CryptUIWizCreateCertRequestNoDS
|
||||
33 stub CryptUIWizDigitalSign
|
||||
34 stdcall CryptUIWizExport(long ptr wstr ptr ptr)
|
||||
34 stub CryptUIWizExport
|
||||
35 stub CryptUIWizFreeCertRequestNoDS
|
||||
36 stub CryptUIWizFreeDigitalSignContext
|
||||
37 stdcall CryptUIWizImport(long ptr wstr ptr ptr)
|
||||
|
@@ -141,26 +141,6 @@ STRINGTABLE DISCARDABLE
|
||||
IDS_PURPOSE_CA_EXCHANGE "Private Key Archival"
|
||||
IDS_PURPOSE_KEY_RECOVERY_AGENT "Key Recovery Agent"
|
||||
IDS_PURPOSE_DS_EMAIL_REPLICATION "Directory Service Email Replication"
|
||||
IDS_EXPORT_WIZARD "Certificate Export Wizard"
|
||||
IDS_EXPORT_FORMAT_TITLE "Export Format"
|
||||
IDS_EXPORT_FORMAT_SUBTITLE "Choose the format in which the content will be saved."
|
||||
IDS_EXPORT_FILE_TITLE "Export Filename"
|
||||
IDS_EXPORT_FILE_SUBTITLE "Specify the name of the file in which the content will be saved."
|
||||
IDS_EXPORT_FILE_EXISTS "The specified file already exists. Do you want to replace it?"
|
||||
IDS_EXPORT_FILTER_CERT "DER-Encoded Binary X.509 (*.cer)"
|
||||
IDS_EXPORT_FILTER_BASE64_CERT "Base64-Encoded X.509 (*.cer)"
|
||||
IDS_EXPORT_FILTER_CRL "Certificate Revocation List (*.crl)"
|
||||
IDS_EXPORT_FILTER_CTL "Certificate Trust List (*.stl)"
|
||||
IDS_EXPORT_FILTER_CMS "CMS/PKCS #7 Messages (*.p7b)"
|
||||
IDS_EXPORT_FILTER_PFX "Personal Information Exchange (*.pfx)"
|
||||
IDS_EXPORT_FILTER_SERIALIZED_CERT_STORE "Serialized Certificate Store (*.sst)"
|
||||
IDS_EXPORT_FORMAT "File Format"
|
||||
IDS_EXPORT_INCLUDE_CHAIN "Include all certificates in certificate path"
|
||||
IDS_EXPORT_KEYS "Export keys"
|
||||
IDS_YES "Yes"
|
||||
IDS_NO "No"
|
||||
IDS_EXPORT_SUCCEEDED "The export was successful."
|
||||
IDS_EXPORT_FAILED "The export failed."
|
||||
}
|
||||
|
||||
IDD_GENERAL DIALOG DISCARDABLE 0, 0, 255, 236
|
||||
@@ -366,66 +346,3 @@ BEGIN
|
||||
PUSHBUTTON "OK", IDOK, 132,155,51,14, BS_DEFPUSHBUTTON
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 190,155,51,14
|
||||
END
|
||||
|
||||
IDD_EXPORT_WELCOME DIALOG DISCARDABLE 0,0,317,143
|
||||
CAPTION "Certificate Export Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Welcome to the Certificate Export Wizard", IDC_EXPORT_TITLE,
|
||||
115,1,195,40
|
||||
LTEXT "This wizard helps you export certificates, certificate revocation lists, and certificate trust lists from a certificate store to a file.",
|
||||
-1, 115,33,195,16
|
||||
LTEXT "A certificate can be used to identify you or the computer with which you are communicating. It can also be used for authentication, and to sign messages. Certificate stores are collections of certificates, certificate revocation lists, and certificate trust lists.",
|
||||
-1, 115,56,195,40
|
||||
LTEXT "To continue, click Next.",
|
||||
-1, 115,103,195,8
|
||||
END
|
||||
|
||||
IDD_EXPORT_FORMAT DIALOG DISCARDABLE 0,0,317,143
|
||||
CAPTION "Certificate Export Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Select the format you want to use:", -1, 21,1,195,10
|
||||
AUTORADIOBUTTON "&DER-encoded X.509 (.cer)",
|
||||
IDC_EXPORT_FORMAT_DER, 31,18,200,12, BS_AUTORADIOBUTTON|WS_TABSTOP
|
||||
AUTORADIOBUTTON "Ba&se64-encoded X.509 (.cer):",
|
||||
IDC_EXPORT_FORMAT_BASE64, 31,30,200,12, BS_AUTORADIOBUTTON
|
||||
AUTORADIOBUTTON "&Cryptographic Message Syntax Standard/PKCS #7 Message (.p7b)",
|
||||
IDC_EXPORT_FORMAT_CMS, 31,42,200,12, BS_AUTORADIOBUTTON
|
||||
CHECKBOX "&Include all certificates in the certification path if possible",
|
||||
IDC_EXPORT_CMS_INCLUDE_CHAIN, 44,57,200,8, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED
|
||||
AUTORADIOBUTTON "&Personal Information Exchange/PKCS #12 (.pfx)",
|
||||
IDC_EXPORT_FORMAT_PFX, 31,72,200,12, BS_AUTORADIOBUTTON|WS_DISABLED
|
||||
CHECKBOX "Incl&ude all certificates in the certification path if possible",
|
||||
IDC_EXPORT_PFX_INCLUDE_CHAIN, 44,87,200,8, BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED
|
||||
CHECKBOX "&Enable strong encryption",
|
||||
IDC_EXPORT_PFX_STRONG_ENCRYPTION, 44,102,200,8,
|
||||
BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED
|
||||
CHECKBOX "Delete the private &key if the export is successful",
|
||||
IDC_EXPORT_PFX_DELETE_PRIVATE_KEY, 44,117,200,8,
|
||||
BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED
|
||||
END
|
||||
|
||||
IDD_EXPORT_FILE DIALOG DISCARDABLE 0,0,317,143
|
||||
CAPTION "Certificate Export Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "&File name:", -1, 21,1,195,10
|
||||
EDITTEXT IDC_EXPORT_FILENAME, 21,11,208,14, ES_AUTOHSCROLL|WS_TABSTOP
|
||||
PUSHBUTTON "B&rowse...", IDC_EXPORT_BROWSE_FILE, 236,11,60,14
|
||||
END
|
||||
|
||||
IDD_EXPORT_FINISH DIALOG DISCARDABLE 0,0,317,143
|
||||
CAPTION "Certificate Export Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Completing the Certificate Export Wizard", IDC_EXPORT_TITLE,
|
||||
115,1,195,40
|
||||
LTEXT "You have successfully completed the Certificate Export Wizard.",
|
||||
-1, 115,33,195,24
|
||||
LTEXT "You have specified the following settings:",
|
||||
-1, 115,57,195,12
|
||||
CONTROL "", IDC_EXPORT_SETTINGS, "SysListView32",
|
||||
LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER,
|
||||
115,67,174,100
|
||||
END
|
||||
|
@@ -140,27 +140,6 @@
|
||||
#define IDS_PURPOSE_KEY_RECOVERY_AGENT 1124
|
||||
#define IDS_PURPOSE_DS_EMAIL_REPLICATION 1125
|
||||
|
||||
#define IDS_EXPORT_WIZARD 1200
|
||||
#define IDS_EXPORT_FORMAT_TITLE 1201
|
||||
#define IDS_EXPORT_FORMAT_SUBTITLE 1202
|
||||
#define IDS_EXPORT_FILE_TITLE 1203
|
||||
#define IDS_EXPORT_FILE_SUBTITLE 1204
|
||||
#define IDS_EXPORT_FILE_EXISTS 1205
|
||||
#define IDS_EXPORT_FILTER_CERT 1206
|
||||
#define IDS_EXPORT_FILTER_BASE64_CERT 1207
|
||||
#define IDS_EXPORT_FILTER_CRL 1208
|
||||
#define IDS_EXPORT_FILTER_CTL 1209
|
||||
#define IDS_EXPORT_FILTER_CMS 1210
|
||||
#define IDS_EXPORT_FILTER_PFX 1211
|
||||
#define IDS_EXPORT_FILTER_SERIALIZED_CERT_STORE 1212
|
||||
#define IDS_EXPORT_FORMAT 1213
|
||||
#define IDS_EXPORT_INCLUDE_CHAIN 1214
|
||||
#define IDS_EXPORT_KEYS 1215
|
||||
#define IDS_YES 1216
|
||||
#define IDS_NO 1217
|
||||
#define IDS_EXPORT_SUCCEEDED 1218
|
||||
#define IDS_EXPORT_FAILED 1219
|
||||
|
||||
#define IDD_GENERAL 100
|
||||
#define IDD_DETAIL 101
|
||||
#define IDD_HIERARCHY 102
|
||||
@@ -174,10 +153,6 @@
|
||||
#define IDD_IMPORT_FINISH 110
|
||||
#define IDD_CERT_MGR 111
|
||||
#define IDD_CERT_MGR_ADVANCED 112
|
||||
#define IDD_EXPORT_WELCOME 113
|
||||
#define IDD_EXPORT_FORMAT 114
|
||||
#define IDD_EXPORT_FILE 115
|
||||
#define IDD_EXPORT_FINISH 116
|
||||
|
||||
#define IDB_SMALL_ICONS 200
|
||||
#define IDB_CERT 201
|
||||
@@ -241,17 +216,4 @@
|
||||
#define IDC_MGR_PURPOSES 2807
|
||||
#define IDC_MGR_VIEW 2808
|
||||
|
||||
#define IDC_EXPORT_TITLE 2900
|
||||
#define IDC_EXPORT_FORMAT_DER 2901
|
||||
#define IDC_EXPORT_FORMAT_BASE64 2902
|
||||
#define IDC_EXPORT_FORMAT_CMS 2903
|
||||
#define IDC_EXPORT_FORMAT_PFX 2904
|
||||
#define IDC_EXPORT_CMS_INCLUDE_CHAIN 2905
|
||||
#define IDC_EXPORT_PFX_INCLUDE_CHAIN 2906
|
||||
#define IDC_EXPORT_PFX_STRONG_ENCRYPTION 2907
|
||||
#define IDC_EXPORT_PFX_DELETE_PRIVATE_KEY 2908
|
||||
#define IDC_EXPORT_FILENAME 2909
|
||||
#define IDC_EXPORT_BROWSE_FILE 2910
|
||||
#define IDC_EXPORT_SETTINGS 2911
|
||||
|
||||
#endif /* ndef __CRYPTUIRES_H_ */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@
|
||||
@ stub DwmDefWindowProc
|
||||
@ stub DwmDetachMilContent
|
||||
@ stub DwmEnableBlurBehindWindow
|
||||
@ stdcall DwmEnableMMCSS(long)
|
||||
@ stub DwmEnableMMCSS
|
||||
@ stdcall DwmExtendFrameIntoClientArea(long ptr)
|
||||
@ stdcall DwmFlush()
|
||||
@ stdcall DwmGetColorizationColor(ptr long)
|
||||
|
@@ -93,7 +93,7 @@ HRESULT WINAPI DwmGetColorizationColor(DWORD *colorization, BOOL opaque_blend)
|
||||
/**********************************************************************
|
||||
* DwmFlush (DWMAPI.@)
|
||||
*/
|
||||
HRESULT WINAPI DwmFlush(void)
|
||||
HRESULT WINAPI DwmFlush()
|
||||
{
|
||||
FIXME("() stub\n");
|
||||
|
||||
@@ -119,13 +119,3 @@ HRESULT WINAPI DwmUnregisterThumbnail(HTHUMBNAIL thumbnail)
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* DwmEnableMMCSS (DWMAPI.@)
|
||||
*/
|
||||
HRESULT WINAPI DwmEnableMMCSS(BOOL enableMMCSS)
|
||||
{
|
||||
FIXME("(%d) stub\n", enableMMCSS);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@@ -327,6 +327,7 @@ SetViewportExtEx(HDC hdc,
|
||||
int nYExtent,
|
||||
LPSIZE lpSize)
|
||||
{
|
||||
#if 0
|
||||
PDC_ATTR Dc_Attr;
|
||||
#if 0
|
||||
if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)
|
||||
@@ -348,23 +349,20 @@ SetViewportExtEx(HDC hdc,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE;
|
||||
|
||||
if (lpSize)
|
||||
{
|
||||
lpSize->cx = Dc_Attr->szlViewportExt.cx;
|
||||
lpSize->cy = Dc_Attr->szlViewportExt.cy;
|
||||
lpSize->cx = Dc_Attr->szlWindowExt.cx;
|
||||
lpSize->cy = Dc_Attr->szlWindowExt.cy;
|
||||
}
|
||||
|
||||
if ((Dc_Attr->szlViewportExt.cx == nXExtent) && (Dc_Attr->szlViewportExt.cy == nYExtent))
|
||||
if ((Dc_Attr->ptlWindowExt.cx == nXExtent) && (Dc_Attr->ptlWindowExt.cy == nYExtent))
|
||||
return TRUE;
|
||||
|
||||
if ((Dc_Attr->iMapMode == MM_ISOTROPIC) || (Dc_Attr->iMapMode == MM_ANISOTROPIC))
|
||||
if ((Dc_Attr->iMapMode == MM_ISOTROPIC) && (Dc_Attr->iMapMode == MM_ANISOTROPIC))
|
||||
{
|
||||
if (NtCurrentTeb()->GdiTebBatch.HDC == hdc)
|
||||
if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hdc)
|
||||
{
|
||||
if (Dc_Attr->ulDirty_ & DC_FONTTEXT_DIRTY)
|
||||
{
|
||||
@@ -372,12 +370,14 @@ SetViewportExtEx(HDC hdc,
|
||||
Dc_Attr->ulDirty_ &= ~(DC_MODE_DIRTY|DC_FONTTEXT_DIRTY);
|
||||
}
|
||||
}
|
||||
Dc_Attr->szlViewportExt.cx = nXExtent;
|
||||
Dc_Attr->szlViewportExt.cy = nYExtent;
|
||||
Dc_Attr->szlWindowExt.cx = nXExtent;
|
||||
Dc_Attr->szlWindowExt.cy = nYExtent;
|
||||
if (Dc_Attr->dwLayout & LAYOUT_RTL) NtGdiMirrorWindowOrg(hdc);
|
||||
Dc_Attr->flXform |= (PAGE_EXTENTS_CHANGED|INVALIDATE_ATTRIBUTES|DEVICE_TO_WORLD_INVALID);
|
||||
}
|
||||
return TRUE;
|
||||
#endif
|
||||
return NtGdiSetViewportExtEx(hdc, nXExtent, nYExtent, lpSize);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -452,6 +452,7 @@ SetWindowExtEx(HDC hdc,
|
||||
int nYExtent,
|
||||
LPSIZE lpSize)
|
||||
{
|
||||
#if 0
|
||||
PDC_ATTR Dc_Attr;
|
||||
#if 0
|
||||
if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)
|
||||
@@ -487,14 +488,14 @@ SetWindowExtEx(HDC hdc,
|
||||
NtGdiMirrorWindowOrg(hdc);
|
||||
Dc_Attr->flXform |= (PAGE_EXTENTS_CHANGED|INVALIDATE_ATTRIBUTES|DEVICE_TO_WORLD_INVALID);
|
||||
}
|
||||
else if ((Dc_Attr->iMapMode == MM_ISOTROPIC) || (Dc_Attr->iMapMode == MM_ANISOTROPIC))
|
||||
else if ((Dc_Attr->iMapMode == MM_ISOTROPIC) && (Dc_Attr->iMapMode == MM_ANISOTROPIC))
|
||||
{
|
||||
if ((Dc_Attr->szlWindowExt.cx == nXExtent) && (Dc_Attr->szlWindowExt.cy == nYExtent))
|
||||
return TRUE;
|
||||
|
||||
if ((!nXExtent) || (!nYExtent)) return FALSE;
|
||||
if ((!nXExtent) && (!nYExtent)) return FALSE;
|
||||
|
||||
if (NtCurrentTeb()->GdiTebBatch.HDC == hdc)
|
||||
if (NtCurrentTeb()->GdiTebBatch.HDC == (ULONG)hdc)
|
||||
{
|
||||
if (Dc_Attr->ulDirty_ & DC_FONTTEXT_DIRTY)
|
||||
{
|
||||
@@ -508,6 +509,8 @@ SetWindowExtEx(HDC hdc,
|
||||
Dc_Attr->flXform |= (PAGE_EXTENTS_CHANGED|INVALIDATE_ATTRIBUTES|DEVICE_TO_WORLD_INVALID);
|
||||
}
|
||||
return TRUE; // Return TRUE.
|
||||
#endif
|
||||
return NtGdiSetWindowExtEx(hdc, nXExtent, nYExtent, lpSize);
|
||||
}
|
||||
|
||||
/*
|
||||
|
60
reactos/dll/win32/glu32/glu32.def
Normal file
60
reactos/dll/win32/glu32/glu32.def
Normal file
@@ -0,0 +1,60 @@
|
||||
EXPORTS
|
||||
gluBeginCurve@4
|
||||
gluBeginPolygon@4
|
||||
gluBeginSurface@4
|
||||
gluBeginTrim@4
|
||||
gluBuild1DMipmapLevels@36
|
||||
gluBuild1DMipmaps@24
|
||||
gluBuild2DMipmapLevels@40
|
||||
gluBuild2DMipmaps@28
|
||||
gluBuild3DMipmapLevels@44
|
||||
gluBuild3DMipmaps@32
|
||||
gluCheckExtension@8
|
||||
gluCylinder@36
|
||||
gluDeleteNurbsRenderer@4
|
||||
gluDeleteQuadric@4
|
||||
gluDeleteTess@4
|
||||
gluDisk@28
|
||||
gluEndCurve@4
|
||||
gluEndPolygon@4
|
||||
gluEndSurface@4
|
||||
gluEndTrim@4
|
||||
gluErrorString@4
|
||||
gluGetNurbsProperty@12
|
||||
gluGetString@4
|
||||
gluGetTessProperty@12
|
||||
gluLoadSamplingMatrices@16
|
||||
gluLookAt@72
|
||||
gluNewNurbsRenderer@0
|
||||
gluNewQuadric@0
|
||||
gluNewTess@0
|
||||
gluNextContour@8
|
||||
gluNurbsCallback@12
|
||||
gluNurbsCallbackData@8
|
||||
gluNurbsCallbackDataEXT@8
|
||||
gluNurbsCurve@28
|
||||
gluNurbsProperty@12
|
||||
gluNurbsSurface@44
|
||||
gluOrtho2D@32
|
||||
gluPartialDisk@44
|
||||
gluPerspective@32
|
||||
gluPickMatrix@36
|
||||
gluProject@48
|
||||
gluPwlCurve@20
|
||||
gluQuadricCallback@12
|
||||
gluQuadricDrawStyle@8
|
||||
gluQuadricNormals@8
|
||||
gluQuadricOrientation@8
|
||||
gluQuadricTexture@8
|
||||
gluScaleImage@36
|
||||
gluSphere@20
|
||||
gluTessBeginContour@4
|
||||
gluTessBeginPolygon@8
|
||||
gluTessCallback@12
|
||||
gluTessEndContour@4
|
||||
gluTessEndPolygon@4
|
||||
gluTessNormal@28
|
||||
gluTessProperty@16
|
||||
gluTessVertex@12
|
||||
gluUnProject@48
|
||||
gluUnProject4@76
|
@@ -1,5 +1,5 @@
|
||||
<module name="glu32" type="win32dll" entrypoint="0" baseaddress="${BASEADDRESS_GLU32}" installbase="system32" installname="glu32.dll" allowwarnings="true" crt="msvcrt">
|
||||
<importlibrary definition="glu32.spec" />
|
||||
<importlibrary definition="glu32.def" />
|
||||
<include base="glu32">include</include>
|
||||
<include base="glu32">libnurbs/internals</include>
|
||||
<include base="glu32">libnurbs/interface</include>
|
||||
|
@@ -1,59 +0,0 @@
|
||||
@ stdcall gluBeginCurve(ptr)
|
||||
@ stdcall gluBeginPolygon(ptr)
|
||||
@ stdcall gluBeginSurface(ptr)
|
||||
@ stdcall gluBeginTrim(ptr)
|
||||
@ stdcall gluBuild1DMipmapLevels(long long long long long long long long ptr)
|
||||
@ stdcall gluBuild1DMipmaps(long long long long long ptr)
|
||||
@ stdcall gluBuild2DMipmapLevels(long long long long long long long long long ptr)
|
||||
@ stdcall gluBuild2DMipmaps(long long long long long long ptr)
|
||||
@ stdcall gluBuild3DMipmapLevels(long long long long long long long long long long ptr)
|
||||
@ stdcall gluBuild3DMipmaps(long long long long long long long ptr)
|
||||
@ stdcall gluCheckExtension(str ptr)
|
||||
@ stdcall gluCylinder(ptr double double double long long)
|
||||
@ stdcall gluDeleteNurbsRenderer(ptr)
|
||||
@ stdcall gluDeleteQuadric(ptr)
|
||||
@ stdcall gluDeleteTess(ptr)
|
||||
@ stdcall gluDisk(ptr double double long long)
|
||||
@ stdcall gluEndCurve(ptr)
|
||||
@ stdcall gluEndPolygon(ptr)
|
||||
@ stdcall gluEndSurface(ptr)
|
||||
@ stdcall gluEndTrim(ptr)
|
||||
@ stdcall gluErrorString(long)
|
||||
@ stdcall gluGetNurbsProperty(ptr long ptr)
|
||||
@ stdcall gluGetString(long)
|
||||
@ stdcall gluGetTessProperty(ptr long ptr)
|
||||
@ stdcall gluLoadSamplingMatrices(ptr ptr ptr ptr)
|
||||
@ stdcall gluLookAt(double double double double double double double double double)
|
||||
@ stdcall gluNewNurbsRenderer()
|
||||
@ stdcall gluNewQuadric()
|
||||
@ stdcall gluNewTess()
|
||||
@ stdcall gluNextContour(ptr long)
|
||||
@ stdcall gluNurbsCallback(ptr long ptr)
|
||||
@ stdcall gluNurbsCallbackData(ptr ptr)
|
||||
@ stdcall gluNurbsCallbackDataEXT(ptr ptr)
|
||||
@ stdcall gluNurbsCurve(ptr long ptr long ptr long long)
|
||||
@ stdcall gluNurbsProperty(ptr long long)
|
||||
@ stdcall gluNurbsSurface(ptr long ptr long ptr long long ptr long long long)
|
||||
@ stdcall gluOrtho2D(double double double double)
|
||||
@ stdcall gluPartialDisk(ptr double double long long double double)
|
||||
@ stdcall gluPerspective(double double double double)
|
||||
@ stdcall gluPickMatrix(double double double double ptr)
|
||||
@ stdcall gluProject(double double double ptr ptr ptr ptr ptr ptr)
|
||||
@ stdcall gluPwlCurve(ptr long ptr long long)
|
||||
@ stdcall gluQuadricCallback(ptr long ptr)
|
||||
@ stdcall gluQuadricDrawStyle(ptr long)
|
||||
@ stdcall gluQuadricNormals(ptr long)
|
||||
@ stdcall gluQuadricOrientation(ptr long)
|
||||
@ stdcall gluQuadricTexture(ptr long)
|
||||
@ stdcall gluScaleImage(long long long long ptr long long long ptr)
|
||||
@ stdcall gluSphere(ptr double long long)
|
||||
@ stdcall gluTessBeginContour(ptr)
|
||||
@ stdcall gluTessBeginPolygon(ptr ptr)
|
||||
@ stdcall gluTessCallback(ptr long ptr)
|
||||
@ stdcall gluTessEndContour(ptr)
|
||||
@ stdcall gluTessEndPolygon(ptr)
|
||||
@ stdcall gluTessNormal(ptr double double double)
|
||||
@ stdcall gluTessProperty(ptr long double)
|
||||
@ stdcall gluTessVertex(ptr ptr ptr)
|
||||
@ stdcall gluUnProject(double double double ptr ptr ptr ptr ptr ptr)
|
||||
@ stdcall gluUnProject4(double double double double ptr ptr ptr double double ptr ptr ptr ptr)
|
@@ -40,10 +40,10 @@ typedef struct {
|
||||
LPWSTR headers;
|
||||
} ExtensionService;
|
||||
|
||||
#define EXTSERVUNK(x) ((IUnknown*)&(x)->lpIUnknownVtbl)
|
||||
#define AUTHENTICATE(x) (&(x)->lpIAuthenticateVtbl)
|
||||
#define HTTPNEGOTIATE(x) (&(x)->lpIHttpNegotiateVtbl)
|
||||
#define EXTENSIONSERVICES(x) (&(x)->lpIExtensionServicesVtbl)
|
||||
#define EXTSERVUNK(x) ((IUnknown*) &(x)->lpIUnknownVtbl)
|
||||
#define AUTHENTICATE(x) ((IAuthenticate*) &(x)->lpIAuthenticateVtbl)
|
||||
#define HTTPNEGOTIATE(x) ((IHttpNegotiate*) &(x)->lpIHttpNegotiateVtbl)
|
||||
#define EXTENSIONSERVICES(x) ((IExtensionServices*) &(x)->lpIExtensionServicesVtbl)
|
||||
|
||||
#define EXTSERVUNK_THIS(iface) DEFINE_THIS(ExtensionService, IUnknown, iface)
|
||||
|
||||
|
@@ -82,7 +82,8 @@ static inline void __GetMoniker(HlinkImpl* This, IMoniker** moniker)
|
||||
else if (This->Site)
|
||||
{
|
||||
IHlinkSite_GetMoniker(This->Site, This->SiteData,
|
||||
OLEGETMONIKER_FORCEASSIGN, OLEWHICHMK_CONTAINER, moniker);
|
||||
OLEGETMONIKER_FORCEASSIGN, OLEWHICHMK_CONTAINER,
|
||||
(LPVOID)moniker);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,9 +123,9 @@ static HRESULT WINAPI IHlink_fnQueryInterface(IHlink* iface, REFIID riid,
|
||||
if (IsEqualIID(riid, &IID_IUnknown) || (IsEqualIID(riid, &IID_IHlink)))
|
||||
*ppvObj = This;
|
||||
else if (IsEqualIID(riid, &IID_IPersistStream))
|
||||
*ppvObj = &(This->lpPSVtbl);
|
||||
*ppvObj = (LPVOID*)&(This->lpPSVtbl);
|
||||
else if (IsEqualIID(riid, &IID_IDataObject))
|
||||
*ppvObj = &(This->lpDOVtbl);
|
||||
*ppvObj = (LPVOID*)&(This->lpDOVtbl);
|
||||
|
||||
if (*ppvObj)
|
||||
{
|
||||
|
@@ -212,7 +212,7 @@ GetTempPathW (
|
||||
path[0] = 0; /* avoid returning ambiguous "X:" */
|
||||
}
|
||||
|
||||
TRACE("GetTempPathW returning %u, %S\n", ret, path);
|
||||
TRACE("GetTempPathW returning %u, %s\n", ret, path);
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -523,14 +523,6 @@ IntMultiByteToWideCharCP(UINT CodePage,
|
||||
if (WideCharCount == 0)
|
||||
return MultiByteCount;
|
||||
|
||||
/* Fill the WideCharString buffer with what will fit: Verified on WinXP */
|
||||
for (TempLength = (WideCharCount < MultiByteCount) ? WideCharCount : MultiByteCount;
|
||||
TempLength > 0;
|
||||
MultiByteString++, TempLength--)
|
||||
{
|
||||
*WideCharString++ = CodePageTable->MultiByteTable[(UCHAR)*MultiByteString];
|
||||
}
|
||||
|
||||
/* Adjust buffer size. Wine trick ;-) */
|
||||
if (WideCharCount < MultiByteCount)
|
||||
{
|
||||
@@ -538,7 +530,15 @@ IntMultiByteToWideCharCP(UINT CodePage,
|
||||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
return 0;
|
||||
}
|
||||
return MultiByteCount;
|
||||
|
||||
for (TempLength = MultiByteCount;
|
||||
TempLength > 0;
|
||||
MultiByteString++, TempLength--)
|
||||
{
|
||||
*WideCharString++ = CodePageTable->MultiByteTable[(UCHAR)*MultiByteString];
|
||||
}
|
||||
|
||||
return MultiByteCount;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="loadperf" type="win32dll" baseaddress="${BASEADDRESS_LOADPERF}" installbase="system32" installname="loadperf.dll" allowwarnings="true">
|
||||
<importlibrary definition="loadperf.spec" />
|
||||
<include base="loadperf">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<define name="__WINESRC__" />
|
||||
<file>loadperf_main.c</file>
|
||||
<library>wine</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
</module>
|
||||
|
@@ -1,14 +0,0 @@
|
||||
@ stub BackupPerfRegistryToFileW
|
||||
@ stdcall InstallPerfDllA(str str ptr)
|
||||
@ stdcall InstallPerfDllW(wstr wstr ptr)
|
||||
@ stub LoadMofFromInstalledServiceA
|
||||
@ stub LoadMofFromInstalledServiceW
|
||||
@ stdcall LoadPerfCounterTextStringsA(str long)
|
||||
@ stdcall LoadPerfCounterTextStringsW(wstr long)
|
||||
@ stub RestorePerfRegistryFromFileW
|
||||
@ stub SetServiceAsTrustedA
|
||||
@ stub SetServiceAsTrustedW
|
||||
@ stdcall UnloadPerfCounterTextStringsA(str long)
|
||||
@ stdcall UnloadPerfCounterTextStringsW(wstr long)
|
||||
@ stub UpdatePerfNameFilesA
|
||||
@ stub UpdatePerfNameFilesW
|
@@ -1,165 +0,0 @@
|
||||
/*
|
||||
* Implementation of loadperf.dll
|
||||
*
|
||||
* Copyright 2009 Andrey Turkin
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "winnls.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
#include "loadperf.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(loadperf);
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
|
||||
|
||||
switch(fdwReason)
|
||||
{
|
||||
case DLL_WINE_PREATTACH:
|
||||
return FALSE; /* prefer native version */
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(hinstDLL);
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static WCHAR *strdupAW(const char *str)
|
||||
{
|
||||
WCHAR *ret = NULL;
|
||||
if (str)
|
||||
{
|
||||
INT len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||
if (!(ret = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) return NULL;
|
||||
MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
* InstallPerfDllA (loadperf.@)
|
||||
*/
|
||||
DWORD WINAPI InstallPerfDllA(LPCSTR computer, LPCSTR ini, ULONG_PTR flags)
|
||||
{
|
||||
DWORD ret;
|
||||
LPWSTR computerW = NULL, iniW = NULL;
|
||||
|
||||
if (computer && !(computerW = strdupAW(computer))) return ERROR_OUTOFMEMORY;
|
||||
if (ini && !(iniW = strdupAW(ini)))
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, computerW);
|
||||
return ERROR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
ret = InstallPerfDllW(computerW, iniW, flags);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, computerW);
|
||||
HeapFree(GetProcessHeap(), 0, iniW);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
* InstallPerfDllW (loadperf.@)
|
||||
*/
|
||||
DWORD WINAPI InstallPerfDllW(LPCWSTR computer, LPCWSTR ini, ULONG_PTR flags)
|
||||
{
|
||||
FIXME("(%s, %s, %lx)\n", debugstr_w(computer), debugstr_w(ini), flags);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
* LoadPerfCounterTextStringsA (loadperf.@)
|
||||
*
|
||||
* NOTES
|
||||
* See LoadPerfCounterTextStringsW
|
||||
*/
|
||||
DWORD WINAPI LoadPerfCounterTextStringsA(LPCSTR cmdline, BOOL quiet)
|
||||
{
|
||||
DWORD ret;
|
||||
LPWSTR cmdlineW = NULL;
|
||||
|
||||
if (cmdline && !(cmdlineW = strdupAW(cmdline))) return ERROR_OUTOFMEMORY;
|
||||
|
||||
ret = LoadPerfCounterTextStringsW(cmdlineW, quiet);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, cmdlineW);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
* LoadPerfCounterTextStringsW (loadperf.@)
|
||||
*
|
||||
* PARAMS
|
||||
* cmdline [in] Last argument in command line - ini file to be used
|
||||
* quiet [in] FALSE - the function may write to stdout
|
||||
*
|
||||
*/
|
||||
DWORD WINAPI LoadPerfCounterTextStringsW(LPCWSTR cmdline, BOOL quiet)
|
||||
{
|
||||
FIXME("(%s, %d): stub\n", debugstr_w(cmdline), quiet);
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
* UnloadPerfCounterTextStringsA (loadperf.@)
|
||||
*
|
||||
* NOTES
|
||||
* See UnloadPerfCounterTextStringsW
|
||||
*/
|
||||
DWORD WINAPI UnloadPerfCounterTextStringsA(LPCSTR cmdline, BOOL quiet)
|
||||
{
|
||||
DWORD ret;
|
||||
LPWSTR cmdlineW = NULL;
|
||||
|
||||
if (cmdline && !(cmdlineW = strdupAW(cmdline))) return ERROR_OUTOFMEMORY;
|
||||
|
||||
ret = UnloadPerfCounterTextStringsW(cmdlineW, quiet);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, cmdlineW);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
* UnloadPerfCounterTextStringsW (loadperf.@)
|
||||
*
|
||||
* PARAMS
|
||||
* cmdline [in] Last argument in command line - application counters to be removed
|
||||
* quiet [in] FALSE - the function may write to stdout
|
||||
*
|
||||
*/
|
||||
DWORD WINAPI UnloadPerfCounterTextStringsW(LPCWSTR cmdline, BOOL quiet)
|
||||
{
|
||||
FIXME("(%s, %d): stub\n", debugstr_w(cmdline), quiet);
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
@@ -5,30 +5,30 @@
|
||||
@ stdcall CryptCATAdminEnumCatalogFromHash(long ptr long long ptr) wintrust.CryptCATAdminEnumCatalogFromHash
|
||||
@ stdcall CryptCATAdminReleaseCatalogContext(long long long) wintrust.CryptCATAdminReleaseCatalogContext
|
||||
@ stdcall CryptCATAdminReleaseContext(long long) wintrust.CryptCATAdminReleaseContext
|
||||
@ stdcall CryptCATCDFClose(ptr) wintrust.CryptCATCDFClose
|
||||
@ stub CryptCATCDFClose
|
||||
@ stub CryptCATCDFEnumAttributes
|
||||
@ stdcall CryptCATCDFEnumAttributesWithCDFTag(ptr wstr ptr ptr ptr) wintrust.CryptCATCDFEnumAttributesWithCDFTag
|
||||
@ stdcall CryptCATCDFEnumCatAttributes(ptr ptr ptr) wintrust.CryptCATCDFEnumCatAttributes
|
||||
@ stub CryptCATCDFEnumAttributesWithCDFTag
|
||||
@ stub CryptCATCDFEnumCatAttributes
|
||||
@ stub CryptCATCDFEnumMembers
|
||||
@ stdcall CryptCATCDFEnumMembersByCDFTag(ptr wstr ptr ptr long) wintrust.CryptCATCDFEnumMembersByCDFTag
|
||||
@ stdcall CryptCATCDFOpen(wstr ptr) wintrust.CryptCATCDFOpen
|
||||
@ stdcall CryptCATCatalogInfoFromContext(ptr ptr long) wintrust.CryptCATCatalogInfoFromContext
|
||||
@ stub CryptCATCDFEnumMembersByCDFTag
|
||||
@ stub CryptCATCDFOpen
|
||||
@ stub CryptCATCatalogInfoFromContext
|
||||
@ stdcall CryptCATClose(long) wintrust.CryptCATClose
|
||||
@ stdcall CryptCATEnumerateAttr(ptr ptr ptr) wintrust.CryptCATEnumerateAttr
|
||||
@ stdcall CryptCATEnumerateCatAttr(ptr ptr) wintrust.CryptCATEnumerateCatAttr
|
||||
@ stub CryptCATEnumerateAttr
|
||||
@ stub CryptCATEnumerateCatAttr
|
||||
@ stdcall CryptCATEnumerateMember(long ptr) wintrust.CryptCATEnumerateMember
|
||||
@ stdcall CryptCATGetAttrInfo(ptr ptr wstr) wintrust.CryptCATGetAttrInfo
|
||||
@ stdcall CryptCATGetCatAttrInfo(ptr wstr) wintrust.CryptCATGetCatAttrInfo
|
||||
@ stdcall CryptCATGetMemberInfo(ptr wstr) wintrust.CryptCATGetMemberInfo
|
||||
@ stdcall CryptCATHandleFromStore(ptr) wintrust.CryptCATHandleFromStore
|
||||
@ stub CryptCATGetAttrInfo
|
||||
@ stub CryptCATGetCatAttrInfo
|
||||
@ stub CryptCATGetMemberInfo
|
||||
@ stub CryptCATHandleFromStore
|
||||
@ stdcall CryptCATOpen(wstr long long long long) wintrust.CryptCATOpen
|
||||
@ stdcall CryptCATPersistStore(ptr) wintrust.CryptCATPersistStore
|
||||
@ stdcall CryptCATPutAttrInfo(ptr ptr wstr long long ptr) wintrust.CryptCATPutAttrInfo
|
||||
@ stdcall CryptCATPutCatAttrInfo(ptr wstr long long ptr) wintrust.CryptCATPutCatAttrInfo
|
||||
@ stdcall CryptCATPutMemberInfo(ptr wstr wstr ptr long long ptr) wintrust.CryptCATPutMemberInfo
|
||||
@ stdcall CryptCATStoreFromHandle(ptr) wintrust.CryptCATStoreFromHandle
|
||||
@ stub CryptCATPersistStore
|
||||
@ stub CryptCATPutAttrInfo
|
||||
@ stub CryptCATPutCatAttrInfo
|
||||
@ stub CryptCATPutMemberInfo
|
||||
@ stub CryptCATStoreFromHandle
|
||||
@ stdcall -private DllRegisterServer() wintrust.mscat32DllRegisterServer
|
||||
@ stdcall -private DllUnregisterServer() wintrust.mscat32DllUnregisterServer
|
||||
@ stdcall IsCatalogFile(ptr wstr) wintrust.IsCatalogFile
|
||||
@ stub IsCatalogFile
|
||||
@ stub MsCatConstructHashTag
|
||||
@ stub MsCatFreeHashTag
|
||||
|
@@ -1206,7 +1206,7 @@ static UINT merge_diff_row(MSIRECORD *rec, LPVOID param)
|
||||
MERGETABLE *table = data->curtable;
|
||||
MERGEROW *mergerow;
|
||||
MSIQUERY *dbview;
|
||||
MSIRECORD *row = NULL;
|
||||
MSIRECORD *row;
|
||||
LPWSTR query;
|
||||
UINT r;
|
||||
|
||||
|
@@ -1553,7 +1553,7 @@ UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode,
|
||||
TRACE("(%s, %s, %d, %s, %p)\n", debugstr_w(szProductCode),
|
||||
debugstr_w(szUserSid), dwContext, debugstr_w(szComponent), pdwState);
|
||||
|
||||
if (!pdwState || !szComponent)
|
||||
if (!pdwState)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
if (!szProductCode || !*szProductCode || lstrlenW(szProductCode) != GUID_SIZE - 1)
|
||||
|
@@ -53,10 +53,6 @@
|
||||
<file>upgrade.c</file>
|
||||
<file>where.c</file>
|
||||
<file>msi.rc</file>
|
||||
|
||||
<!-- FIXME: this file should be autogenerated with WIDL -->
|
||||
<file>msiserver.idl_i.c</file>
|
||||
|
||||
<include base="msi" root="intermediate">.</include>
|
||||
<library>wine</library>
|
||||
<library>uuid</library>
|
||||
|
@@ -250,8 +250,8 @@
|
||||
254 stub MsiDeterminePatchSequenceW
|
||||
255 stdcall MsiSourceListAddSourceExA(str str long long str long)
|
||||
256 stdcall MsiSourceListAddSourceExW(wstr wstr long long wstr long)
|
||||
257 stdcall MsiSourceListClearSourceA(str str long long str)
|
||||
258 stdcall MsiSourceListClearSourceW(wstr wstr long long wstr)
|
||||
257 stub MsiSourceListClearSourceA
|
||||
258 stub MsiSourceListClearSourceW
|
||||
259 stub MsiSourceListClearAllExA
|
||||
260 stub MsiSourceListClearAllExW
|
||||
261 stub MsiSourceListForceResolutionExA
|
||||
|
@@ -1,32 +0,0 @@
|
||||
/*** Autogenerated by WIDL 0.4-SVN from msiserver.idl - Do not edit ***/
|
||||
|
||||
#include <rpc.h>
|
||||
#include <rpcndr.h>
|
||||
|
||||
#include <initguid.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
DEFINE_GUID(IID_IWineMsiRemoteDatabase, 0x7bde2046, 0xd03b, 0x4ffc, 0xb8,0x4c, 0xa0,0x98,0xf3,0x8c,0xff,0x0b);
|
||||
DEFINE_GUID(IID_IWineMsiRemotePackage, 0x902b3592, 0x9d08, 0x4dfd, 0xa5,0x93, 0xd0,0x7c,0x52,0x54,0x64,0x21);
|
||||
DEFINE_GUID(IID_IWineMsiRemoteCustomAction, 0x56d58b64, 0x8780, 0x4c22, 0xa8,0xbc, 0x8b,0x0b,0x29,0xe4,0xa9,0xf8);
|
||||
DEFINE_GUID(LIBID_WindowsInstaller, 0x000c1092, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_Installer, 0x000c1090, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_Record, 0x000c1093, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_StringList, 0x000c1095, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_RecordList, 0x000c1096, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_UIPreview, 0x000c109a, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_SummaryInfo, 0x000c109b, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_View, 0x000c109c, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_Database, 0x000c109d, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_Session, 0x000c109e, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_FeatureInfo, 0x000c109f, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_Product, 0x000c10a0, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
DEFINE_GUID(DIID_Patch, 0x000c10a1, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user