Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

722 lines
25 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // File: DG.hxx
  4. //
  5. // Contents: Class declarations for the base DataGen tool APIs.
  6. //
  7. // Classes: DG_BASE - Base class for all DataGen classes.
  8. //
  9. // DG_INTEGER - DataGen class to generate random integer types.
  10. //
  11. // DG_REAL - DataGen class to generate random floating point
  12. // number types.
  13. //
  14. // DG_ASCII - DataGen class to generate random ASCII character
  15. // strings.
  16. //
  17. // DG_UNICODE - DataGen class to generate random Unicode
  18. // character strings.
  19. //
  20. // DG_BSTR - DataGen class to generate random BSTR's
  21. //
  22. // DG_STRING - DataGen system independent strings
  23. //
  24. // Functions: None.
  25. //
  26. // History: 11-Mar-92 RonJo Created by breaking off the appropriate
  27. // parts of DataGen.hxx.
  28. //
  29. // 21-Oct-92 RonJo Removed long double reference when
  30. // compiling for Win32/NT because it does
  31. // not support long doubles.
  32. //
  33. // 22-Mar-94 RickTu Added BSTR support for Win32/Cairo.
  34. //
  35. // 12-Apr-96 MikeW Base BSTR off of OLECHAR not WCHAR
  36. //
  37. // 07-Nov-96 BogdanT Added DG_STRING combining DG_ASCII&DG_UNICODE
  38. //
  39. // 11-Nov-97 a-sverrt Added member functions that provide access to
  40. // the hidden members of the private base class
  41. // ( member using-declarations ) to remove the "access
  42. // declarations are deprecated" warning on the Macintosh.
  43. //
  44. // Note: DataGen is not multithread safe. It is not a problem of
  45. // crashing, but instead values used internally to generate
  46. // the next value get changed by subsequent threads before
  47. // the new value is finally calculated. To avoid this, tests
  48. // should either generate the values in the parent thread
  49. // before starting the threads, or generate seed values and
  50. // provide a separate datagen object for each thread. dda
  51. //
  52. //----------------------------------------------------------------------------
  53. #ifndef __DG_HXX__
  54. //
  55. // INCLUDE FILES
  56. //
  57. #ifdef FLAT
  58. #ifndef _WINDOWS_
  59. #include <windows.h>
  60. #endif
  61. #else
  62. // Need DOS/Win3.1 include file for types here.
  63. //DAVEY
  64. #include <windows.h>
  65. #include <port1632.h>
  66. #include <types16.h>
  67. #endif
  68. #include <limits.h>
  69. #include <stdio.h>
  70. #include <float.h>
  71. //
  72. // TYPEDEFS
  73. //
  74. typedef float FLOAT; // flt
  75. typedef double DOUBLE; // dbl
  76. #ifndef FLAT
  77. typedef long double LDOUBLE; // ldbl
  78. #endif
  79. // Typedef SCHAR here because compiles will occur either with -J or not.
  80. // If not, then CHAR will be the same as SCHAR, and if it is, then CHAR
  81. // will be the same as UCHAR. Therefore, both of theses are supported.
  82. //
  83. typedef signed char SCHAR;
  84. typedef unsigned char UCHAR;
  85. //
  86. // DEFINED CONSTANTS
  87. //
  88. // Put this here in case none of of the headers have it yet. It really
  89. // ought to be in limits.h, but it may not be. The -2 is because the
  90. // last two "characters" are "non-characters" used for the byte order
  91. // mark.
  92. //
  93. #ifndef WCHAR_MAX
  94. #define WCHAR_MAX (USHRT_MAX - 2)
  95. #endif
  96. #if defined(WIN16) || defined(_MAC)
  97. #define OLECHAR_MAX CHAR_MAX
  98. #define DG_BSTR_BASE DG_ASCII
  99. #else
  100. #define OLECHAR_MAX (USHRT_MAX - 2)
  101. #define DG_BSTR_BASE DG_UNICODE
  102. #endif
  103. //
  104. // CONSTANTS
  105. //
  106. const USHORT DG_UNDEFINED_TYPE = 0;
  107. const USHORT DG_ASCII_TYPE = sizeof(CHAR);
  108. const USHORT DG_UNICODE_TYPE = sizeof(WCHAR);
  109. const UCHAR DG_APRINT_MIN = ' ';
  110. const UCHAR DG_APRINT_MAX = '~';
  111. const ULONG DG_DEFAULT_MAXLEN = 128;
  112. const ULONG DG_SYMBOLTABLE_SIZE = (ULONG)(USHRT_MAX + 1L);
  113. const USHORT DG_SYMBOLTABLE_END = (USHORT)(WCHAR_MAX + 1);
  114. const USHORT DG_ERROR_STRING_SIZE = 256; // This is characters, not bytes.
  115. // Return Codes
  116. const USHORT DG_RC_SUCCESS = 0;
  117. const USHORT DG_RC_END_OF_FILE = 1;
  118. const USHORT DG_RC_NOT_SUPPORTED = 9;
  119. const USHORT DG_RC_OUT_OF_MEMORY = 10;
  120. const USHORT DG_RC_OUT_OF_DISK = 11;
  121. const USHORT DG_RC_BAD_NUMBER_PTR = 20;
  122. const USHORT DG_RC_BAD_STRING_PTR = 21;
  123. const USHORT DG_RC_BAD_LENGTH_PTR = 22;
  124. const USHORT DG_RC_BAD_VALUES = 23;
  125. const USHORT DG_RC_BAD_LENGTHS = 24;
  126. const USHORT DG_RC_BAD_SYNTAX = 30;
  127. const USHORT DG_RC_BAD_NODE_TYPE = 31;
  128. const USHORT DG_RC_BAD_TMP_FILE = 40;
  129. const USHORT DG_RC_BAD_INPUT_FILE = 41;
  130. const USHORT DG_RC_BAD_OUTPUT_FILE = 42;
  131. const USHORT DG_RC_BAD_FILE_TYPE = 43;
  132. const USHORT DG_RC_BAD_FILE_STATE = 44;
  133. const USHORT DG_RC_BAD_INPUT_BUFFER = 50;
  134. const USHORT DG_RC_BAD_OUTPUT_BUFFER = 51;
  135. const USHORT DG_RC_BAD_BUFFER_TYPE = 52;
  136. const USHORT DG_RC_BAD_ASCII_CONVERSION = 60;
  137. const USHORT DG_RC_BAD_UNICODE_CONVERSION = 61;
  138. const USHORT DG_RC_UNABLE_TO_OPEN_FILE = 100;
  139. const USHORT DG_RC_UNABLE_TO_SEEK_FILE = 101;
  140. const USHORT DG_RC_UNABLE_TO_READ_FILE = 102;
  141. const USHORT DG_RC_UNABLE_TO_WRITE_FILE = 103;
  142. const USHORT DG_RC_UNKNOWN_ERROR = 888;
  143. //
  144. // FORWARD DECLARATIONS
  145. //
  146. class DG_BASE;
  147. class DG_INTEGER;
  148. class DG_REAL;
  149. class DG_ASCII;
  150. #ifndef WIN16
  151. class DG_UNICODE;
  152. class DG_BSTR;
  153. #endif
  154. // Typedef DG_STRING for system independent use of DGs
  155. //
  156. #if defined(_MAC) || defined(WIN16)
  157. typedef DG_ASCII DG_STRING;
  158. #else
  159. typedef DG_UNICODE DG_STRING;
  160. #endif
  161. //+---------------------------------------------------------------------------
  162. //
  163. // Class: DG_BASE (dgb)
  164. //
  165. // Purpose: Base class for all DataGen classes. Provides constructor,
  166. // and destructor, along with other miscellaneous common member
  167. // functions.
  168. //
  169. // Interface: DG_BASE - Sets the internal seed to the value parameter
  170. // passed, or to a random value if the parameter
  171. // value is 0. Then sets up the internal random
  172. // number tables. All this is done by calling
  173. // SetSeed()
  174. //
  175. // ~DG_BASE - Nothing at this time.
  176. //
  177. // SetSeed - Resets the internal seed to the value parameter
  178. // passed, or to a random value if the parameter
  179. // passed is 0. Then resets the internal random
  180. // number tables based on the internal seed.
  181. //
  182. // GetSeed - Returns the value of the internal seed to the
  183. // caller.
  184. //
  185. // Error - Returns the last setting of the return code by
  186. // the DG_BASE based object, and if available, a
  187. // string containing more information about the
  188. // error. If there is no further information, the
  189. // string pointer will be NULL.
  190. //
  191. // Notes: None.
  192. //
  193. // History: 14-Sep-91 RonJo Created.
  194. //
  195. // 25-Nov-91 RonJo Added prefixed underscores to all
  196. // protected and private members.
  197. //
  198. // 25-Nov-91 RonJo Moved the Error member function from
  199. // the DATAGEN class to here.
  200. //
  201. //----------------------------------------------------------------------------
  202. class DG_BASE
  203. {
  204. public:
  205. DG_BASE(ULONG ulNewSeed);
  206. ~DG_BASE(VOID)
  207. {} // Intentionally empty.
  208. USHORT SetSeed(ULONG ulNewSeed);
  209. USHORT GetSeed(ULONG *pulSeed);
  210. ULONG GetSeed () { return _ulSeed; }
  211. protected:
  212. ULONG _Multiply(ULONG ulP, ULONG ulQ);
  213. FLOAT _Floater(VOID);
  214. ULONG _ulNumber;
  215. USHORT _usRet;
  216. static ULONG ULONG_MAX_SQRT;
  217. private:
  218. VOID _BitReverse(VOID *pvStream, USHORT cBytes, VOID *pvRevStream);
  219. ULONG _ulSeed;
  220. };
  221. //+---------------------------------------------------------------------------
  222. //
  223. // Class: DG_INTEGER (dgi)
  224. //
  225. // Purpose: DataGen class for generating random integers. This includes
  226. // any type of integer from char to long and unsigned versions
  227. // of each of these types.
  228. //
  229. // Interface: DG_INTEGER - Only passes a seed value back to the DG_BASE
  230. // constructor.
  231. //
  232. // Generate - Returns an integer of the type pointed to by
  233. // the p@Number parameter, where @ is the hungarian
  234. // representation of the prescribed type (e.g. an
  235. // ULONG would be pulNumber). The range of the
  236. // random integer is bounded if bounds are provided,
  237. // otherwise, the bounds are the maximum bounds for
  238. // the data type.
  239. //
  240. // Notes: None.
  241. //
  242. // History: 14-Sep-91 RonJo Created.
  243. //
  244. //----------------------------------------------------------------------------
  245. class DG_INTEGER : public DG_BASE
  246. {
  247. public:
  248. DG_INTEGER(ULONG ulNewSeed = 0L) : DG_BASE(ulNewSeed)
  249. {} // Intentionally NULL.
  250. USHORT Generate(SCHAR *pschNumber,
  251. SCHAR schMinVal = SCHAR_MIN,
  252. SCHAR schMaxVal = SCHAR_MAX);
  253. USHORT Generate(UCHAR *puchNumber,
  254. UCHAR uchMinVal = 0,
  255. UCHAR uchMaxVal = UCHAR_MAX);
  256. #ifndef WIN16
  257. USHORT Generate(SHORT *psNumber,
  258. SHORT sMinVal = SHRT_MIN,
  259. SHORT sMaxVal = SHRT_MAX);
  260. USHORT Generate(USHORT *pusNumber,
  261. USHORT usMinVal = 0,
  262. USHORT usMaxVal = USHRT_MAX);
  263. #endif
  264. USHORT Generate(INT *pintNumber,
  265. INT intMinVal = INT_MIN,
  266. INT intMaxVal = INT_MAX);
  267. USHORT Generate(UINT *puintNumber,
  268. UINT uintMinVal = 0,
  269. UINT uintMaxVal = UINT_MAX);
  270. USHORT Generate(LONG *plNumber,
  271. LONG lMinVal = LONG_MIN,
  272. LONG lMaxVal = LONG_MAX);
  273. USHORT Generate(ULONG *pulNumber,
  274. ULONG ulMinVal = 0L,
  275. ULONG ulMaxVal = ULONG_MAX,
  276. BOOL bStd = FALSE);
  277. };
  278. //+---------------------------------------------------------------------------
  279. //
  280. // Class: DG_REAL (dgr)
  281. //
  282. // Purpose: DataGen class for generating random floating point numbers.
  283. // This includes any type of floating point number from float to
  284. // long double.
  285. //
  286. // Interface: DG_REAL - Only passes a seed value back to the DG_BASE
  287. // constructor.
  288. //
  289. // Generate - Returns an floating point number of the type
  290. // pointed to by the p@Number parameter, where @ is
  291. // an abbreviation of the prescribed type (e.g. a
  292. // double would be pdblNumber). The range of the
  293. // random point number is bounded if bounds are
  294. // provided otherwise, the bounds are the maximum
  295. // values allowed for the data type.
  296. //
  297. // Notes: The defaults for the minimum and maximum values allow for
  298. // only producing positive numbers. If you give negative
  299. // minimum and/or maximum values, remember that the maximum
  300. // range for that type is then halved.
  301. //
  302. // History: 11-Mar-92 RonJo Created.
  303. //
  304. // 21-Oct-92 RonJo Removed long double version when
  305. // compiling for Win32/NT.
  306. //
  307. //----------------------------------------------------------------------------
  308. class DG_REAL : public DG_BASE
  309. {
  310. public:
  311. DG_REAL(ULONG ulNewSeed = 0L) : DG_BASE(ulNewSeed)
  312. {} // Intentionally NULL.
  313. USHORT Generate(FLOAT *pfltNumber,
  314. FLOAT fltMinVal = 0.0,
  315. FLOAT fltMaxVal = FLT_MAX);
  316. USHORT Generate(DOUBLE *pdblNumber,
  317. DOUBLE dblMinVal = 0.0,
  318. DOUBLE dblMaxVal = DBL_MAX);
  319. #ifndef FLAT
  320. USHORT Generate(LDOUBLE *pldblNumber,
  321. LDOUBLE ldblMinVal = 0.0,
  322. LDOUBLE ldblMaxVal = LDBL_MAX);
  323. #endif
  324. };
  325. //+---------------------------------------------------------------------------
  326. //
  327. // Class: DG_ASCII (dga)
  328. //
  329. // Purpose: DataGen class for generating random ASCII character strings
  330. // of random length (expected length of 5, see datagen.doc).
  331. // A NULL ((UCHAR)0) terminated string of printable characters
  332. // may be returned, or the range or a selection of any legal
  333. // 8 bit characters may be specified, as may a length for the
  334. // string.
  335. //
  336. // Interface: DG_ASCII - Passes the seed value back to the DG_INTEGER
  337. // constructor, and initializes fNull.
  338. //
  339. // Generate - Returns a random character, random length string,
  340. // (NULL) NULL terminated string. By default, only print-
  341. // able, ASCII characters are used.
  342. //
  343. // Generate - Returns a random character, random length string,
  344. // (bounds) where the characters may be limited by range
  345. // bounds, and the length by length bounds. The
  346. // default allows the use of any 8-bit character,
  347. // and the expected length is 5 characters, with a
  348. // minimum of 1 character, and a maximum of 128
  349. // characters.
  350. //
  351. // Generate - Returns a random character, random length string,
  352. // (select) where the characters will be chosen from the
  353. // selection argument, and the length may be limited
  354. // by length bounds. If the selection argument is
  355. // an empty string, then a 0 length string is
  356. // returned. If the selection argument is NULL,
  357. // then the characters may be any 8-bit character.
  358. // The default expected length is 5 characters, with
  359. // a minimum of 1 character, and a maximum of 128
  360. // characters.
  361. //
  362. // Generate - Returns a random character, random length, NULL-
  363. // (select, terminated string, where the characters will be
  364. // NULL) chosen from the selection argument, and the length
  365. // may be limited by length bounds. If the selection
  366. // argument is an empty string, then a 0 length string
  367. // is returned. If the selection argument is NULL,
  368. // then the characters may be any 8-bit character.
  369. // The default expected length is 5 characters, with
  370. // a minimum of 1 character, and a maximum of 128
  371. // characters.
  372. //
  373. // Notes: None.
  374. //
  375. // History: 14-Sep-91 RonJo Created.
  376. //
  377. // 25-Nov-91 RonJo Added prefixed underscores to all
  378. // protected and private members.
  379. //
  380. // 8-Jun-92 DeanE Added Generate(select, NULL-terminated)
  381. // function.
  382. //
  383. //----------------------------------------------------------------------------
  384. class DG_ASCII : private DG_INTEGER
  385. {
  386. public:
  387. DG_ASCII(ULONG ulNewSeed = 0L) : DG_INTEGER(ulNewSeed),
  388. _fNull(FALSE)
  389. {} // Intentionally NULL.
  390. USHORT Generate(CHAR **pszString,
  391. UCHAR uchMinVal = DG_APRINT_MIN,
  392. UCHAR uchMaxVal = DG_APRINT_MAX,
  393. ULONG ulMinLen = 1,
  394. ULONG ulMaxLen = DG_DEFAULT_MAXLEN);
  395. USHORT Generate(UCHAR **puchString,
  396. ULONG *pulLength,
  397. UCHAR uchMinVal = 0,
  398. UCHAR uchMaxVal = UCHAR_MAX,
  399. ULONG ulMinLen = 1,
  400. ULONG ulMaxLen = DG_DEFAULT_MAXLEN);
  401. USHORT Generate(UCHAR **puchString,
  402. ULONG *pulLength,
  403. UCHAR *puchSelection,
  404. ULONG ulSelLength,
  405. ULONG ulMinLen = 1,
  406. ULONG ulMaxLen = DG_DEFAULT_MAXLEN);
  407. USHORT Generate(UCHAR **puszString,
  408. UCHAR *puszSelection,
  409. ULONG ulMinLen = 1,
  410. ULONG ulMaxLen = DG_DEFAULT_MAXLEN);
  411. //
  412. // Need to make the following inherited member functions public again
  413. // since DG_INTEGER was privately inherited.
  414. //
  415. #ifdef _MAC
  416. USHORT SetSeed(ULONG ulNewSeed) { return DG_INTEGER::SetSeed(ulNewSeed); };
  417. USHORT GetSeed(ULONG *pulSeed) { return DG_INTEGER::GetSeed(pulSeed); };
  418. ULONG GetSeed () { return DG_INTEGER::GetSeed(); }
  419. #else
  420. DG_INTEGER::SetSeed;
  421. DG_INTEGER::GetSeed;
  422. #endif
  423. private:
  424. VOID _LenMem(UCHAR **puchString,
  425. ULONG *pulLength,
  426. ULONG ulMinLen,
  427. ULONG ulMaxLen);
  428. BOOL _fNull;
  429. };
  430. #ifndef WIN16
  431. //+---------------------------------------------------------------------------
  432. //
  433. // Class: DG_UNICODE (dgu)
  434. //
  435. // Purpose: DataGen class for generating random Unicode character strings
  436. // of random length (expected length of 5, see datagen.doc).
  437. // The range or a selection of characters to be used may be
  438. // specified, as may a length for the string.
  439. //
  440. // Interface: DG_UNICODE - Passes the seed value back to the DG_INTEGER
  441. // constructor, and initializes fNull.
  442. //
  443. // Generate - Returns a random character, random length,
  444. // (NULL) (WCHAR)NULL terminated string. By default, only
  445. // printable, ASCII characters are used.
  446. //
  447. // Generate - Returns a random character, random length string,
  448. // (bounds) where the characters may be limited by range
  449. // bounds, and the length by length bounds. The
  450. // default allows the use of any 16-bit character,
  451. // and the expected length is 5 characters, with a
  452. // minimum of 1 character, and a maximum of 128
  453. // characters.
  454. //
  455. // Generate - Returns a random character, random length string,
  456. // (select) where the characters will be chosen from the
  457. // selection argument, and the length may be limited
  458. // by length bounds. If the selection argument is
  459. // an empty string, then a 0 length string is
  460. // returned. If the selection argument is NULL,
  461. // then the characters may be any 16-bit character.
  462. // The default expected length is 5 characters, with
  463. // a minimum of 1 character, and a maximum of 128
  464. // characters.
  465. //
  466. // Generate - Returns a random character, random length, NULL-
  467. // (select, terminated string, where the characters will be
  468. // NULL) chosen from the selection argument, and the
  469. // length may be limited by length bounds. If the
  470. // selection argument is an empty string, then a 0
  471. // length string is returned. If the selection
  472. // argument is NULL, then the characters may be any
  473. // 16-bit character. The default expected length
  474. // is 5 characters, with a minimum of 1 character,
  475. // and a maximum of 128 characters.
  476. //
  477. // Notes:
  478. //
  479. // History: 11-Mar-92 RonJo Created.
  480. //
  481. // 19-May-92 RonJo Added Generate(NULL) member function.
  482. //
  483. // 8-Jun-92 DeanE Added Generate(select, NULL-terminated)
  484. // function.
  485. //
  486. //----------------------------------------------------------------------------
  487. class DG_UNICODE : private DG_INTEGER
  488. {
  489. public:
  490. DG_UNICODE(ULONG ulNewSeed = 0L) : DG_INTEGER(ulNewSeed)
  491. {} // Intentionally NULL.
  492. // BUGBUG: There are no Min and Max printable WCHAR characters at
  493. // this time, so the defaults will be the ASCII printable
  494. // characters for now.
  495. //
  496. USHORT Generate(WCHAR **pwszString,
  497. WCHAR wchMinVal = DG_APRINT_MIN,
  498. WCHAR wchMaxVal = DG_APRINT_MAX,
  499. ULONG ulMinLen = 1,
  500. ULONG ulMaxLen = DG_DEFAULT_MAXLEN);
  501. USHORT Generate(WCHAR **pwchString,
  502. ULONG *pulLength,
  503. WCHAR wchMinVal = 0,
  504. WCHAR wchMaxVal = WCHAR_MAX,
  505. ULONG ulMinLen = 1L,
  506. ULONG ulMaxLen = DG_DEFAULT_MAXLEN);
  507. USHORT Generate(WCHAR **pwchString,
  508. ULONG *pulLength,
  509. WCHAR *pwcsSelection,
  510. ULONG ulSelLength,
  511. ULONG ulMinLen = 1L,
  512. ULONG ulMaxLen = DG_DEFAULT_MAXLEN);
  513. USHORT Generate(WCHAR **pwszString,
  514. WCHAR *pwszSelection,
  515. ULONG ulMinLen = 1L,
  516. ULONG ulMaxLen = DG_DEFAULT_MAXLEN);
  517. //
  518. // Need to make the following inherited member functions public
  519. // again since DG_INTEGER was privately inherited.
  520. //
  521. #ifdef _MAC
  522. USHORT SetSeed(ULONG ulNewSeed) { return DG_INTEGER::SetSeed(ulNewSeed); };
  523. USHORT GetSeed(ULONG *pulSeed) { return DG_INTEGER::GetSeed(pulSeed); };
  524. ULONG GetSeed () { return DG_INTEGER::GetSeed(); }
  525. #else
  526. DG_INTEGER::SetSeed;
  527. DG_INTEGER::GetSeed;
  528. #endif
  529. private:
  530. VOID _LenMem(WCHAR **pwchString,
  531. ULONG *pulLength,
  532. ULONG ulMinLen,
  533. ULONG ulMaxLen);
  534. BOOL _fNull;
  535. };
  536. //+---------------------------------------------------------------------------
  537. //
  538. // Class: DG_BSTR (dgs)
  539. //
  540. // Purpose: DataGen class for generating random BSTR character strings
  541. // of random length (expected length of 5, see datagen.doc).
  542. // The range or a selection of characters to be used may be
  543. // specified, as may a length for the string.
  544. //
  545. // Interface: DG_BSTR - Passes the seed value back to the DG_INTEGER
  546. // constructor, and initializes fNull.
  547. //
  548. // Generate - Returns a random character, random length,
  549. // (NULL) (OLECHAR)NULL terminated string.
  550. //
  551. // Generate - Returns a random character, random length string,
  552. // (bounds) where the characters may be limited by range
  553. // bounds, and the length by length bounds. The
  554. // default allows the use of any 16-bit character,
  555. // and the expected length is 5 characters, with a
  556. // minimum of 1 character, and a maximum of 128
  557. // characters.
  558. //
  559. // Notes:
  560. //
  561. // History: 22-Mar-93 RickTu Created (based on DG_UNICODE).
  562. //
  563. //----------------------------------------------------------------------------
  564. class DG_BSTR : private DG_BSTR_BASE
  565. {
  566. public:
  567. DG_BSTR(ULONG ulNewSeed = 0L) : DG_BSTR_BASE(ulNewSeed)
  568. {} // Intentionally NULL.
  569. USHORT Generate(BSTR *pbstrString,
  570. OLECHAR chMinVal = 0,
  571. OLECHAR chMaxVal = OLECHAR_MAX,
  572. ULONG ulMinLen = 1,
  573. ULONG ulMaxLen = DG_DEFAULT_MAXLEN);
  574. USHORT Generate(BSTR *pbstrString,
  575. ULONG *pulLength,
  576. OLECHAR chMinVal = 0,
  577. OLECHAR chMaxVal = OLECHAR_MAX,
  578. ULONG ulMinLen = 1L,
  579. ULONG ulMaxLen = DG_DEFAULT_MAXLEN);
  580. //
  581. // Need to make the following inherited member functions public
  582. // again since DG_UNICODE was privately inherited.
  583. //
  584. #ifndef _MAC
  585. DG_BSTR_BASE::SetSeed;
  586. DG_BSTR_BASE::GetSeed;
  587. #endif
  588. private:
  589. };
  590. #endif //WIN16
  591. #define __DG_HXX__
  592. #endif
  593.