[26] | 1 | #define INCL_DOS
|
---|
| 2 | #define INCL_GPI
|
---|
| 3 | #undef INCL_GPI
|
---|
| 4 | #define INCL_DEV
|
---|
| 5 | #define INCL_DOSMEMMGR /* Include standard OS/2 support */
|
---|
| 6 | #define INCL_DOSMODULEMGR /* For DosLoadModule */
|
---|
| 7 | #define INCL_DOSPROCESS
|
---|
| 8 | #define INCL_GPILCIDS
|
---|
| 9 | #define INCL_WINCOMMON /* Include Window Management support */
|
---|
| 10 | #define INCL_WINDOWMGR
|
---|
| 11 | #define INCL_WINSWITCHLIST
|
---|
| 12 | #define INCL_WINPROGRAMLIST
|
---|
| 13 | #define INCL_WINMENUS
|
---|
| 14 | #define INCL_WINWINDOWMGR
|
---|
| 15 | #define INCL_WINMESSAGEMGR
|
---|
| 16 | #define INCL_WINDIALOGS
|
---|
| 17 | #define INCL_WINSTATICS
|
---|
| 18 | #define INCL_WINLISTBOXES
|
---|
| 19 | #define INCL_WINMENUS
|
---|
| 20 | #define INCL_WINSYS
|
---|
| 21 | #define INCL_WINFRAMEMGR
|
---|
| 22 | #define INCL_INCLWINACCELERATORS
|
---|
| 23 | #define INCL_WINPOINTERS
|
---|
| 24 | #define INCL_WINERRORS
|
---|
| 25 | #define INCL_WINSHELLDATA
|
---|
| 26 |
|
---|
| 27 | #define INCL_WINTYPES
|
---|
| 28 | #define INCL_WINACCELERATORS
|
---|
| 29 | #define INCL_WINBUTTONS
|
---|
| 30 | #define INCL_WINENTRYFIELDS
|
---|
| 31 | #define INCL_WINRECTANGLES
|
---|
| 32 | #define INCL_WINTIMER
|
---|
| 33 | #define INCL_WINSCROLLBARS
|
---|
| 34 | #define INCL_WINHEAP
|
---|
| 35 | #define INCL_SHLERRORS
|
---|
| 36 | #define INCL_WININPUT
|
---|
| 37 | #define INCL_WINHELP
|
---|
| 38 | #define INCL_WINSTDSPIN
|
---|
| 39 |
|
---|
| 40 | #define INCL_SPL
|
---|
| 41 | #define INCL_SPLP
|
---|
| 42 | #define INCL_SPLERRORS
|
---|
| 43 | #define INCL_SHLERRORS
|
---|
| 44 | #define INCL_DOSERRORS
|
---|
| 45 | #define INCL_WINHOOKS
|
---|
[32] | 46 | #define INCL_WINSTDDLGS /* CUA Controls and dialogs */
|
---|
[26] | 47 |
|
---|
| 48 | #include <os2.h>
|
---|
| 49 |
|
---|
[5] | 50 | #define PATH_UNI_PDR "?:\\OS2\\DLL\\UNI.PDR"
|
---|
| 51 | #define UNI_DLL "UNI.PDR"
|
---|
| 52 |
|
---|
| 53 | #define NO_ERROR 0
|
---|
| 54 | #define ERROR_MORE_DATA 234
|
---|
| 55 | #define ERROR_INSUFFICIENT_BUFFER 122
|
---|
| 56 |
|
---|
| 57 | #define PORT_ID_1 5001
|
---|
| 58 | #define PORT_DESC_1 5002
|
---|
| 59 | #define PORT_ID_2 5003
|
---|
| 60 | #define PORT_DESC_2 5004
|
---|
| 61 | #define PORT_ID_3 5005
|
---|
| 62 | #define PORT_DESC_3 5006
|
---|
| 63 | #define PORT_ID_4 5007
|
---|
| 64 | #define PORT_DESC_4 5008
|
---|
| 65 | #define PORT_ID_5 5009
|
---|
| 66 | #define PORT_DESC_5 5010
|
---|
| 67 | #define PORT_ID_6 5011
|
---|
| 68 | #define PORT_DESC_6 5012
|
---|
| 69 | #define PORT_ID_7 5013
|
---|
| 70 | #define PORT_DESC_7 5014
|
---|
| 71 | #define PORT_ID_8 5015
|
---|
| 72 | #define PORT_DESC_8 5016
|
---|
| 73 | #define PORT_ID_9 5017
|
---|
| 74 | #define PORT_DESC_9 5018
|
---|
| 75 | #define PORT_ID_10 5019
|
---|
| 76 | #define PORT_DESC_10 5020
|
---|
| 77 | #define PORT_ID_11 5021
|
---|
| 78 | #define PORT_DESC_11 5022
|
---|
| 79 | #define PORT_ID_12 5023
|
---|
| 80 | #define PORT_DESC_12 5024
|
---|
| 81 | #define PORT_ID_13 5025
|
---|
| 82 | #define PORT_DESC_13 5026
|
---|
| 83 | #define PORT_ID_14 5027
|
---|
| 84 | #define PORT_DESC_14 5028
|
---|
| 85 | #define PORT_ID_15 5029
|
---|
| 86 | #define PORT_DESC_15 5030
|
---|
| 87 | #define PORT_ID_16 5031
|
---|
| 88 | #define PORT_DESC_16 5032
|
---|
| 89 | #define PORT_ID_17 5033
|
---|
| 90 | #define PORT_DESC_17 5034
|
---|
| 91 | #define PORT_ID_18 5035
|
---|
| 92 | #define PORT_DESC_18 5036
|
---|
| 93 | #define PORT_ID_19 5037
|
---|
| 94 | #define PORT_DESC_19 5038
|
---|
| 95 | #define PORT_ID_20 5039
|
---|
| 96 | #define PORT_DESC_20 5040
|
---|
| 97 | #define PORT_ID_21 5041
|
---|
| 98 | #define PORT_DESC_21 5042
|
---|
| 99 | #define PORT_ID_22 5043
|
---|
| 100 | #define PORT_DESC_22 5044
|
---|
| 101 | #define PORT_ID_23 5045
|
---|
| 102 | #define PORT_DESC_23 5046
|
---|
| 103 | #define PORT_ID_24 5047
|
---|
| 104 | #define PORT_DESC_24 5048
|
---|
| 105 | #define PORT_ID_25 5049
|
---|
| 106 | #define PORT_DESC_25 5050
|
---|
| 107 | #define PORT_ID_26 5051
|
---|
| 108 | #define PORT_DESC_26 5052
|
---|
| 109 | #define PORT_ID_27 5053
|
---|
| 110 | #define PORT_DESC_27 5054
|
---|
| 111 | #define PORT_ID_28 5055
|
---|
| 112 | #define PORT_DESC_28 5056
|
---|
| 113 | #define PORT_ID_29 5057
|
---|
| 114 | #define PORT_DESC_29 5058
|
---|
| 115 | #define PORT_ID_30 5059
|
---|
| 116 | #define PORT_DESC_30 5060
|
---|
| 117 | #define PORT_ID_31 5061
|
---|
| 118 | #define PORT_DESC_31 5062
|
---|
| 119 | #define PORT_ID_32 5063
|
---|
| 120 | #define PORT_DESC_32 5064
|
---|
| 121 | #define PORT_ID_33 5065
|
---|
| 122 | #define PORT_DESC_33 5066
|
---|
| 123 | #define PORT_ID_34 5067
|
---|
| 124 | #define PORT_DESC_34 5068
|
---|
| 125 | #define PORT_ID_35 5069
|
---|
| 126 | #define PORT_DESC_35 5070
|
---|
| 127 | #define PORT_ID_36 5071
|
---|
| 128 | #define PORT_DESC_36 5072
|
---|
| 129 | #define PORT_ID_37 5073
|
---|
| 130 | #define PORT_DESC_37 5074
|
---|
| 131 | #define PORT_ID_38 5075
|
---|
| 132 | #define PORT_DESC_38 5076
|
---|
| 133 | #define PORT_ID_39 5077
|
---|
| 134 | #define PORT_DESC_39 5078
|
---|
| 135 | #define PORT_ID_40 5079
|
---|
| 136 | #define PORT_DESC_40 5080
|
---|
| 137 | #define PORT_ID_41 5081
|
---|
| 138 | #define PORT_DESC_41 5082
|
---|
| 139 | #define PORT_ID_42 5083
|
---|
| 140 | #define PORT_DESC_42 5084
|
---|
| 141 | #define PORT_ID_43 5085
|
---|
| 142 | #define PORT_DESC_43 5086
|
---|
| 143 | #define PORT_ID_44 5087
|
---|
| 144 | #define PORT_DESC_44 5088
|
---|
| 145 | #define PORT_ID_45 5089
|
---|
| 146 | #define PORT_DESC_45 5090
|
---|
| 147 | #define PORT_ID_46 5091
|
---|
| 148 | #define PORT_DESC_46 5092
|
---|
| 149 | #define PORT_ID_47 5093
|
---|
| 150 | #define PORT_DESC_47 5094
|
---|
| 151 | #define PORT_ID_48 5095
|
---|
| 152 | #define PORT_DESC_48 5096
|
---|
| 153 | #define PORT_ID_49 5097
|
---|
| 154 | #define PORT_DESC_49 5098
|
---|
| 155 | #define PORT_ID_50 5099
|
---|
| 156 | #define PORT_DESC_50 5100
|
---|
| 157 | #define PORT_ID_51 5101
|
---|
| 158 | #define PORT_DESC_51 5102
|
---|
| 159 | #define PORT_ID_52 5103
|
---|
| 160 | #define PORT_DESC_52 5104
|
---|
| 161 | #define PORT_ID_53 5105
|
---|
| 162 | #define PORT_DESC_53 5106
|
---|
| 163 | #define PORT_ID_54 5107
|
---|
| 164 | #define PORT_DESC_54 5108
|
---|
| 165 | #define PORT_ID_55 5109
|
---|
| 166 | #define PORT_DESC_55 5110
|
---|
| 167 | #define PORT_ID_56 5111
|
---|
| 168 | #define PORT_DESC_56 5112
|
---|
| 169 | #define PORT_ID_57 5113
|
---|
| 170 | #define PORT_DESC_57 5114
|
---|
| 171 | #define PORT_ID_58 5115
|
---|
| 172 | #define PORT_DESC_58 5116
|
---|
| 173 | #define PORT_ID_59 5117
|
---|
| 174 | #define PORT_DESC_59 5118
|
---|
| 175 | #define PORT_ID_60 5119
|
---|
| 176 | #define PORT_DESC_60 5120
|
---|
| 177 | #define PORT_ID_61 5121
|
---|
| 178 | #define PORT_DESC_61 5122
|
---|
| 179 | #define PORT_ID_62 5123
|
---|
| 180 | #define PORT_DESC_62 5124
|
---|
| 181 | #define PORT_ID_63 5125
|
---|
| 182 | #define PORT_DESC_63 5126
|
---|
| 183 | #define PORT_ID_64 5127
|
---|
| 184 | #define PORT_DESC_64 5128
|
---|
| 185 |
|
---|
| 186 |
|
---|
| 187 | #define PORT_HELP_TITLE 5900
|
---|
| 188 | #define PORT_ERR_TITLE 7000
|
---|
| 189 |
|
---|
| 190 | #define PDR_ID_PROPERTIES 6001
|
---|
| 191 |
|
---|
| 192 | #define PORT_ID_FIRST PORT_ID_1
|
---|
| 193 | #define PORT_ID_LAST PORT_ID_64
|
---|
| 194 | #define MAX_PORTS 64
|
---|
| 195 |
|
---|
| 196 | #define UNI_ICON 7001
|
---|
| 197 |
|
---|
| 198 | #define STR_LEN_PORTNAME 64
|
---|
| 199 | #define STR_LEN_PORTDESC 256
|
---|
| 200 | #define STR_LEN_DESC 81
|
---|
| 201 | #define PORT_ENTRY_LEN 256
|
---|
| 202 | #define STR_LEN_TITLE 256
|
---|
| 203 |
|
---|
| 204 | /*
|
---|
| 205 | ** port defaults
|
---|
| 206 | */
|
---|
[20] | 207 | #define DEF_INITIALIZATION ".exe#%file%#;"
|
---|
[5] | 208 | #define DEF_TERMINATION ";"
|
---|
| 209 | #define DEF_PORTDRIVER "UNI;"
|
---|
| 210 | #define DEF_PORTNAME "UNI" /* Must update build script if this is changed! */
|
---|
| 211 | #define DEF_TIMEOUT "45;"
|
---|
| 212 |
|
---|
| 213 | #define APPNAME_LEAD_STR "PM_"
|
---|
| 214 |
|
---|
| 215 | #define KEY_DESCRIPTION "DESCRIPTION"
|
---|
| 216 | #define KEY_INITIALIZATION "INITIALIZATION"
|
---|
| 217 | #define KEY_TERMINATION "TERMINATION"
|
---|
| 218 | #define KEY_PORTDRIVER "PORTDRIVER"
|
---|
| 219 | #define KEY_TIMEOUT "TIMEOUT"
|
---|
| 220 |
|
---|
| 221 | #define APPNAME_PM_SPOOLER_PORT "PM_SPOOLER_PORT"
|
---|
| 222 | #define IDD_UNI 200
|
---|
| 223 | #define ID_NUMBER_OF_DESC_LINES 8000
|
---|
| 224 | #define ID_FIRST_DESC_LINES 8001
|
---|
| 225 |
|
---|
[26] | 226 | typedef struct _UNIDATA
|
---|
[5] | 227 | {
|
---|
| 228 | HAB hAB;
|
---|
| 229 | HMODULE hModule;
|
---|
| 230 | PSZ pszPortName;
|
---|
| 231 | PSZ pszAppName;
|
---|
| 232 | CHAR szSaveLprSetting[PORT_ENTRY_LEN+1];
|
---|
| 233 | ULONG lfModified;
|
---|
[26] | 234 | } UNIDATA, *PUNIDATA;
|
---|
[20] | 235 |
|
---|
[26] | 236 | typedef struct _PORTNAMES
|
---|
| 237 | {
|
---|
| 238 | PSZ pszPortName; /* -> name of port(ie "LPT1) */
|
---|
| 239 | PSZ pszPortDesc; /* -> description of port(ie "Parallel Port 1") */
|
---|
| 240 | } PORTNAMES, *PPORTNAMES;
|
---|
| 241 |
|
---|
[29] | 242 | #define GB_UNICFG 201
|
---|
| 243 | #define ID_PROGRAM 202
|
---|
| 244 | #define DT_PROGRAM 203
|
---|
| 245 | #define ID_PARAMETERS 204
|
---|
| 246 | #define DT_PARAMETERS 205
|
---|
| 247 | #define DT_DIRECTORY 206
|
---|
| 248 | #define ID_DIRECTORY 207
|
---|
| 249 | #define DID_FIND 208
|
---|
| 250 | #define DID_SETUPWIZARD 209
|
---|
[32] | 251 | #define ID_ADDPS 210
|
---|