--- a/Win32OperatingSystem.st Wed Dec 12 14:40:27 2018 +0100
+++ b/Win32OperatingSystem.st Thu Jan 31 14:10:54 2019 +0100
@@ -16218,14 +16218,18 @@
"
!
-remoteKeyOnHost:hostName
+remoteKeyOnHost:hostNameString
"return the corresponding registry entry from
a remote computers registry.
Note: The registry key must be form a predefined list defined by Microsoft."
|hostNameUtf16Z newEntry remoteHandle errorNumber|
-
- hostNameUtf16Z := hostName notEmptyOrNil ifTrue:[hostName asUnicode16StringZ].
+
+ "/ checking user input
+ hostNameString isString ifFalse:[
+ self error: 'hostNameString is not a string!!'
+ ].
+ hostNameUtf16Z := hostNameString notEmptyOrNil ifTrue:[hostNameString asUnicode16StringZ].
%{
HKEY myKey, remoteKey = 0;
@@ -16309,6 +16313,11 @@
|subKeyName errorNumber|
+ "/ checking user input
+ subKeyIndex isInteger ifFalse:[
+ self error: 'subKeyIndex is not an integer!!'
+ ].
+
%{
/* dwIndex (subKeyIndex)
* The index of the subkey to retrieve. This parameter should be zero for the first call to the RegEnumKeyEx function and then
@@ -16398,6 +16407,11 @@
WARNING: subKeyIndex is 0-based!!"
|subKeyName subKeyClassName errorNumber|
+
+ "/ checking user input
+ subKeyIndex isInteger ifFalse:[
+ self error: 'subKeyIndex is not an integer!!'
+ ].
%{
/* dwIndex (subKeyIndex)
@@ -16705,6 +16719,11 @@
|valueName errorNumber|
+ "/ checking user input
+ valueIndex isInteger ifFalse:[
+ self error: 'valueIndex is not an integer!!'
+ ].
+
%{
/* dwIndex (valueIndex)
* The index of the value to be retrieved. This parameter should be zero for the first call to the RegEnumValue function and then be
@@ -16791,6 +16810,11 @@
|nameUtf16Z stringArray retVal errorNumber|
+ "/ checking user input
+ nameString isString ifFalse:[
+ self error: 'nameString is not a string!!'
+ ].
+
"/ adding terminating null into empty string
nameString notNil ifTrue:[
nameString isEmpty ifTrue:[nameUtf16Z := (nameString, (Character codePoint: 0)) asUnicode16String] "/ needed for defaultValue