summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-08-31 19:04:51 +0000
committerJeremy Allison <jra@samba.org>2000-08-31 19:04:51 +0000
commitfa810d4c8001c10bddce452b4ab1178eb80dee87 (patch)
tree59edc49534184b4b766e65e416630a2a2763f16d /source3/rpc_server/srv_spoolss_nt.c
parent288ea15a564e0931f8002cfb2ca3b4064bb4c227 (diff)
downloadsamba-fa810d4c8001c10bddce452b4ab1178eb80dee87.tar.gz
samba-fa810d4c8001c10bddce452b4ab1178eb80dee87.tar.bz2
samba-fa810d4c8001c10bddce452b4ab1178eb80dee87.zip
Implemented DELETEFORM tested using Gerald's Win32 test code :-).
Jeremy. (This used to be commit 596c21a2af0309ce43a5e52a343a671036d05ebf)
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 8f58f72d73..0938b37ab3 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -4615,6 +4615,31 @@ uint32 _spoolss_addform( POLICY_HND *handle,
/****************************************************************************
****************************************************************************/
+uint32 _spoolss_deleteform( POLICY_HND *handle, UNISTR2 *form_name)
+{
+ int count=0;
+ uint32 ret = 0;
+ nt_forms_struct *list=NULL;
+ Printer_entry *Printer = find_printer_index_by_hnd(handle);
+
+ DEBUG(5,("spoolss_deleteform\n"));
+
+ if (!OPEN_HANDLE(Printer)) {
+ DEBUG(0,("_spoolss_deleteform: Invalid handle (%s).\n", OUR_HANDLE(handle)));
+ return ERROR_INVALID_HANDLE;
+ }
+
+ count = get_ntforms(&list);
+ if(!delete_a_form(&list, form_name, &count, &ret))
+ return ERROR_INVALID_PARAMETER;
+
+ safe_free(list);
+
+ return ret;
+}
+
+/****************************************************************************
+****************************************************************************/
uint32 _spoolss_setform( POLICY_HND *handle,
const UNISTR2 *uni_name,
uint32 level,