Source code of Windows XP (NT5)
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.

756 lines
19 KiB

  1. /*****************************************************************************\
  2. * MODULE: stubs.c
  3. *
  4. * This module contains the stub routines for unimplemented (non-required)
  5. * Print-Provider functions.
  6. *
  7. *
  8. * Copyright (C) 1996-1997 Microsoft Corporation
  9. * Copyright (C) 1996-1997 Hewlett Packard
  10. *
  11. * History:
  12. * 07-Oct-1996 HWP-Guys Initiated port from win95 to winNT
  13. *
  14. \*****************************************************************************/
  15. #include "precomp.h"
  16. #include "priv.h"
  17. /*****************************************************************************\
  18. * _stub_routine (Local Routine)
  19. *
  20. * Common code for stubbed PP routines. Sets last error to the specified
  21. * number, then returns FALSE.
  22. *
  23. \*****************************************************************************/
  24. BOOL _stub_routine(VOID)
  25. {
  26. SetLastError(ERROR_INVALID_NAME);
  27. return FALSE;
  28. }
  29. /*****************************************************************************\
  30. * stubAddPrinter
  31. *
  32. *
  33. \*****************************************************************************/
  34. HANDLE stubAddPrinter(
  35. LPTSTR pszName,
  36. DWORD dwLevel,
  37. LPBYTE pbPrinter)
  38. {
  39. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubAddPrinter")));
  40. return (HANDLE)IntToPtr(_stub_routine());
  41. }
  42. /*****************************************************************************\
  43. * stubDeletePrinter
  44. *
  45. *
  46. \*****************************************************************************/
  47. BOOL stubDeletePrinter(
  48. HANDLE hPrinter)
  49. {
  50. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubDeletePrinter")));
  51. return _stub_routine();
  52. }
  53. /*****************************************************************************\
  54. * stubReadPrinter
  55. *
  56. *
  57. \*****************************************************************************/
  58. BOOL stubReadPrinter(
  59. HANDLE hPrinter,
  60. LPVOID pBuf,
  61. DWORD cbBuf,
  62. LPDWORD pNoBytesRead)
  63. {
  64. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubReadPrinter")));
  65. return _stub_routine();
  66. }
  67. /*****************************************************************************\
  68. * stubGetPrinterData
  69. *
  70. *
  71. \*****************************************************************************/
  72. DWORD stubGetPrinterData(
  73. HANDLE hPrinter,
  74. LPTSTR pszValueName,
  75. LPDWORD pType,
  76. LPBYTE pbData,
  77. DWORD dwSize,
  78. LPDWORD pcbNeeded)
  79. {
  80. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubGetPrinterData")));
  81. return _stub_routine();
  82. }
  83. /*****************************************************************************\
  84. * stubSetPrinterData
  85. *
  86. *
  87. \*****************************************************************************/
  88. DWORD stubSetPrinterData(
  89. HANDLE hPrinter,
  90. LPTSTR pszValueName,
  91. DWORD dwType,
  92. LPBYTE pbData,
  93. DWORD cbData)
  94. {
  95. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubSetPrinterData")));
  96. return _stub_routine();
  97. }
  98. /*****************************************************************************\
  99. * stubWaitForPrinterChange
  100. *
  101. *
  102. \*****************************************************************************/
  103. DWORD stubWaitForPrinterChange(
  104. HANDLE hPrinter,
  105. DWORD dwFlags)
  106. {
  107. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubWaitForPrinterChange")));
  108. return _stub_routine();
  109. }
  110. /*****************************************************************************\
  111. * stubAddPrinterConnection
  112. *
  113. *
  114. \*****************************************************************************/
  115. BOOL stubAddPrinterConnection(
  116. LPTSTR pszName)
  117. {
  118. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubAddPrinterConnection")));
  119. return _stub_routine();
  120. }
  121. /*****************************************************************************\
  122. * stubDeletePrinterConnection
  123. *
  124. *
  125. \*****************************************************************************/
  126. BOOL stubDeletePrinterConnection(
  127. LPTSTR pszName)
  128. {
  129. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubDeletePrinterConnection")));
  130. return _stub_routine();
  131. }
  132. /*****************************************************************************\
  133. * stubPrinterMessageBox
  134. *
  135. *
  136. \*****************************************************************************/
  137. DWORD stubPrinterMessageBox(
  138. HANDLE hPrinter,
  139. DWORD dwError,
  140. HWND hWnd,
  141. LPTSTR pszText,
  142. LPTSTR pszCaption,
  143. DWORD dwType)
  144. {
  145. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubPrinterMessageBox")));
  146. return _stub_routine();
  147. }
  148. /*****************************************************************************\
  149. * stubAddPrinterDriver
  150. *
  151. *
  152. \*****************************************************************************/
  153. BOOL stubAddPrinterDriver(
  154. LPTSTR pszName,
  155. DWORD dwLevel,
  156. LPBYTE pbDriverInfo)
  157. {
  158. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubAddPrinterDriver")));
  159. return _stub_routine();
  160. }
  161. /*****************************************************************************\
  162. * stubDeletePrinterDriver
  163. *
  164. *
  165. \*****************************************************************************/
  166. BOOL stubDeletePrinterDriver(
  167. LPTSTR pszName,
  168. LPTSTR pszEnvironment,
  169. LPTSTR pszDriverName)
  170. {
  171. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubDeletePrinterDriver")));
  172. return _stub_routine();
  173. }
  174. /*****************************************************************************\
  175. * stubGetPrinterDriver
  176. *
  177. *
  178. \*****************************************************************************/
  179. BOOL stubGetPrinterDriver(
  180. HANDLE hPrinter,
  181. LPTSTR pszEnvironment,
  182. DWORD dwLevel,
  183. LPBYTE pbDriverInfo,
  184. DWORD cbBuf,
  185. LPDWORD pcbNeeded)
  186. {
  187. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubGetPrinterDriver")));
  188. return _stub_routine();
  189. }
  190. /*****************************************************************************\
  191. * stubEnumPrinterDrivers
  192. *
  193. *
  194. \*****************************************************************************/
  195. BOOL stubEnumPrinterDrivers(
  196. LPTSTR pszName,
  197. LPTSTR pszEnvironment,
  198. DWORD dwLevel,
  199. LPBYTE pbDriverInfo,
  200. DWORD cbBuf,
  201. LPDWORD pcbNeeded,
  202. LPDWORD pcReturned)
  203. {
  204. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubEnumPrinterDrivers")));
  205. return _stub_routine();
  206. }
  207. /*****************************************************************************\
  208. * stubGetPrinterDriverDirectory
  209. *
  210. *
  211. \*****************************************************************************/
  212. BOOL stubGetPrinterDriverDirectory(
  213. LPTSTR pszName,
  214. LPTSTR pszEnvironment,
  215. DWORD dwLevel,
  216. LPBYTE pbDriverDirectory,
  217. DWORD cbBuf,
  218. LPDWORD pcbNeeded)
  219. {
  220. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubGetPrinterDriverDirectory")));
  221. return _stub_routine();
  222. }
  223. /*****************************************************************************\
  224. * stubAddPrintProcessor
  225. *
  226. *
  227. \*****************************************************************************/
  228. BOOL stubAddPrintProcessor(
  229. LPTSTR pszName,
  230. LPTSTR pszEnvironment,
  231. LPTSTR pszPathName,
  232. LPTSTR pszPrintProcessorName)
  233. {
  234. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubAddPrintProcessor")));
  235. return _stub_routine();
  236. }
  237. /*****************************************************************************\
  238. * stubDeletePrintProcessor
  239. *
  240. *
  241. \*****************************************************************************/
  242. BOOL stubDeletePrintProcessor(
  243. LPTSTR pszName,
  244. LPTSTR pszEnvironment,
  245. LPTSTR pszPrintProcessorName)
  246. {
  247. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubDeletePrintProcessor")));
  248. return _stub_routine();
  249. }
  250. /*****************************************************************************\
  251. * stubEnumPrintProcessors
  252. *
  253. *
  254. \*****************************************************************************/
  255. BOOL stubEnumPrintProcessors(
  256. LPTSTR pszName,
  257. LPTSTR pszEnvironment,
  258. DWORD dwLevel,
  259. LPBYTE pbPrintProcessorInfo,
  260. DWORD cbBuf,
  261. LPDWORD pcbNeeded,
  262. LPDWORD pcReturned)
  263. {
  264. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubEnumPrintProcessors")));
  265. return _stub_routine();
  266. }
  267. /*****************************************************************************\
  268. * stubGetPrintProcessorDirectory
  269. *
  270. *
  271. \*****************************************************************************/
  272. BOOL stubGetPrintProcessorDirectory(
  273. LPTSTR pszName,
  274. LPTSTR pszEnvironment,
  275. DWORD dwLevel,
  276. LPBYTE pbPrintProcessorInfo,
  277. DWORD cbBuf,
  278. LPDWORD pcbNeeded)
  279. {
  280. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubGetPrintProcessorDirectory")));
  281. return _stub_routine();
  282. }
  283. /*****************************************************************************\
  284. * stubEnumPrintProcessorDatatypes
  285. *
  286. *
  287. \*****************************************************************************/
  288. BOOL stubEnumPrintProcessorDatatypes(
  289. LPTSTR pszName,
  290. LPTSTR pszPrintProcessorName,
  291. DWORD dwLevel,
  292. LPBYTE pbDataypes,
  293. DWORD cbBuf,
  294. LPDWORD pcbNeeded,
  295. LPDWORD pcReturned)
  296. {
  297. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubEnumPrintProcessorDatatypes")));
  298. return _stub_routine();
  299. }
  300. /*****************************************************************************\
  301. * stubAddForm
  302. *
  303. *
  304. \*****************************************************************************/
  305. BOOL stubAddForm(
  306. HANDLE hPrinter,
  307. DWORD Level,
  308. LPBYTE pForm)
  309. {
  310. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubAddForm")));
  311. return _stub_routine();
  312. }
  313. /*****************************************************************************\
  314. * stubDeleteForm
  315. *
  316. *
  317. \*****************************************************************************/
  318. BOOL stubDeleteForm(
  319. HANDLE hPrinter,
  320. LPTSTR pFormName)
  321. {
  322. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubDeleteForm")));
  323. return _stub_routine();
  324. }
  325. /*****************************************************************************\
  326. * stubGetForm
  327. *
  328. *
  329. \*****************************************************************************/
  330. BOOL stubGetForm(
  331. HANDLE hPrinter,
  332. LPTSTR pszFormName,
  333. DWORD dwLevel,
  334. LPBYTE pbForm,
  335. DWORD cbBuf,
  336. LPDWORD pcbNeeded)
  337. {
  338. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubGetForm")));
  339. return _stub_routine();
  340. }
  341. /*****************************************************************************\
  342. * stubSetForm
  343. *
  344. *
  345. \*****************************************************************************/
  346. BOOL stubSetForm(
  347. HANDLE hPrinter,
  348. LPTSTR pszFormName,
  349. DWORD dwLevel,
  350. LPBYTE pbForm)
  351. {
  352. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubSetForm")));
  353. return _stub_routine();
  354. }
  355. /*****************************************************************************\
  356. * stubEnumForms
  357. *
  358. *
  359. \*****************************************************************************/
  360. BOOL stubEnumForms(
  361. HANDLE hPrinter,
  362. DWORD dwLevel,
  363. LPBYTE pbForm,
  364. DWORD cbBuf,
  365. LPDWORD pcbNeeded,
  366. LPDWORD pcReturned)
  367. {
  368. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubEnumForms")));
  369. return _stub_routine();
  370. }
  371. /*****************************************************************************\
  372. * stubAddMonitor
  373. *
  374. *
  375. \*****************************************************************************/
  376. BOOL stubAddMonitor(
  377. LPTSTR pszName,
  378. DWORD dwLevel,
  379. LPBYTE pbMonitorInfo)
  380. {
  381. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubAddMonitor")));
  382. return _stub_routine();
  383. }
  384. /*****************************************************************************\
  385. * stubDeleteMonitor
  386. *
  387. *
  388. \*****************************************************************************/
  389. BOOL stubDeleteMonitor(
  390. LPTSTR pszName,
  391. LPTSTR pszEnvironment,
  392. LPTSTR pszMonitorName)
  393. {
  394. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubDeleteMonitor")));
  395. return _stub_routine();
  396. }
  397. /*****************************************************************************\
  398. * stubEnumMonitors
  399. *
  400. *
  401. \*****************************************************************************/
  402. BOOL stubEnumMonitors(
  403. LPTSTR pszName,
  404. DWORD dwLevel,
  405. LPBYTE pbMonitors,
  406. DWORD cbBuf,
  407. LPDWORD pcbNeeded,
  408. LPDWORD pcReturned)
  409. {
  410. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubEnumMonitors")));
  411. return _stub_routine();
  412. }
  413. /*****************************************************************************\
  414. * stubAddPort
  415. *
  416. *
  417. \*****************************************************************************/
  418. BOOL stubAddPort(
  419. LPTSTR pName,
  420. HWND hWnd,
  421. LPTSTR pMonitorName)
  422. {
  423. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubAddPort")));
  424. return _stub_routine();
  425. }
  426. /*****************************************************************************\
  427. * stubDeletePort
  428. *
  429. *
  430. \*****************************************************************************/
  431. BOOL stubDeletePort(
  432. LPTSTR pName,
  433. HWND hWnd,
  434. LPTSTR pPortName)
  435. {
  436. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubDeletePort")));
  437. return _stub_routine();
  438. }
  439. /*****************************************************************************\
  440. * stubConfigurePort
  441. *
  442. *
  443. \*****************************************************************************/
  444. BOOL stubConfigurePort(
  445. LPTSTR lpszServerName,
  446. HWND hWnd,
  447. LPTSTR lpszPortName)
  448. {
  449. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubConfigurePort")));
  450. return _stub_routine();
  451. }
  452. /*****************************************************************************\
  453. * stubCreatePrinterIC
  454. *
  455. *
  456. \*****************************************************************************/
  457. HANDLE stubCreatePrinterIC(
  458. HANDLE hPrinter,
  459. LPDEVMODEW pDevMode)
  460. {
  461. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubCreatePrinterIC")));
  462. return (HANDLE)IntToPtr(_stub_routine());
  463. }
  464. /*****************************************************************************\
  465. * stubPlayGdiScriptOnPrinterIC
  466. *
  467. *
  468. \*****************************************************************************/
  469. BOOL stubPlayGdiScriptOnPrinterIC(
  470. HANDLE hPrinterIC,
  471. LPBYTE pbIn,
  472. DWORD cIn,
  473. LPBYTE pbOut,
  474. DWORD cOut,
  475. DWORD ul)
  476. {
  477. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubPlayGdiScriptOnPrinter")));
  478. return _stub_routine();
  479. }
  480. /*****************************************************************************\
  481. * stubDeletePrinterIC
  482. *
  483. *
  484. \*****************************************************************************/
  485. BOOL stubDeletePrinterIC(
  486. HANDLE hPrinterIC)
  487. {
  488. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubDeletePrinterIC")));
  489. return _stub_routine();
  490. }
  491. /*****************************************************************************\
  492. * stubResetPrinter
  493. *
  494. *
  495. \*****************************************************************************/
  496. BOOL stubResetPrinter(
  497. LPPRINTER_DEFAULTS lpDefault)
  498. {
  499. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubResetPrinter")));
  500. SetLastError(ERROR_NOT_SUPPORTED);
  501. return FALSE;
  502. }
  503. /*****************************************************************************\
  504. * stubGetPrinterDriverEx
  505. *
  506. *
  507. \*****************************************************************************/
  508. BOOL stubGetPrinterDriverEx(
  509. LPTSTR lpEnvironment,
  510. DWORD dwLevel,
  511. LPBYTE lpbDriverInfo,
  512. DWORD cbBuf,
  513. LPDWORD pcbNeeded,
  514. DWORD dwClientMajorVer,
  515. DWORD dwClientMinorVer,
  516. PDWORD pdwServerMajorVer,
  517. PDWORD pdwServerMinorVer)
  518. {
  519. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubGetPrinterDriverEx")));
  520. return _stub_routine();
  521. }
  522. /*****************************************************************************\
  523. * stubFindFirstPrinterChangeNotification
  524. *
  525. *
  526. \*****************************************************************************/
  527. BOOL stubFindFirstPrinterChangeNotification(
  528. HANDLE hPrinter,
  529. DWORD dwFlags,
  530. DWORD dwOptions,
  531. HANDLE hNotify,
  532. PDWORD pdwStatus,
  533. PVOID pPrinterNofityOptions,
  534. PVOID pPrinterNotifyInit)
  535. {
  536. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubFindFirstPrinterChangeNotification")));
  537. return _stub_routine();
  538. }
  539. /*****************************************************************************\
  540. * stubFindClosePrinterChangeNotification
  541. *
  542. *
  543. \*****************************************************************************/
  544. BOOL stubFindClosePrinterChangeNotification(
  545. HANDLE hPrinter)
  546. {
  547. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubFindClosePrinterChangeNotification")));
  548. return _stub_routine();
  549. }
  550. /*****************************************************************************\
  551. * stubAddPortEx
  552. *
  553. *
  554. \*****************************************************************************/
  555. BOOL stubAddPortEx(
  556. LPTSTR lpszName,
  557. DWORD dwLevel,
  558. LPBYTE lpbBuffer,
  559. LPTSTR lpszMonitorName)
  560. {
  561. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubAddPortEx")));
  562. return _stub_routine();
  563. }
  564. /*****************************************************************************\
  565. * stubShutDown
  566. *
  567. *
  568. \*****************************************************************************/
  569. BOOL stubShutDown(
  570. LPVOID lpvReserved)
  571. {
  572. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubShutDown")));
  573. return _stub_routine();
  574. }
  575. /*****************************************************************************\
  576. * stubRefreshPrinterChangeNotification
  577. *
  578. *
  579. \*****************************************************************************/
  580. BOOL stubRefreshPrinterChangeNotification(
  581. HANDLE hPrinter,
  582. DWORD dwReserved,
  583. PVOID pvReserved,
  584. PVOID pvPrinterNotifyInfo)
  585. {
  586. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubRefreshPrinterChangeNotification")));
  587. return _stub_routine();
  588. }
  589. /*****************************************************************************\
  590. * stubOpenPrinterEx
  591. *
  592. *
  593. \*****************************************************************************/
  594. BOOL stubOpenPrinterEx(
  595. LPTSTR lpszPrinterName,
  596. LPHANDLE phPrinter,
  597. LPPRINTER_DEFAULTS pDefault,
  598. LPBYTE lpbClientInfo,
  599. DWORD dwLevel)
  600. {
  601. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubOpenPrinterEx")));
  602. return _stub_routine();
  603. }
  604. /*****************************************************************************\
  605. * stubAddPrinterEx
  606. *
  607. *
  608. \*****************************************************************************/
  609. HANDLE stubAddPrinterEx(
  610. LPTSTR lpszName,
  611. DWORD dwLevel,
  612. LPBYTE lpbPrinter,
  613. LPBYTE lpbClientInfo,
  614. DWORD dwClientInfoLevel)
  615. {
  616. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubAddPrinterEx")));
  617. return (HANDLE)IntToPtr(_stub_routine());
  618. }
  619. /*****************************************************************************\
  620. * stubSetPort
  621. *
  622. *
  623. \*****************************************************************************/
  624. BOOL stubSetPort(
  625. LPTSTR lpszName,
  626. LPTSTR lpszPortName,
  627. DWORD dwLevel,
  628. LPBYTE lpbPortInfo)
  629. {
  630. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubSetPort")));
  631. return _stub_routine();
  632. }
  633. /*****************************************************************************\
  634. * stubEnumPrinterData
  635. *
  636. *
  637. \*****************************************************************************/
  638. DWORD stubEnumPrinterData(
  639. HANDLE hPrinter,
  640. DWORD dwIndex,
  641. LPTSTR lpszValueName,
  642. DWORD cbValueName,
  643. LPDWORD pcbValueName,
  644. LPDWORD pdwType,
  645. LPBYTE lpbData,
  646. DWORD cbData,
  647. LPDWORD lpcbData)
  648. {
  649. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubEnumPrinterData")));
  650. return (DWORD)_stub_routine();
  651. }
  652. /*****************************************************************************\
  653. * stubDeletePrinterData
  654. *
  655. *
  656. \*****************************************************************************/
  657. DWORD stubDeletePrinterData(
  658. HANDLE hPrinter,
  659. LPTSTR lpszValueName)
  660. {
  661. DBG_MSG(DBG_LEV_CALLTREE, (TEXT("Call: stubDeletePrinterData")));
  662. return (DWORD)_stub_routine();
  663. }