Changeset 10 for rxprtutl/trunk/rxprtutl.c
- Timestamp:
- Apr 14, 2013, 5:21:42 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rxprtutl/trunk/rxprtutl.c
r9 r10 100 100 "RPUQueueHold", 101 101 "RPUOpenView", 102 "RPUPortDelete", 102 103 "RPUPortDialog", 103 104 "RPUPortInstall", … … 121 122 RexxFunctionHandler RPUEnumPrinters; 122 123 RexxFunctionHandler RPUOpenView; 124 RexxFunctionHandler RPUPortDelete; 123 125 RexxFunctionHandler RPUPortDialog; 124 126 RexxFunctionHandler RPUPortInstall; … … 131 133 132 134 // TODO 133 RexxFunctionHandler RPUPortDelete;134 // - function to delete a printer (object, device and queue)135 135 136 136 // Internal functions … … 1011 1011 1012 1012 /* ------------------------------------------------------------------------- * 1013 * RPUPortDelete * 1014 * * 1015 * Deletes a printer port. * 1016 * * 1017 * REXX ARGUMENTS: * 1018 * 1. The name of the port to be deleted. (REQUIRED) * 1019 * * 1020 * REXX RETURN VALUE: * 1021 * 1 on success, or 0 if an error occurred. * 1022 * ------------------------------------------------------------------------- */ 1023 ULONG APIENTRY RPUPortDelete( PSZ pszName, ULONG argc, RXSTRING argv[], PSZ pszQueue, PRXSTRING prsResult ) 1024 { 1025 PSZ pszPortName; 1026 SPLERR rc = 0; 1027 1028 1029 // Reset the error indicator 1030 WriteErrorCode( 0, NULL ); 1031 1032 // Make sure we have at least one valid argument (the port name) 1033 if ( argc < 1 || ( !RXVALIDSTRING(argv[0]) )) return ( 40 ); 1034 pszPortName = strupr( argv[0].strptr ); 1035 1036 rc = SplDeletePort( NULL, pszPortName ); 1037 if ( rc == NO_ERROR ) { 1038 // Return 1 on success 1039 MAKERXSTRING( *prsResult, "1", 1 ); 1040 } 1041 else { 1042 WriteErrorCode( rc, "SplDeletePort"); 1043 MAKERXSTRING( *prsResult, "0", 1 ); 1044 } 1045 1046 return ( 0 ); 1047 } 1048 1049 1050 /* ------------------------------------------------------------------------- * 1013 1051 * RPUPrinterCreate * 1014 1052 * * … … 1119 1157 * 1 on success, or 0 if an error occurred. (1 will be returned even if * 1120 1158 * the WPS printer object could not be deleted, so long as the queue and * 1121 * device were d stroyed successfully.)*1159 * device were destroyed successfully.) * 1122 1160 * ------------------------------------------------------------------------- */ 1123 1161 ULONG APIENTRY RPUPrinterDelete( PSZ pszName, ULONG argc, RXSTRING argv[], PSZ pszQueue, PRXSTRING prsResult )
Note:
See TracChangeset
for help on using the changeset viewer.