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.

1183 lines
23 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. infostub.c
  5. Abstract:
  6. Client stubs of the Internet Info Server Admin APIs.
  7. Author:
  8. Madan Appiah (madana) 10-Oct-1993
  9. Environment:
  10. User Mode - Win32
  11. --*/
  12. #include <nt.h>
  13. #include <ntrtl.h>
  14. #include <nturtl.h>
  15. #include <nntpsvc.h>
  16. NET_API_STATUS
  17. NET_API_FUNCTION
  18. NntpGetAdminInformation(
  19. IN LPWSTR ServerName OPTIONAL,
  20. IN DWORD InstanceId,
  21. OUT LPNNTP_CONFIG_INFO * pConfig
  22. )
  23. /*++
  24. Routine Description:
  25. This is the DLL entrypoint for NntpGetAdminInformation
  26. Arguments:
  27. servername --A pointer to an ASCIIZ string containing the name of
  28. the remote server on which the function is to execute. A NULL
  29. pointer or string specifies the local machine.
  30. pConfig -- On return a pointer to the return information structure
  31. is returned in the address pointed to by pConfig
  32. Return Value:
  33. --*/
  34. {
  35. NET_API_STATUS apiStatus;
  36. *pConfig = NULL; // Must be NULL so RPC knows to fill it in.
  37. RpcTryExcept
  38. apiStatus = NntprGetAdminInformation(
  39. ServerName,
  40. InstanceId,
  41. (LPI_NNTP_CONFIG_INFO*)pConfig
  42. );
  43. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  44. apiStatus = RpcExceptionCode( );
  45. RpcEndExcept
  46. return(apiStatus);
  47. } // NntpGetAdminInformation
  48. NET_API_STATUS
  49. NET_API_FUNCTION
  50. NntpSetAdminInformation(
  51. IN LPWSTR ServerName OPTIONAL,
  52. IN DWORD InstanceId,
  53. IN LPNNTP_CONFIG_INFO pConfig,
  54. OUT LPDWORD pParmError OPTIONAL
  55. )
  56. /*++
  57. Routine Description:
  58. This is the DLL entrypoint for NntpSetAdminInformation
  59. Arguments:
  60. servername --A pointer to an ASCIIZ string containing the name of
  61. the remote server on which the function is to execute. A NULL
  62. pointer or string specifies the local machine.
  63. pConfig -- A pointer to the config info structure used to set
  64. the admin information.
  65. pParmError - If ERROR_INVALID_PARAMETER is returned, will point to the
  66. offending parameter.
  67. Return Value:
  68. --*/
  69. {
  70. NET_API_STATUS apiStatus;
  71. RpcTryExcept
  72. apiStatus = NntprSetAdminInformation(
  73. ServerName,
  74. InstanceId,
  75. (LPI_NNTP_CONFIG_INFO)pConfig,
  76. pParmError
  77. );
  78. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  79. apiStatus = RpcExceptionCode( );
  80. RpcEndExcept
  81. return(apiStatus);
  82. } // NntpSetAdminInformation
  83. NET_API_STATUS
  84. NET_API_FUNCTION
  85. NntpQueryStatistics(
  86. IN LPWSTR servername,
  87. IN DWORD level,
  88. OUT LPBYTE *bufptr
  89. )
  90. /*++
  91. Routine Description:
  92. This is the DLL entrypoint for NntpGetStatistics
  93. Arguments:
  94. servername --A pointer to an ASCIIZ string containing the name of
  95. the remote server on which the function is to execute. A NULL
  96. pointer or string specifies the local machine.
  97. level --Level of information required. 100, 101 and 102 are valid
  98. for all platforms. 302, 402, 403, 502 are valid for the
  99. appropriate platform.
  100. bufptr --On return a pointer to the return information structure
  101. is returned in the address pointed to by bufptr.
  102. Return Value:
  103. --*/
  104. {
  105. NET_API_STATUS apiStatus;
  106. *bufptr = NULL; // Must be NULL so RPC knows to fill it in.
  107. RpcTryExcept
  108. apiStatus = NntprQueryStatistics(
  109. servername,
  110. level,
  111. (LPNNTP_STATISTICS_BLOCK_ARRAY *) bufptr
  112. );
  113. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  114. apiStatus = RpcExceptionCode( );
  115. RpcEndExcept
  116. return(apiStatus);
  117. } // NntpQueryStatistics
  118. NET_API_STATUS
  119. NET_API_FUNCTION
  120. NntpClearStatistics(
  121. IN LPWSTR Server OPTIONAL,
  122. IN DWORD InstanceId
  123. )
  124. {
  125. NET_API_STATUS status;
  126. RpcTryExcept
  127. {
  128. //
  129. // Try RPC (local or remote) version of API.
  130. //
  131. status = NntpClearStatistics(
  132. Server,
  133. InstanceId
  134. );
  135. }
  136. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  137. {
  138. status = RpcExceptionCode();
  139. }
  140. RpcEndExcept
  141. return (status);
  142. } // NntpClearStatistics
  143. NET_API_STATUS
  144. NET_API_FUNCTION
  145. NntpEnumerateFeeds (
  146. IN LPWSTR ServerName,
  147. IN DWORD InstanceId,
  148. OUT LPDWORD EntriesRead,
  149. OUT LPNNTP_FEED_INFO *Buffer
  150. )
  151. /*++
  152. Routine Description:
  153. This is the DLL entrypoint for NntpEnumerateFeeds
  154. Arguments:
  155. Return Value:
  156. --*/
  157. {
  158. NET_API_STATUS apiStatus;
  159. NNTP_FEED_ENUM_STRUCT EnumStruct;
  160. ZeroMemory( &EnumStruct, sizeof( EnumStruct ) ) ;
  161. RpcTryExcept
  162. apiStatus = NntprEnumerateFeeds(
  163. ServerName,
  164. InstanceId,
  165. &EnumStruct
  166. );
  167. *EntriesRead = EnumStruct.EntriesRead;
  168. *Buffer = (LPNNTP_FEED_INFO)EnumStruct.Buffer;
  169. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  170. apiStatus = RpcExceptionCode( );
  171. RpcEndExcept
  172. return(apiStatus);
  173. } // NntpEnumerateFeeds
  174. NET_API_STATUS
  175. NET_API_FUNCTION
  176. NntpEnableFeed(
  177. IN NNTP_HANDLE ServerName,
  178. IN DWORD InstanceId,
  179. IN DWORD FeedId,
  180. IN BOOL Enable,
  181. IN BOOL Refill,
  182. IN FILETIME RefillTime
  183. )
  184. {
  185. NET_API_STATUS apiStatus;
  186. RpcTryExcept
  187. apiStatus = NntprEnableFeed(
  188. ServerName,
  189. InstanceId,
  190. FeedId,
  191. Enable,
  192. Refill,
  193. RefillTime
  194. );
  195. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  196. apiStatus = RpcExceptionCode( );
  197. RpcEndExcept
  198. return(apiStatus);
  199. }
  200. NET_API_STATUS
  201. NET_API_FUNCTION
  202. NntpGetFeedInformation(
  203. IN LPWSTR ServerName,
  204. IN DWORD InstanceId,
  205. IN DWORD FeedId,
  206. OUT LPNNTP_FEED_INFO *Buffer
  207. )
  208. /*++
  209. Routine Description:
  210. This is the DLL entrypoint for NntpGetFeedInformation
  211. Arguments:
  212. Return Value:
  213. --*/
  214. {
  215. NET_API_STATUS apiStatus;
  216. LPI_FEED_INFO feedInfo;
  217. RpcTryExcept
  218. apiStatus = NntprGetFeedInformation(
  219. ServerName,
  220. InstanceId,
  221. FeedId,
  222. &feedInfo
  223. );
  224. *Buffer = (LPNNTP_FEED_INFO)feedInfo;
  225. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  226. apiStatus = RpcExceptionCode( );
  227. RpcEndExcept
  228. return(apiStatus);
  229. } // NntpGetFeedInformation
  230. NET_API_STATUS
  231. NET_API_FUNCTION
  232. NntpSetFeedInformation(
  233. IN LPWSTR ServerName OPTIONAL,
  234. IN DWORD InstanceId,
  235. IN LPNNTP_FEED_INFO FeedInfo,
  236. OUT LPDWORD ParmErr OPTIONAL
  237. )
  238. /*++
  239. Routine Description:
  240. This is the DLL entrypoint for NntpSetFeedInformation
  241. Arguments:
  242. Return Value:
  243. --*/
  244. {
  245. NET_API_STATUS apiStatus;
  246. RpcTryExcept
  247. apiStatus = NntprSetFeedInformation(
  248. ServerName,
  249. InstanceId,
  250. (LPI_FEED_INFO)FeedInfo,
  251. ParmErr
  252. );
  253. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  254. apiStatus = RpcExceptionCode( );
  255. RpcEndExcept
  256. return(apiStatus);
  257. } // NntpSetFeedInformation
  258. NET_API_STATUS
  259. NET_API_FUNCTION
  260. NntpAddFeed(
  261. IN LPWSTR ServerName OPTIONAL,
  262. IN DWORD InstanceId,
  263. IN LPNNTP_FEED_INFO FeedInfo,
  264. OUT LPDWORD ParmErr OPTIONAL,
  265. OUT LPDWORD pdwFeedId
  266. )
  267. /*++
  268. Routine Description:
  269. This is the DLL entrypoint for NntpAddFeed
  270. Arguments:
  271. Return Value:
  272. --*/
  273. {
  274. NET_API_STATUS apiStatus;
  275. RpcTryExcept
  276. apiStatus = NntprAddFeed(
  277. ServerName,
  278. InstanceId,
  279. (LPI_FEED_INFO)FeedInfo,
  280. ParmErr,
  281. pdwFeedId
  282. );
  283. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  284. apiStatus = RpcExceptionCode( );
  285. RpcEndExcept
  286. return(apiStatus);
  287. } // NntpAddFeed
  288. NET_API_STATUS
  289. NET_API_FUNCTION
  290. NntpDeleteFeed(
  291. IN LPWSTR ServerName OPTIONAL,
  292. IN DWORD InstanceId,
  293. IN DWORD FeedId
  294. )
  295. /*++
  296. Routine Description:
  297. This is the DLL entrypoint for NntpDeleteFeed
  298. Arguments:
  299. Return Value:
  300. --*/
  301. {
  302. NET_API_STATUS apiStatus;
  303. RpcTryExcept
  304. apiStatus = NntprDeleteFeed(
  305. ServerName,
  306. InstanceId,
  307. FeedId
  308. );
  309. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  310. apiStatus = RpcExceptionCode( );
  311. RpcEndExcept
  312. return(apiStatus);
  313. } // NntpAddFeed
  314. NET_API_STATUS
  315. NET_API_FUNCTION
  316. NntpEnumerateSessions (
  317. IN LPWSTR ServerName,
  318. IN DWORD InstanceId,
  319. OUT LPDWORD EntriesRead,
  320. OUT LPNNTP_SESSION_INFO *Buffer
  321. )
  322. /*++
  323. Routine Description:
  324. This is the DLL entrypoint for NntpEnumerateSessions
  325. Arguments:
  326. Return Value:
  327. --*/
  328. {
  329. NET_API_STATUS apiStatus;
  330. NNTP_SESS_ENUM_STRUCT EnumStruct;
  331. RpcTryExcept
  332. apiStatus = NntprEnumerateSessions(
  333. ServerName,
  334. InstanceId,
  335. &EnumStruct
  336. );
  337. *EntriesRead = EnumStruct.EntriesRead;
  338. *Buffer = (LPNNTP_SESSION_INFO)EnumStruct.Buffer;
  339. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  340. apiStatus = RpcExceptionCode( );
  341. RpcEndExcept
  342. return(apiStatus);
  343. } // NntpEnumerateSessions
  344. NET_API_STATUS
  345. NET_API_FUNCTION
  346. NntpTerminateSession (
  347. IN LPWSTR ServerName,
  348. IN DWORD InstanceId,
  349. IN LPSTR UserName,
  350. IN LPSTR IPAddress
  351. )
  352. /*++
  353. Routine Description:
  354. This is the DLL entrypoint for NntpTerminateSession
  355. Arguments:
  356. Return Value:
  357. --*/
  358. {
  359. NET_API_STATUS apiStatus;
  360. RpcTryExcept
  361. apiStatus = NntprTerminateSession(
  362. ServerName,
  363. InstanceId,
  364. UserName,
  365. IPAddress
  366. );
  367. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  368. apiStatus = RpcExceptionCode( );
  369. RpcEndExcept
  370. return(apiStatus);
  371. } // NntpTerminateSession
  372. NET_API_STATUS
  373. NET_API_FUNCTION
  374. NntpEnumerateExpires(
  375. IN NNTP_HANDLE ServerName,
  376. IN DWORD InstanceId,
  377. OUT LPDWORD EntriesRead,
  378. OUT LPNNTP_EXPIRE_INFO* Buffer
  379. )
  380. /*++
  381. Routine Description :
  382. This is the DLL entrypoint for NntpEnumerateExpires
  383. Arguments :
  384. Return Value :
  385. --*/
  386. {
  387. NET_API_STATUS apiStatus;
  388. NNTP_EXPIRE_ENUM_STRUCT EnumStruct ;
  389. ZeroMemory( &EnumStruct, sizeof( EnumStruct ) ) ;
  390. RpcTryExcept
  391. apiStatus = NntprEnumerateExpires(
  392. ServerName,
  393. InstanceId,
  394. &EnumStruct
  395. );
  396. *EntriesRead = EnumStruct.EntriesRead;
  397. *Buffer = (LPNNTP_EXPIRE_INFO)EnumStruct.Buffer;
  398. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  399. apiStatus = RpcExceptionCode( );
  400. RpcEndExcept
  401. return(apiStatus);
  402. } // NntpEnumerateExpires
  403. NET_API_STATUS
  404. NET_API_FUNCTION
  405. NntpAddExpire(
  406. IN NNTP_HANDLE ServerName,
  407. IN DWORD InstanceId,
  408. IN LPNNTP_EXPIRE_INFO ExpireInfo,
  409. OUT LPDWORD ParmErr OPTIONAL,
  410. OUT LPDWORD pdwExpireId
  411. )
  412. /*++
  413. Routine Description :
  414. This is the DLL entrypoint for NntpAddExpire
  415. Arguments :
  416. Return Value :
  417. --*/
  418. {
  419. NET_API_STATUS apiStatus;
  420. RpcTryExcept
  421. apiStatus = NntprAddExpire(
  422. ServerName,
  423. InstanceId,
  424. (LPI_EXPIRE_INFO)ExpireInfo,
  425. ParmErr,
  426. pdwExpireId
  427. );
  428. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  429. apiStatus = RpcExceptionCode( );
  430. RpcEndExcept
  431. return(apiStatus);
  432. } // NntpAddExpire
  433. NET_API_STATUS
  434. NET_API_FUNCTION
  435. NntpDeleteExpire(
  436. IN NNTP_HANDLE ServerName,
  437. IN DWORD InstanceId,
  438. IN DWORD ExpireId
  439. )
  440. /*++
  441. Routine Description :
  442. This is the DLL entrypoint for NntpDeleteExpire
  443. Arguments :
  444. Return Value :
  445. --*/
  446. {
  447. NET_API_STATUS apiStatus;
  448. RpcTryExcept
  449. apiStatus = NntprDeleteExpire(
  450. ServerName,
  451. InstanceId,
  452. ExpireId
  453. );
  454. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  455. apiStatus = RpcExceptionCode( );
  456. RpcEndExcept
  457. return(apiStatus);
  458. } // NntpDeleteExpire
  459. NET_API_STATUS
  460. NET_API_FUNCTION
  461. NntpGetExpireInformation(
  462. IN NNTP_HANDLE ServerName,
  463. IN DWORD InstanceId,
  464. IN DWORD ExpireId,
  465. OUT LPNNTP_EXPIRE_INFO *Buffer
  466. )
  467. /*++
  468. Routine Description :
  469. This is the DLL entrypoint for NntpGetExpireInformation
  470. Arguments :
  471. Return Value :
  472. --*/
  473. {
  474. NET_API_STATUS apiStatus;
  475. LPI_EXPIRE_INFO ExpireInfo;
  476. NNTP_EXPIRE_ENUM_STRUCT EnumStruct ;
  477. ZeroMemory( &EnumStruct, sizeof( EnumStruct ) ) ;
  478. RpcTryExcept
  479. /*
  480. apiStatus = NntprGetExpireInformation(
  481. ServerName,
  482. ExpireId,
  483. &ExpireInfo
  484. );
  485. *Buffer = (LPNNTP_EXPIRE_INFO)ExpireInfo;
  486. */
  487. apiStatus = NntprGetExpireInformation(
  488. ServerName,
  489. InstanceId,
  490. ExpireId,
  491. &EnumStruct
  492. );
  493. if( EnumStruct.EntriesRead > 0 ) {
  494. *Buffer = (LPNNTP_EXPIRE_INFO)EnumStruct.Buffer;
  495. } else {
  496. *Buffer = 0 ;
  497. }
  498. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  499. apiStatus = RpcExceptionCode( );
  500. RpcEndExcept
  501. return(apiStatus);
  502. } // NntpGetExpireInformation
  503. NET_API_STATUS
  504. NET_API_FUNCTION
  505. NntpSetExpireInformation(
  506. IN NNTP_HANDLE ServerName OPTIONAL,
  507. IN DWORD InstanceId,
  508. IN LPNNTP_EXPIRE_INFO ExpireInfo,
  509. OUT LPDWORD ParmErr OPTIONAL
  510. )
  511. /*++
  512. Routine Description :
  513. This is the DLL entrypoint for NntpSetExpireInformation
  514. Arguments :
  515. Return Value :
  516. --*/
  517. {
  518. NET_API_STATUS apiStatus;
  519. RpcTryExcept
  520. apiStatus = NntprSetExpireInformation(
  521. ServerName,
  522. InstanceId,
  523. (LPI_EXPIRE_INFO)ExpireInfo,
  524. ParmErr
  525. );
  526. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  527. apiStatus = RpcExceptionCode( );
  528. RpcEndExcept
  529. return(apiStatus);
  530. } // NntpSetExpireInformation
  531. NET_API_STATUS
  532. NET_API_FUNCTION
  533. NntpGetNewsgroup(
  534. IN NNTP_HANDLE ServerName OPTIONAL,
  535. IN DWORD InstanceId,
  536. IN OUT LPNNTP_NEWSGROUP_INFO *NewsgroupInfo
  537. )
  538. /*++
  539. Routine Description :
  540. This is the DLL entrypoint for NntpGetExpireInformation
  541. Arguments :
  542. Return Value :
  543. --*/
  544. {
  545. NET_API_STATUS apiStatus;
  546. RpcTryExcept
  547. apiStatus = NntprGetNewsgroup(
  548. ServerName,
  549. InstanceId,
  550. (LPI_NEWSGROUP_INFO*)NewsgroupInfo
  551. );
  552. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  553. apiStatus = RpcExceptionCode( );
  554. RpcEndExcept
  555. return(apiStatus);
  556. } // NntpGetNewsgroup
  557. NET_API_STATUS
  558. NET_API_FUNCTION
  559. NntpSetNewsgroup(
  560. IN NNTP_HANDLE ServerName OPTIONAL,
  561. IN DWORD InstanceId,
  562. IN LPNNTP_NEWSGROUP_INFO NewsgroupInfo
  563. )
  564. /*++
  565. Routine Description :
  566. This is the DLL entrypoint for NntpGetExpireInformation
  567. Arguments :
  568. Return Value :
  569. --*/
  570. {
  571. NET_API_STATUS apiStatus;
  572. RpcTryExcept
  573. apiStatus = NntprSetNewsgroup(
  574. ServerName,
  575. InstanceId,
  576. (LPI_NEWSGROUP_INFO)NewsgroupInfo
  577. );
  578. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  579. apiStatus = RpcExceptionCode( );
  580. RpcEndExcept
  581. return(apiStatus);
  582. } // NntpSetNewsgroup
  583. NET_API_STATUS
  584. NET_API_FUNCTION
  585. NntpCreateNewsgroup(
  586. IN NNTP_HANDLE ServerName OPTIONAL,
  587. IN DWORD InstanceId,
  588. IN LPNNTP_NEWSGROUP_INFO NewsgroupInfo
  589. )
  590. /*++
  591. Routine Description :
  592. This is the DLL entrypoint for NntpSetExpireInformation
  593. Arguments :
  594. Return Value :
  595. --*/
  596. {
  597. NET_API_STATUS apiStatus;
  598. RpcTryExcept
  599. apiStatus = NntprCreateNewsgroup(
  600. ServerName,
  601. InstanceId,
  602. (LPI_NEWSGROUP_INFO)NewsgroupInfo
  603. );
  604. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  605. apiStatus = RpcExceptionCode( );
  606. RpcEndExcept
  607. return(apiStatus);
  608. } // NntpCreateNewsgroup
  609. NET_API_STATUS
  610. NET_API_FUNCTION
  611. NntpDeleteNewsgroup(
  612. IN NNTP_HANDLE ServerName OPTIONAL,
  613. IN DWORD InstanceId,
  614. IN LPNNTP_NEWSGROUP_INFO NewsgroupInfo
  615. )
  616. /*++
  617. Routine Description :
  618. This is the DLL entrypoint for NntpSetExpireInformation
  619. Arguments :
  620. Return Value :
  621. --*/
  622. {
  623. NET_API_STATUS apiStatus;
  624. RpcTryExcept
  625. apiStatus = NntprDeleteNewsgroup(
  626. ServerName,
  627. InstanceId,
  628. (LPI_NEWSGROUP_INFO)NewsgroupInfo
  629. );
  630. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  631. apiStatus = RpcExceptionCode( );
  632. RpcEndExcept
  633. return(apiStatus);
  634. } // NntpDeleteNewsgroup
  635. NET_API_STATUS
  636. NET_API_FUNCTION
  637. NntpFindNewsgroup(
  638. IN NNTP_HANDLE ServerName,
  639. IN DWORD InstanceId,
  640. IN NNTP_HANDLE NewsgroupPrefix,
  641. IN DWORD MaxResults,
  642. OUT LPDWORD pdwResultsFound,
  643. OUT LPNNTP_FIND_LIST *ppFindList
  644. )
  645. /*++
  646. Routine Description :
  647. This is the DLL entrypoint for NntpFindNewsgroup
  648. Arguments :
  649. Return Value :
  650. --*/
  651. {
  652. NET_API_STATUS apiStatus;
  653. *ppFindList = NULL;
  654. RpcTryExcept
  655. apiStatus = NntprFindNewsgroup(
  656. ServerName,
  657. InstanceId,
  658. NewsgroupPrefix,
  659. MaxResults,
  660. pdwResultsFound,
  661. ppFindList
  662. );
  663. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  664. apiStatus = RpcExceptionCode( );
  665. RpcEndExcept
  666. return(apiStatus);
  667. } // NntpFindNewsgroup
  668. NET_API_STATUS
  669. NET_API_FUNCTION
  670. NntpStartRebuild(
  671. IN LPWSTR pszServer OPTIONAL,
  672. IN DWORD InstanceId,
  673. IN LPNNTPBLD_INFO pBuildInfo,
  674. OUT LPDWORD pParmError OPTIONAL
  675. )
  676. /*++
  677. Routine Description:
  678. This is the DLL entrypoint for NntpStartRebuild
  679. Arguments:
  680. servername --A pointer to an ASCIIZ string containing the name of
  681. the remote server on which the function is to execute. A NULL
  682. pointer or string specifies the local machine.
  683. pConfig -- A pointer to the config info structure used to set
  684. the rebuild information.
  685. pParmError - If ERROR_INVALID_PARAMETER is returned, will point to the
  686. offending parameter.
  687. Return Value:
  688. --*/
  689. {
  690. NET_API_STATUS apiStatus;
  691. RpcTryExcept
  692. apiStatus = NntprStartRebuild(
  693. pszServer,
  694. InstanceId,
  695. (LPI_NNTPBLD_INFO)pBuildInfo,
  696. pParmError
  697. );
  698. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  699. apiStatus = RpcExceptionCode( );
  700. RpcEndExcept
  701. return(apiStatus);
  702. } // NntpStartRebuild
  703. NET_API_STATUS
  704. NET_API_FUNCTION
  705. NntpGetBuildStatus(
  706. IN LPWSTR ServerName OPTIONAL,
  707. IN DWORD InstanceId,
  708. IN BOOL fCancel,
  709. OUT LPDWORD pdwProgress
  710. )
  711. /*++
  712. Routine Description:
  713. This is the DLL entrypoint for NntpGetBuildStatus
  714. Arguments:
  715. servername --A pointer to an ASCIIZ string containing the name of
  716. the remote server on which the function is to execute. A NULL
  717. pointer or string specifies the local machine.
  718. fCancel -- If TRUE, cancel the rebuild
  719. pdwProgress -- pointer to progress number
  720. Return Value:
  721. --*/
  722. {
  723. NET_API_STATUS apiStatus;
  724. RpcTryExcept
  725. apiStatus = NntprGetBuildStatus(
  726. ServerName,
  727. InstanceId,
  728. fCancel,
  729. pdwProgress
  730. );
  731. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  732. apiStatus = RpcExceptionCode( );
  733. RpcEndExcept
  734. return(apiStatus);
  735. } // NntpGetBuildStatus
  736. #if 0
  737. NET_API_STATUS
  738. NET_API_FUNCTION
  739. NntpAddDropNewsgroup(
  740. IN LPWSTR ServerName OPTIONAL,
  741. IN DWORD InstanceId,
  742. IN LPCSTR szNewsgroup
  743. )
  744. {
  745. NET_API_STATUS apiStatus;
  746. RpcTryExcept
  747. apiStatus = NntprAddDropNewsgroup(
  748. ServerName,
  749. InstanceId,
  750. szNewsgroup
  751. );
  752. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  753. apiStatus = RpcExceptionCode( );
  754. RpcEndExcept
  755. return(apiStatus);
  756. }
  757. NET_API_STATUS
  758. NET_API_FUNCTION
  759. NntpRemoveDropNewsgroup(
  760. IN LPWSTR ServerName OPTIONAL,
  761. IN DWORD InstanceId,
  762. IN LPCSTR szNewsgroup
  763. )
  764. {
  765. NET_API_STATUS apiStatus;
  766. RpcTryExcept
  767. apiStatus = NntprRemoveDropNewsgroup(
  768. ServerName,
  769. InstanceId,
  770. szNewsgroup
  771. );
  772. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  773. apiStatus = RpcExceptionCode( );
  774. RpcEndExcept
  775. return(apiStatus);
  776. }
  777. #endif
  778. NET_API_STATUS
  779. NET_API_FUNCTION
  780. NntpCancelMessageID(
  781. IN LPWSTR ServerName OPTIONAL,
  782. IN DWORD InstanceId,
  783. IN LPCSTR szMessageID
  784. )
  785. {
  786. NET_API_STATUS apiStatus;
  787. RpcTryExcept
  788. apiStatus = NntprCancelMessageID(
  789. ServerName,
  790. InstanceId,
  791. szMessageID
  792. );
  793. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  794. apiStatus = RpcExceptionCode( );
  795. RpcEndExcept
  796. return(apiStatus);
  797. }
  798. NET_API_STATUS
  799. NET_API_FUNCTION
  800. NntpGetVRootWin32Error(
  801. IN LPWSTR wszServername,
  802. IN DWORD InstanceId,
  803. IN LPWSTR wszVRootPath,
  804. OUT LPDWORD pdwWin32Error
  805. )
  806. {
  807. NET_API_STATUS apiStatus;
  808. RpcTryExcept
  809. apiStatus = NntprGetVRootWin32Error(
  810. wszServername,
  811. InstanceId,
  812. wszVRootPath,
  813. pdwWin32Error
  814. );
  815. RpcExcept(I_RpcExceptionFilter(RpcExceptionCode()))
  816. apiStatus = RpcExceptionCode( );
  817. RpcEndExcept
  818. return(apiStatus);
  819. }