diff --git a/dlls/sane.ds/capability.c b/dlls/sane.ds/capability.c
index bb682fb82ac87df1725c753306d71e86a2d40520..67ccb2cf5372871ff61dfd9943a014e9ac5b1261 100644
--- a/dlls/sane.ds/capability.c
+++ b/dlls/sane.ds/capability.c
@@ -323,7 +323,7 @@ static TW_UINT16 SANE_ICAPPixelType (pTW_CAPABILITY pCapability, TW_UINT16 actio
 
     TRACE("ICAP_PIXELTYPE\n");
 
-    rc = sane_option_probe_mode(activeDS.deviceHandle, &choices, current_mode, sizeof(current_mode));
+    rc = sane_option_probe_mode(&choices, current_mode, sizeof(current_mode));
     if (rc != SANE_STATUS_GOOD)
     {
         ERR("Unable to retrieve mode from sane, ICAP_PIXELTYPE unsupported\n");
@@ -367,12 +367,12 @@ static TW_UINT16 SANE_ICAPPixelType (pTW_CAPABILITY pCapability, TW_UINT16 actio
                     return TWCC_BADVALUE;
 
                 status = 0;
-                rc = sane_option_set_str(activeDS.deviceHandle, "mode", mode, &status);
+                rc = sane_option_set_str("mode", mode, &status);
                 /* Some SANE devices use 'Grayscale' instead of the standard 'Gray' */
                 if (rc == SANE_STATUS_INVAL && strcmp(mode, SANE_VALUE_SCAN_MODE_GRAY) == 0)
                 {
                     strcpy(mode, "Grayscale");
-                    rc = sane_option_set_str(activeDS.deviceHandle, "mode", mode, &status);
+                    rc = sane_option_set_str("mode", mode, &status);
                 }
                 if (rc != SANE_STATUS_GOOD)
                     return sane_status_to_twcc(rc);
@@ -391,12 +391,12 @@ static TW_UINT16 SANE_ICAPPixelType (pTW_CAPABILITY pCapability, TW_UINT16 actio
                 return TWCC_BADVALUE;
 
             status = 0;
-            rc = sane_option_set_str(activeDS.deviceHandle, "mode", mode, &status);
+            rc = sane_option_set_str("mode", mode, &status);
             /* Some SANE devices use 'Grayscale' instead of the standard 'Gray' */
             if (rc == SANE_STATUS_INVAL && strcmp(mode, SANE_VALUE_SCAN_MODE_GRAY) == 0)
             {
                 strcpy(mode, "Grayscale");
-                rc = sane_option_set_str(activeDS.deviceHandle, "mode", mode, &status);
+                rc = sane_option_set_str("mode", mode, &status);
             }
             if (rc != SANE_STATUS_GOOD)
                 return sane_status_to_twcc(rc);
@@ -578,10 +578,10 @@ static TW_UINT16 SANE_ICAPResolution (pTW_CAPABILITY pCapability, TW_UINT16 acti
         best_option_name = "y-resolution";
         default_res = &activeDS.defaultYResolution;
     }
-    if (sane_option_get_int(activeDS.deviceHandle, best_option_name, &current_resolution) != SANE_STATUS_GOOD)
+    if (sane_option_get_int(best_option_name, &current_resolution) != SANE_STATUS_GOOD)
     {
         best_option_name = "resolution";
-        if (sane_option_get_int(activeDS.deviceHandle, best_option_name, &current_resolution) != SANE_STATUS_GOOD)
+        if (sane_option_get_int(best_option_name, &current_resolution) != SANE_STATUS_GOOD)
             return TWCC_BADCAP;
     }
 
@@ -610,7 +610,7 @@ static TW_UINT16 SANE_ICAPResolution (pTW_CAPABILITY pCapability, TW_UINT16 acti
             break;
 
         case MSG_GET:
-            sane_rc = sane_option_probe_resolution(activeDS.deviceHandle, best_option_name, &minval, &maxval, &quantval);
+            sane_rc = sane_option_probe_resolution(best_option_name, &minval, &maxval, &quantval);
             if (sane_rc != SANE_STATUS_GOOD)
                 twCC = TWCC_BADCAP;
             else
@@ -624,7 +624,7 @@ static TW_UINT16 SANE_ICAPResolution (pTW_CAPABILITY pCapability, TW_UINT16 acti
             {
                 TW_FIX32 f32;
                 memcpy(&f32, &val, sizeof(f32));
-                sane_rc = sane_option_set_int(activeDS.deviceHandle, best_option_name, f32.Whole, &set_status);
+                sane_rc = sane_option_set_int(best_option_name, f32.Whole, &set_status);
                 if (sane_rc != SANE_STATUS_GOOD)
                 {
                     FIXME("Status of %d not expected or handled\n", sane_rc);
@@ -640,7 +640,7 @@ static TW_UINT16 SANE_ICAPResolution (pTW_CAPABILITY pCapability, TW_UINT16 acti
             break;
 
         case MSG_RESET:
-            sane_rc = sane_option_set_int(activeDS.deviceHandle, best_option_name, default_res->Whole, NULL);
+            sane_rc = sane_option_set_int(best_option_name, default_res->Whole, NULL);
             if (sane_rc != SANE_STATUS_GOOD)
                 return TWCC_BADCAP;
 
@@ -666,12 +666,12 @@ static TW_UINT16 SANE_ICAPPhysical (pTW_CAPABILITY pCapability, TW_UINT16 action
     TRACE("ICAP_PHYSICAL%s\n", cap == ICAP_PHYSICALHEIGHT? "HEIGHT" : "WIDTH");
 
     sprintf(option_name, "tl-%c", cap == ICAP_PHYSICALHEIGHT ? 'y' : 'x');
-    status = sane_option_probe_scan_area(activeDS.deviceHandle, option_name, NULL, &lowerunit, &lower, NULL, NULL);
+    status = sane_option_probe_scan_area(option_name, NULL, &lowerunit, &lower, NULL, NULL);
     if (status != SANE_STATUS_GOOD)
         return sane_status_to_twcc(status);
 
     sprintf(option_name, "br-%c", cap == ICAP_PHYSICALHEIGHT ? 'y' : 'x');
-    status = sane_option_probe_scan_area(activeDS.deviceHandle, option_name, NULL, &upperunit, NULL, &upper, NULL);
+    status = sane_option_probe_scan_area(option_name, NULL, &upperunit, NULL, &upper, NULL);
     if (status != SANE_STATUS_GOOD)
         return sane_status_to_twcc(status);
 
@@ -753,19 +753,19 @@ static TW_UINT16 get_width_height(double *width, double *height, BOOL max)
     SANE_Fixed brx_current, brx_min, brx_max;
     SANE_Fixed bry_current, bry_min, bry_max;
 
-    status = sane_option_probe_scan_area(activeDS.deviceHandle, "tl-x", &tlx_current, NULL, &tlx_min, &tlx_max, NULL);
+    status = sane_option_probe_scan_area("tl-x", &tlx_current, NULL, &tlx_min, &tlx_max, NULL);
     if (status != SANE_STATUS_GOOD)
         return sane_status_to_twcc(status);
 
-    status = sane_option_probe_scan_area(activeDS.deviceHandle, "tl-y", &tly_current, NULL, &tly_min, &tly_max, NULL);
+    status = sane_option_probe_scan_area("tl-y", &tly_current, NULL, &tly_min, &tly_max, NULL);
     if (status != SANE_STATUS_GOOD)
         return sane_status_to_twcc(status);
 
-    status = sane_option_probe_scan_area(activeDS.deviceHandle, "br-x", &brx_current, NULL, &brx_min, &brx_max, NULL);
+    status = sane_option_probe_scan_area("br-x", &brx_current, NULL, &brx_min, &brx_max, NULL);
     if (status != SANE_STATUS_GOOD)
         return sane_status_to_twcc(status);
 
-    status = sane_option_probe_scan_area(activeDS.deviceHandle, "br-y", &bry_current, NULL, &bry_min, &bry_max, NULL);
+    status = sane_option_probe_scan_area("br-y", &bry_current, NULL, &bry_min, &bry_max, NULL);
     if (status != SANE_STATUS_GOOD)
         return sane_status_to_twcc(status);
 
@@ -785,7 +785,7 @@ static TW_UINT16 get_width_height(double *width, double *height, BOOL max)
 static TW_UINT16 set_one_coord(const char *name, double coord)
 {
     SANE_Status status;
-    status = sane_option_set_fixed(activeDS.deviceHandle, name, SANE_FIX(coord), NULL);
+    status = sane_option_set_fixed(name, SANE_FIX(coord), NULL);
     if (status != SANE_STATUS_GOOD)
         return sane_status_to_twcc(status);
     return TWCC_SUCCESS;
@@ -971,7 +971,7 @@ static TW_UINT16 SANE_CAPAutofeed (pTW_CAPABILITY pCapability, TW_UINT16 action)
 
     TRACE("CAP_AUTOFEED\n");
 
-    if (sane_option_get_bool(activeDS.deviceHandle, "batch-scan", &autofeed, NULL) != SANE_STATUS_GOOD)
+    if (sane_option_get_bool("batch-scan", &autofeed, NULL) != SANE_STATUS_GOOD)
         return TWCC_BADCAP;
 
     switch (action)
@@ -994,7 +994,7 @@ static TW_UINT16 SANE_CAPAutofeed (pTW_CAPABILITY pCapability, TW_UINT16 action)
                 else
                     autofeed = SANE_FALSE;
 
-                status = sane_option_set_bool(activeDS.deviceHandle, "batch-scan", autofeed, NULL);
+                status = sane_option_set_bool("batch-scan", autofeed, NULL);
                 if (status != SANE_STATUS_GOOD)
                 {
                     ERR("Error %s: Could not set batch-scan to %d\n", sane_strstatus(status), autofeed);
@@ -1009,7 +1009,7 @@ static TW_UINT16 SANE_CAPAutofeed (pTW_CAPABILITY pCapability, TW_UINT16 action)
 
         case MSG_RESET:
             autofeed = SANE_TRUE;
-            status = sane_option_set_bool(activeDS.deviceHandle, "batch-scan", autofeed, NULL);
+            status = sane_option_set_bool("batch-scan", autofeed, NULL);
             if (status != SANE_STATUS_GOOD)
             {
                 ERR("Error %s: Could not reset batch-scan to SANE_TRUE\n", sane_strstatus(status));
@@ -1035,7 +1035,7 @@ static TW_UINT16 SANE_CAPFeederEnabled (pTW_CAPABILITY pCapability, TW_UINT16 ac
 
     TRACE("CAP_FEEDERENABLED\n");
 
-    if (sane_option_get_str(activeDS.deviceHandle, SANE_NAME_SCAN_SOURCE, source, sizeof(source), NULL) != SANE_STATUS_GOOD)
+    if (sane_option_get_str(SANE_NAME_SCAN_SOURCE, source, sizeof(source), NULL) != SANE_STATUS_GOOD)
         return TWCC_BADCAP;
 
     if (strcmp(source, "Auto") == 0 || strcmp(source, "ADF") == 0)
@@ -1059,11 +1059,11 @@ static TW_UINT16 SANE_CAPFeederEnabled (pTW_CAPABILITY pCapability, TW_UINT16 ac
             if (twCC == TWCC_SUCCESS)
             {
                 strcpy(source, "ADF");
-                status = sane_option_set_str(activeDS.deviceHandle, SANE_NAME_SCAN_SOURCE, source, NULL);
+                status = sane_option_set_str(SANE_NAME_SCAN_SOURCE, source, NULL);
                 if (status != SANE_STATUS_GOOD)
                 {
                     strcpy(source, "Auto");
-                    status = sane_option_set_str(activeDS.deviceHandle, SANE_NAME_SCAN_SOURCE, source, NULL);
+                    status = sane_option_set_str(SANE_NAME_SCAN_SOURCE, source, NULL);
                 }
                 if (status != SANE_STATUS_GOOD)
                 {
@@ -1079,7 +1079,7 @@ static TW_UINT16 SANE_CAPFeederEnabled (pTW_CAPABILITY pCapability, TW_UINT16 ac
 
         case MSG_RESET:
             strcpy(source, "Auto");
-            if (sane_option_set_str(activeDS.deviceHandle, SANE_NAME_SCAN_SOURCE, source, NULL) == SANE_STATUS_GOOD)
+            if (sane_option_set_str(SANE_NAME_SCAN_SOURCE, source, NULL) == SANE_STATUS_GOOD)
                 enabled = TRUE;
             /* .. fall through intentional .. */
 
diff --git a/dlls/sane.ds/ds_image.c b/dlls/sane.ds/ds_image.c
index 17128a483502b2d1836854b9b14ee39f3c56b6e1..91c39cb687f8f01750ea7e50f5e37c13a0c37ea5 100644
--- a/dlls/sane.ds/ds_image.c
+++ b/dlls/sane.ds/ds_image.c
@@ -62,7 +62,7 @@ TW_UINT16 SANE_ImageInfoGet (pTW_IDENTITY pOrigin,
             activeDS.sane_param_valid = TRUE;
         }
 
-        if (sane_option_get_int(activeDS.deviceHandle, "resolution", &resolution) == SANE_STATUS_GOOD)
+        if (sane_option_get_int("resolution", &resolution) == SANE_STATUS_GOOD)
             pImageInfo->XResolution.Whole = pImageInfo->YResolution.Whole = resolution;
         else
             pImageInfo->XResolution.Whole = pImageInfo->YResolution.Whole = -1;
@@ -121,15 +121,15 @@ TW_UINT16 SANE_ImageLayoutGet (pTW_IDENTITY pOrigin,
 
     TRACE("DG_IMAGE/DAT_IMAGELAYOUT/MSG_GET\n");
 
-    status = sane_option_probe_scan_area(activeDS.deviceHandle, "tl-x", &tlx_current, NULL, NULL, NULL, NULL);
+    status = sane_option_probe_scan_area("tl-x", &tlx_current, NULL, NULL, NULL, NULL);
     if (status == SANE_STATUS_GOOD)
-        status = sane_option_probe_scan_area(activeDS.deviceHandle, "tl-y", &tly_current, NULL, NULL, NULL, NULL);
+        status = sane_option_probe_scan_area("tl-y", &tly_current, NULL, NULL, NULL, NULL);
 
     if (status == SANE_STATUS_GOOD)
-        status = sane_option_probe_scan_area(activeDS.deviceHandle, "br-x", &brx_current, NULL, NULL, NULL, NULL);
+        status = sane_option_probe_scan_area("br-x", &brx_current, NULL, NULL, NULL, NULL);
 
     if (status == SANE_STATUS_GOOD)
-        status = sane_option_probe_scan_area(activeDS.deviceHandle, "br-y", &bry_current, NULL, NULL, NULL, NULL);
+        status = sane_option_probe_scan_area("br-y", &bry_current, NULL, NULL, NULL, NULL);
 
     if (status != SANE_STATUS_GOOD)
     {
@@ -173,8 +173,7 @@ static TW_UINT16 set_one_imagecoord(const char *option_name, TW_FIX32 val, BOOL
     double d = val.Whole + ((double) val.Frac / 65536.0);
     int set_status = 0;
     SANE_Status status;
-    status = sane_option_set_fixed(activeDS.deviceHandle, option_name,
-             SANE_FIX((d * 254) / 10), &set_status);
+    status = sane_option_set_fixed(option_name, SANE_FIX((d * 254) / 10), &set_status);
     if (status != SANE_STATUS_GOOD)
     {
         activeDS.twCC = sane_status_to_twcc(status);
diff --git a/dlls/sane.ds/options.c b/dlls/sane.ds/options.c
index f242d05ac0875e08c379e673b9b4ff8d16fd3ed2..7766065a9e9a0cb1129477815c8b7c4c4df14b54 100644
--- a/dlls/sane.ds/options.c
+++ b/dlls/sane.ds/options.c
@@ -22,7 +22,7 @@
 #include "sane_i.h"
 #include "wine/debug.h"
 
-static SANE_Status sane_find_option(SANE_Handle h, const char *option_name,
+static SANE_Status sane_find_option(const char *option_name,
         const SANE_Option_Descriptor **opt_p, int *optno, SANE_Value_Type type)
 {
     SANE_Status rc;
@@ -33,17 +33,17 @@ static SANE_Status sane_find_option(SANE_Handle h, const char *option_name,
     /* Debian, in 32_net_backend_standard_fix.dpatch,
      *  forces a frontend (that's us) to reload options
      *  manually by invoking get_option_descriptor. */
-    opt = sane_get_option_descriptor(h, 0);
+    opt = sane_get_option_descriptor(activeDS.deviceHandle, 0);
     if (! opt)
         return SANE_STATUS_EOF;
 
-    rc = sane_control_option(h, 0, SANE_ACTION_GET_VALUE, &optcount, NULL);
+    rc = sane_control_option(activeDS.deviceHandle, 0, SANE_ACTION_GET_VALUE, &optcount, NULL);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
     for (i = 1; i < optcount; i++)
     {
-        opt = sane_get_option_descriptor(h, i);
+        opt = sane_get_option_descriptor(activeDS.deviceHandle, i);
         if (opt && (opt->name && strcmp(opt->name, option_name) == 0) &&
                opt->type == type)
         {
@@ -55,108 +55,108 @@ static SANE_Status sane_find_option(SANE_Handle h, const char *option_name,
     return SANE_STATUS_EOF;
 }
 
-SANE_Status sane_option_get_int(SANE_Handle h, const char *option_name, SANE_Int *val)
+SANE_Status sane_option_get_int(const char *option_name, SANE_Int *val)
 {
     SANE_Status rc;
     int optno;
     const SANE_Option_Descriptor *opt;
 
-    rc = sane_find_option(h, option_name, &opt, &optno, SANE_TYPE_INT);
+    rc = sane_find_option(option_name, &opt, &optno, SANE_TYPE_INT);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
-    return sane_control_option(h, optno, SANE_ACTION_GET_VALUE, val, NULL);
+    return sane_control_option(activeDS.deviceHandle, optno, SANE_ACTION_GET_VALUE, val, NULL);
 }
 
-SANE_Status sane_option_set_int(SANE_Handle h, const char *option_name, SANE_Int val, SANE_Int *status)
+SANE_Status sane_option_set_int(const char *option_name, SANE_Int val, SANE_Int *status)
 {
     SANE_Status rc;
     int optno;
     const SANE_Option_Descriptor *opt;
 
-    rc = sane_find_option(h, option_name, &opt, &optno, SANE_TYPE_INT);
+    rc = sane_find_option(option_name, &opt, &optno, SANE_TYPE_INT);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
-    return sane_control_option(h, optno, SANE_ACTION_SET_VALUE, (void *) &val, status);
+    return sane_control_option(activeDS.deviceHandle, optno, SANE_ACTION_SET_VALUE, (void *) &val, status);
 }
 
-SANE_Status sane_option_get_bool(SANE_Handle h, const char *option_name, SANE_Bool *val, SANE_Int *status)
+SANE_Status sane_option_get_bool(const char *option_name, SANE_Bool *val, SANE_Int *status)
 {
     SANE_Status rc;
     int optno;
     const SANE_Option_Descriptor *opt;
 
-    rc = sane_find_option(h, option_name, &opt, &optno, SANE_TYPE_BOOL);
+    rc = sane_find_option(option_name, &opt, &optno, SANE_TYPE_BOOL);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
-    return sane_control_option(h, optno, SANE_ACTION_GET_VALUE, (void *) val, status);
+    return sane_control_option(activeDS.deviceHandle, optno, SANE_ACTION_GET_VALUE, (void *) val, status);
 }
 
-SANE_Status sane_option_set_bool(SANE_Handle h, const char *option_name, SANE_Bool val, SANE_Int *status)
+SANE_Status sane_option_set_bool(const char *option_name, SANE_Bool val, SANE_Int *status)
 {
     SANE_Status rc;
     int optno;
     const SANE_Option_Descriptor *opt;
 
-    rc = sane_find_option(h, option_name, &opt, &optno, SANE_TYPE_BOOL);
+    rc = sane_find_option(option_name, &opt, &optno, SANE_TYPE_BOOL);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
-    return sane_control_option(h, optno, SANE_ACTION_SET_VALUE, (void *) &val, status);
+    return sane_control_option(activeDS.deviceHandle, optno, SANE_ACTION_SET_VALUE, (void *) &val, status);
 }
 
-SANE_Status sane_option_set_fixed(SANE_Handle h, const char *option_name, SANE_Fixed val, SANE_Int *status)
+SANE_Status sane_option_set_fixed(const char *option_name, SANE_Fixed val, SANE_Int *status)
 {
     SANE_Status rc;
     int optno;
     const SANE_Option_Descriptor *opt;
 
-    rc = sane_find_option(h, option_name, &opt, &optno, SANE_TYPE_FIXED);
+    rc = sane_find_option(option_name, &opt, &optno, SANE_TYPE_FIXED);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
-    return sane_control_option(h, optno, SANE_ACTION_SET_VALUE, (void *) &val, status);
+    return sane_control_option(activeDS.deviceHandle, optno, SANE_ACTION_SET_VALUE, (void *) &val, status);
 }
 
-SANE_Status sane_option_get_str(SANE_Handle h, const char *option_name, SANE_String val, size_t len, SANE_Int *status)
+SANE_Status sane_option_get_str(const char *option_name, SANE_String val, size_t len, SANE_Int *status)
 {
     SANE_Status rc;
     int optno;
     const SANE_Option_Descriptor *opt;
 
-    rc = sane_find_option(h, option_name, &opt, &optno, SANE_TYPE_STRING);
+    rc = sane_find_option(option_name, &opt, &optno, SANE_TYPE_STRING);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
     if (opt->size < len)
-        return sane_control_option(h, optno, SANE_ACTION_GET_VALUE, (void *) val, status);
+        return sane_control_option(activeDS.deviceHandle, optno, SANE_ACTION_GET_VALUE, (void *) val, status);
     else
         return SANE_STATUS_NO_MEM;
 }
 
 /* Important:  SANE has the side effect of overwriting val with the returned value */
-SANE_Status sane_option_set_str(SANE_Handle h, const char *option_name, SANE_String val, SANE_Int *status)
+SANE_Status sane_option_set_str(const char *option_name, SANE_String val, SANE_Int *status)
 {
     SANE_Status rc;
     int optno;
     const SANE_Option_Descriptor *opt;
 
-    rc = sane_find_option(h, option_name, &opt, &optno, SANE_TYPE_STRING);
+    rc = sane_find_option(option_name, &opt, &optno, SANE_TYPE_STRING);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
-    return sane_control_option(h, optno, SANE_ACTION_SET_VALUE, (void *) val, status);
+    return sane_control_option(activeDS.deviceHandle, optno, SANE_ACTION_SET_VALUE, (void *) val, status);
 }
 
-SANE_Status sane_option_probe_resolution(SANE_Handle h, const char *option_name, SANE_Int *minval, SANE_Int *maxval, SANE_Int *quant)
+SANE_Status sane_option_probe_resolution(const char *option_name, SANE_Int *minval, SANE_Int *maxval, SANE_Int *quant)
 {
     SANE_Status rc;
     int optno;
     const SANE_Option_Descriptor *opt;
 
-    rc = sane_find_option(h, option_name, &opt, &optno, SANE_TYPE_INT);
+    rc = sane_find_option(option_name, &opt, &optno, SANE_TYPE_INT);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
@@ -170,12 +170,12 @@ SANE_Status sane_option_probe_resolution(SANE_Handle h, const char *option_name,
     return rc;
 }
 
-SANE_Status sane_option_probe_mode(SANE_Handle h, SANE_String_Const **choices, char *current, int current_size)
+SANE_Status sane_option_probe_mode(SANE_String_Const **choices, char *current, int current_size)
 {
     SANE_Status rc;
     int optno;
     const SANE_Option_Descriptor *opt;
-    rc = sane_find_option(h, "mode", &opt, &optno, SANE_TYPE_STRING);
+    rc = sane_find_option("mode", &opt, &optno, SANE_TYPE_STRING);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
@@ -183,20 +183,20 @@ SANE_Status sane_option_probe_mode(SANE_Handle h, SANE_String_Const **choices, c
         *choices = (SANE_String_Const *) opt->constraint.string_list;
 
     if (opt->size < current_size)
-        return sane_control_option(h, optno, SANE_ACTION_GET_VALUE, current, NULL);
+        return sane_control_option(activeDS.deviceHandle, optno, SANE_ACTION_GET_VALUE, current, NULL);
     else
         return SANE_STATUS_NO_MEM;
 
 }
 
-SANE_Status sane_option_probe_scan_area(SANE_Handle h, const char *option_name, SANE_Fixed *val,
+SANE_Status sane_option_probe_scan_area(const char *option_name, SANE_Fixed *val,
                                         SANE_Unit *unit, SANE_Fixed *min, SANE_Fixed *max, SANE_Fixed *quant)
 {
     SANE_Status rc;
     int optno;
     const SANE_Option_Descriptor *opt;
 
-    rc = sane_find_option(h, option_name, &opt, &optno, SANE_TYPE_FIXED);
+    rc = sane_find_option(option_name, &opt, &optno, SANE_TYPE_FIXED);
     if (rc != SANE_STATUS_GOOD)
         return rc;
 
@@ -210,7 +210,7 @@ SANE_Status sane_option_probe_scan_area(SANE_Handle h, const char *option_name,
         *quant = opt->constraint.range->quant;
 
     if (val)
-        rc = sane_control_option(h, optno, SANE_ACTION_GET_VALUE, val, NULL);
+        rc = sane_control_option(activeDS.deviceHandle, optno, SANE_ACTION_GET_VALUE, val, NULL);
 
     return rc;
 }
diff --git a/dlls/sane.ds/sane_i.h b/dlls/sane.ds/sane_i.h
index 96f9b3c8a7ab94b25c14785bc5d987ff7979f48d..a79826c4b44e7f96aa029326c5e375889f3c1476 100644
--- a/dlls/sane.ds/sane_i.h
+++ b/dlls/sane.ds/sane_i.h
@@ -206,17 +206,17 @@ BOOL DoScannerUI(void) DECLSPEC_HIDDEN;
 HWND ScanningDialogBox(HWND dialog, LONG progress) DECLSPEC_HIDDEN;
 
 /* Option functions */
-SANE_Status sane_option_get_int(SANE_Handle h, const char *option_name, SANE_Int *val) DECLSPEC_HIDDEN;
-SANE_Status sane_option_set_int(SANE_Handle h, const char *option_name, SANE_Int val, SANE_Int *status) DECLSPEC_HIDDEN;
-SANE_Status sane_option_get_str(SANE_Handle h, const char *option_name, SANE_String val, size_t len, SANE_Int *status) DECLSPEC_HIDDEN;
-SANE_Status sane_option_set_str(SANE_Handle h, const char *option_name, SANE_String val, SANE_Int *status) DECLSPEC_HIDDEN;
-SANE_Status sane_option_probe_resolution(SANE_Handle h, const char *option_name, SANE_Int *minval, SANE_Int *maxval, SANE_Int *quant) DECLSPEC_HIDDEN;
-SANE_Status sane_option_probe_mode(SANE_Handle h, SANE_String_Const **choices, char *current, int current_size) DECLSPEC_HIDDEN;
-SANE_Status sane_option_probe_scan_area(SANE_Handle h, const char *option_name, SANE_Fixed *val,
+SANE_Status sane_option_get_int(const char *option_name, SANE_Int *val) DECLSPEC_HIDDEN;
+SANE_Status sane_option_set_int(const char *option_name, SANE_Int val, SANE_Int *status) DECLSPEC_HIDDEN;
+SANE_Status sane_option_get_str(const char *option_name, SANE_String val, size_t len, SANE_Int *status) DECLSPEC_HIDDEN;
+SANE_Status sane_option_set_str(const char *option_name, SANE_String val, SANE_Int *status) DECLSPEC_HIDDEN;
+SANE_Status sane_option_probe_resolution(const char *option_name, SANE_Int *minval, SANE_Int *maxval, SANE_Int *quant) DECLSPEC_HIDDEN;
+SANE_Status sane_option_probe_mode(SANE_String_Const **choices, char *current, int current_size) DECLSPEC_HIDDEN;
+SANE_Status sane_option_probe_scan_area(const char *option_name, SANE_Fixed *val,
                                         SANE_Unit *unit, SANE_Fixed *min, SANE_Fixed *max, SANE_Fixed *quant) DECLSPEC_HIDDEN;
-SANE_Status sane_option_get_bool(SANE_Handle h, const char *option_name, SANE_Bool *val, SANE_Int *status) DECLSPEC_HIDDEN;
-SANE_Status sane_option_set_bool(SANE_Handle h, const char *option_name, SANE_Bool val, SANE_Int *status) DECLSPEC_HIDDEN;
-SANE_Status sane_option_set_fixed(SANE_Handle h, const char *option_name, SANE_Fixed val, SANE_Int *status) DECLSPEC_HIDDEN;
+SANE_Status sane_option_get_bool(const char *option_name, SANE_Bool *val, SANE_Int *status) DECLSPEC_HIDDEN;
+SANE_Status sane_option_set_bool(const char *option_name, SANE_Bool val, SANE_Int *status) DECLSPEC_HIDDEN;
+SANE_Status sane_option_set_fixed(const char *option_name, SANE_Fixed val, SANE_Int *status) DECLSPEC_HIDDEN;
 TW_UINT16 sane_status_to_twcc(SANE_Status rc) DECLSPEC_HIDDEN;
 BOOL convert_sane_res_to_twain(double sane_res, SANE_Unit unit, TW_FIX32 *twain_res, TW_UINT16 twtype) DECLSPEC_HIDDEN;