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.

864 lines
21 KiB

  1. /*++
  2. Copyright (c) 1989-1993 Microsoft Corporation
  3. Module Name:
  4. wfwnet.c
  5. Abstract:
  6. Provides entry points for the functions that will be mapped
  7. to LANMAN.DRV.
  8. Author:
  9. Chuck Y Chan (ChuckC) 25-Mar-1993
  10. Revision History:
  11. --*/
  12. #include <windows.h>
  13. #include <locals.h>
  14. #define MAX_PATH 260
  15. WORD vLastCall = LAST_CALL_IS_LOCAL ;
  16. WORD vLastError = 0 ;
  17. WORD wNetTypeCaps ; /* Current capabilities */
  18. WORD wUserCaps ;
  19. WORD wConnectionCaps ;
  20. WORD wErrorCaps ;
  21. WORD wDialogCaps ;
  22. WORD wAdminCaps ;
  23. WORD wSpecVersion = 0x0310 ;
  24. WORD wDriverVersion = 0x0300 ;
  25. WORD _acrtused=0;
  26. void I_SetCapBits(void) ;
  27. //
  28. // global pointers to functions
  29. //
  30. LPWNETOPENJOB lpfnWNetOpenJob = NULL ;
  31. LPWNETCLOSEJOB lpfnWNetCloseJob = NULL ;
  32. LPWNETWRITEJOB lpfnWNetWriteJob = NULL ;
  33. LPWNETABORTJOB lpfnWNetAbortJob = NULL ;
  34. LPWNETHOLDJOB lpfnWNetHoldJob = NULL ;
  35. LPWNETRELEASEJOB lpfnWNetReleaseJob = NULL ;
  36. LPWNETCANCELJOB lpfnWNetCancelJob = NULL ;
  37. LPWNETSETJOBCOPIES lpfnWNetSetJobCopies = NULL ;
  38. LPWNETWATCHQUEUE lpfnWNetWatchQueue = NULL ;
  39. LPWNETUNWATCHQUEUE lpfnWNetUnwatchQueue = NULL ;
  40. LPWNETLOCKQUEUEDATA lpfnWNetLockQueueData = NULL ;
  41. LPWNETUNLOCKQUEUEDATA lpfnWNetUnlockQueueData = NULL ;
  42. LPWNETQPOLL lpfnWNetQPoll = NULL ;
  43. LPWNETDEVICEMODE lpfnWNetDeviceMode = NULL ;
  44. LPWNETVIEWQUEUEDIALOG lpfnWNetViewQueueDialog = NULL ;
  45. LPWNETGETCAPS lpfnWNetGetCaps16 = NULL ;
  46. LPWNETGETERROR lpfnWNetGetError16 = NULL ;
  47. LPWNETGETERRORTEXT lpfnWNetGetErrorText16 = NULL ;
  48. extern VOID FAR PASCAL GrabInterrupts(void);
  49. int FAR PASCAL LibMain(HINSTANCE hInstance,
  50. WORD wDataSeg,
  51. WORD cbHeapSize,
  52. LPSTR lpszCmdLine) ;
  53. /*
  54. * functions passed to LANMAN.DRV
  55. */
  56. WORD API WNetOpenJob(LPSTR p1,LPSTR p2,WORD p3,LPINT p4)
  57. {
  58. WORD err ;
  59. if (!lpfnWNetOpenJob)
  60. {
  61. //
  62. // start off as a our code until we get the entry point
  63. //
  64. vLastCall = LAST_CALL_IS_LOCAL ;
  65. //
  66. // get the entry point from LANMAN.DRV
  67. //
  68. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetOpenJob,
  69. "WNETOPENJOB" ) ;
  70. if (err)
  71. {
  72. SetLastError(err) ;
  73. return err ;
  74. }
  75. }
  76. //
  77. // note it is no longer an error in our code. and call the API
  78. //
  79. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  80. return ( (*lpfnWNetOpenJob)(p1,p2,p3,p4) ) ;
  81. }
  82. WORD API WNetCloseJob(WORD p1,LPINT p2,LPSTR p3)
  83. {
  84. WORD err ;
  85. if (!lpfnWNetCloseJob)
  86. {
  87. //
  88. // start off as a our code until we get the entry point
  89. //
  90. vLastCall = LAST_CALL_IS_LOCAL ;
  91. //
  92. // get the entry point from LANMAN.DRV
  93. //
  94. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetCloseJob,
  95. "WNETCLOSEJOB" ) ;
  96. if (err)
  97. {
  98. SetLastError(err) ;
  99. return err ;
  100. }
  101. }
  102. //
  103. // note it is no longer an error in our code. and call the API
  104. //
  105. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  106. return ( (*lpfnWNetCloseJob)(p1,p2,p3) ) ;
  107. }
  108. WORD API WNetWriteJob(HANDLE p1,LPSTR p2,LPINT p3)
  109. {
  110. WORD err ;
  111. if (!lpfnWNetWriteJob)
  112. {
  113. //
  114. // start off as a our code until we get the entry point
  115. //
  116. vLastCall = LAST_CALL_IS_LOCAL ;
  117. //
  118. // get the entry point from LANMAN.DRV
  119. //
  120. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetWriteJob,
  121. "WNETWRITEJOB" ) ;
  122. if (err)
  123. {
  124. SetLastError(err) ;
  125. return err ;
  126. }
  127. }
  128. //
  129. // note it is no longer an error in our code. and call the API
  130. //
  131. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  132. return ( (*lpfnWNetWriteJob)(p1,p2,p3) ) ;
  133. }
  134. WORD API WNetAbortJob(WORD p1,LPSTR p2)
  135. {
  136. WORD err ;
  137. if (!lpfnWNetAbortJob)
  138. {
  139. //
  140. // start off as a our code until we get the entry point
  141. //
  142. vLastCall = LAST_CALL_IS_LOCAL ;
  143. //
  144. // get the entry point from LANMAN.DRV
  145. //
  146. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetAbortJob,
  147. "WNETABORTJOB" ) ;
  148. if (err)
  149. {
  150. SetLastError(err) ;
  151. return err ;
  152. }
  153. }
  154. //
  155. // note it is no longer an error in our code. and call the API
  156. //
  157. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  158. return ( (*lpfnWNetAbortJob)(p1,p2) ) ;
  159. }
  160. WORD API WNetHoldJob(LPSTR p1,WORD p2)
  161. {
  162. WORD err ;
  163. if (!lpfnWNetHoldJob)
  164. {
  165. //
  166. // start off as a our code until we get the entry point
  167. //
  168. vLastCall = LAST_CALL_IS_LOCAL ;
  169. //
  170. // get the entry point from LANMAN.DRV
  171. //
  172. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetHoldJob,
  173. "WNETHOLDJOB" ) ;
  174. if (err)
  175. {
  176. SetLastError(err) ;
  177. return err ;
  178. }
  179. }
  180. //
  181. // note it is no longer an error in our code. and call the API
  182. //
  183. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  184. return ( (*lpfnWNetHoldJob)(p1,p2) ) ;
  185. }
  186. WORD API WNetReleaseJob(LPSTR p1,WORD p2)
  187. {
  188. WORD err ;
  189. if (!lpfnWNetReleaseJob)
  190. {
  191. //
  192. // start off as a our code until we get the entry point
  193. //
  194. vLastCall = LAST_CALL_IS_LOCAL ;
  195. //
  196. // get the entry point from LANMAN.DRV
  197. //
  198. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetReleaseJob,
  199. "WNETRELEASEJOB" ) ;
  200. if (err)
  201. {
  202. SetLastError(err) ;
  203. return err ;
  204. }
  205. }
  206. //
  207. // note it is no longer an error in our code. and call the API
  208. //
  209. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  210. return ( (*lpfnWNetReleaseJob)(p1,p2) ) ;
  211. }
  212. WORD API WNetCancelJob(LPSTR p1,WORD p2)
  213. {
  214. WORD err ;
  215. if (!lpfnWNetCancelJob)
  216. {
  217. //
  218. // start off as a our code until we get the entry point
  219. //
  220. vLastCall = LAST_CALL_IS_LOCAL ;
  221. //
  222. // get the entry point from LANMAN.DRV
  223. //
  224. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetCancelJob,
  225. "WNETCANCELJOB" ) ;
  226. if (err)
  227. {
  228. SetLastError(err) ;
  229. return err ;
  230. }
  231. }
  232. //
  233. // note it is no longer an error in our code. and call the API
  234. //
  235. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  236. return ( (*lpfnWNetCancelJob)(p1,p2) ) ;
  237. }
  238. WORD API WNetSetJobCopies(LPSTR p1,WORD p2,WORD p3)
  239. {
  240. WORD err ;
  241. if (!lpfnWNetSetJobCopies)
  242. {
  243. //
  244. // start off as a our code until we get the entry point
  245. //
  246. vLastCall = LAST_CALL_IS_LOCAL ;
  247. //
  248. // get the entry point from LANMAN.DRV
  249. //
  250. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetSetJobCopies,
  251. "WNETSETJOBCOPIES" ) ;
  252. if (err)
  253. {
  254. SetLastError(err) ;
  255. return err ;
  256. }
  257. }
  258. //
  259. // note it is no longer an error in our code. and call the API
  260. //
  261. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  262. return ( (*lpfnWNetSetJobCopies)(p1,p2,p3) ) ;
  263. }
  264. WORD API WNetWatchQueue(HWND p1,LPSTR p2,LPSTR p3,WORD p4)
  265. {
  266. WORD err ;
  267. if (!lpfnWNetWatchQueue)
  268. {
  269. //
  270. // start off as a our code until we get the entry point
  271. //
  272. vLastCall = LAST_CALL_IS_LOCAL ;
  273. //
  274. // get the entry point from LANMAN.DRV
  275. //
  276. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetWatchQueue,
  277. "WNETWATCHQUEUE" ) ;
  278. if (err)
  279. {
  280. SetLastError(err) ;
  281. return err ;
  282. }
  283. }
  284. //
  285. // note it is no longer an error in our code. and call the API
  286. //
  287. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  288. return ( (*lpfnWNetWatchQueue)(p1,p2,p3,p4) ) ;
  289. }
  290. WORD API WNetUnwatchQueue(LPSTR p1)
  291. {
  292. WORD err ;
  293. if (!lpfnWNetUnwatchQueue)
  294. {
  295. //
  296. // start off as a our code until we get the entry point
  297. //
  298. vLastCall = LAST_CALL_IS_LOCAL ;
  299. //
  300. // get the entry point from LANMAN.DRV
  301. //
  302. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetUnwatchQueue,
  303. "WNETUNWATCHQUEUE" ) ;
  304. if (err)
  305. {
  306. SetLastError(err) ;
  307. return err ;
  308. }
  309. }
  310. //
  311. // note it is no longer an error in our code. and call the API
  312. //
  313. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  314. return ( (*lpfnWNetUnwatchQueue)(p1) ) ;
  315. }
  316. WORD API WNetLockQueueData(LPSTR p1,LPSTR p2,LPQUEUESTRUCT FAR *p3)
  317. {
  318. WORD err ;
  319. if (!lpfnWNetLockQueueData)
  320. {
  321. //
  322. // start off as a our code until we get the entry point
  323. //
  324. vLastCall = LAST_CALL_IS_LOCAL ;
  325. //
  326. // get the entry point from LANMAN.DRV
  327. //
  328. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetLockQueueData,
  329. "WNETLOCKQUEUEDATA" ) ;
  330. if (err)
  331. {
  332. SetLastError(err) ;
  333. return err ;
  334. }
  335. }
  336. //
  337. // note it is no longer an error in our code. and call the API
  338. //
  339. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  340. return ( (*lpfnWNetLockQueueData)(p1,p2,p3) ) ;
  341. }
  342. WORD API WNetUnlockQueueData(LPSTR p1)
  343. {
  344. WORD err ;
  345. if (!lpfnWNetUnlockQueueData)
  346. {
  347. //
  348. // start off as a our code until we get the entry point
  349. //
  350. vLastCall = LAST_CALL_IS_LOCAL ;
  351. //
  352. // get the entry point from LANMAN.DRV
  353. //
  354. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetUnlockQueueData,
  355. "WNETUNLOCKQUEUEDATA" ) ;
  356. if (err)
  357. {
  358. SetLastError(err) ;
  359. return err ;
  360. }
  361. }
  362. //
  363. // note it is no longer an error in our code. and call the API
  364. //
  365. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  366. return ( (*lpfnWNetUnlockQueueData)(p1) ) ;
  367. }
  368. void API WNetQPoll(HWND hWnd, unsigned iMessage, WORD wParam, LONG lParam)
  369. {
  370. WORD err ;
  371. if (!lpfnWNetQPoll)
  372. {
  373. //
  374. // start off as a our code until we get the entry point
  375. //
  376. vLastCall = LAST_CALL_IS_LOCAL ;
  377. //
  378. // get the entry point from LANMAN.DRV
  379. //
  380. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetQPoll,
  381. "WNETQPOLL" ) ;
  382. if (err)
  383. {
  384. SetLastError(err) ;
  385. return ;
  386. }
  387. }
  388. //
  389. // note it is no longer an error in our code. and call the API
  390. //
  391. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  392. (*lpfnWNetQPoll)(hWnd, iMessage, wParam, lParam) ;
  393. }
  394. WORD API WNetDeviceMode(HWND p1)
  395. {
  396. WORD err ;
  397. if (!lpfnWNetDeviceMode)
  398. {
  399. //
  400. // start off as a our code until we get the entry point
  401. //
  402. vLastCall = LAST_CALL_IS_LOCAL ;
  403. //
  404. // get the entry point from LANMAN.DRV
  405. //
  406. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetDeviceMode,
  407. "WNETDEVICEMODE" ) ;
  408. if (err)
  409. {
  410. SetLastError(err) ;
  411. return err ;
  412. }
  413. }
  414. //
  415. // note it is no longer an error in our code. and call the API
  416. //
  417. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  418. return ( (*lpfnWNetDeviceMode)(p1) ) ;
  419. }
  420. WORD API WNetViewQueueDialog(HWND p1,LPSTR p2)
  421. {
  422. WORD err ;
  423. if (!lpfnWNetViewQueueDialog)
  424. {
  425. //
  426. // start off as a our code until we get the entry point
  427. //
  428. vLastCall = LAST_CALL_IS_LOCAL ;
  429. //
  430. // get the entry point from LANMAN.DRV
  431. //
  432. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetViewQueueDialog,
  433. "WNETVIEWQUEUEDIALOG" ) ;
  434. if (err)
  435. {
  436. SetLastError(err) ;
  437. return err ;
  438. }
  439. }
  440. //
  441. // note it is no longer an error in our code. and call the API
  442. //
  443. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  444. return ( (*lpfnWNetViewQueueDialog)(p1,p2) ) ;
  445. }
  446. WORD API WNetGetCaps16(WORD p1)
  447. {
  448. WORD err ;
  449. if (!lpfnWNetGetCaps16)
  450. {
  451. //
  452. // start off as a our code until we get the entry point
  453. //
  454. vLastCall = LAST_CALL_IS_LOCAL ;
  455. //
  456. // get the entry point from LANMAN.DRV
  457. //
  458. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetGetCaps16,
  459. "WNETGETCAPS" ) ;
  460. if (err)
  461. {
  462. SetLastError(err) ;
  463. return err ;
  464. }
  465. }
  466. //
  467. // note it is no longer an error in our code. and call the API
  468. //
  469. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  470. return ( (*lpfnWNetGetCaps16)(p1) ) ;
  471. }
  472. WORD API WNetGetError16(LPINT p1)
  473. {
  474. WORD err ;
  475. if (!lpfnWNetGetError16)
  476. {
  477. //
  478. // start off as a our code until we get the entry point
  479. //
  480. vLastCall = LAST_CALL_IS_LOCAL ;
  481. //
  482. // get the entry point from LANMAN.DRV
  483. //
  484. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetGetError16,
  485. "WNETGETERROR" ) ;
  486. if (err)
  487. {
  488. SetLastError(err) ;
  489. return err ;
  490. }
  491. }
  492. //
  493. // note it is no longer an error in our code. and call the API
  494. //
  495. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  496. return ( (*lpfnWNetGetError16)(p1) ) ;
  497. }
  498. WORD API WNetGetErrorText16(WORD p1, LPSTR p2, LPINT p3)
  499. {
  500. WORD err ;
  501. if (!lpfnWNetGetErrorText16)
  502. {
  503. //
  504. // start off as a our code until we get the entry point
  505. //
  506. vLastCall = LAST_CALL_IS_LOCAL ;
  507. //
  508. // get the entry point from LANMAN.DRV
  509. //
  510. err = GetLanmanDrvEntryPoints( (LPFN *)&lpfnWNetGetErrorText16,
  511. "WNETGETERRORTEXT" ) ;
  512. if (err)
  513. {
  514. SetLastError(err) ;
  515. return err ;
  516. }
  517. }
  518. //
  519. // note it is no longer an error in our code. and call the API
  520. //
  521. vLastCall = LAST_CALL_IS_LANMAN_DRV ;
  522. return ( (*lpfnWNetGetErrorText16)(p1,p2,p3) ) ;
  523. }
  524. WORD API WNetGetCaps(WORD nIndex)
  525. {
  526. switch (nIndex)
  527. {
  528. case WNNC_SPEC_VERSION:
  529. return wSpecVersion;
  530. case WNNC_NET_TYPE:
  531. return wNetTypeCaps;
  532. case WNNC_DRIVER_VERSION:
  533. return wDriverVersion;
  534. case WNNC_USER:
  535. return wUserCaps;
  536. case WNNC_CONNECTION:
  537. return wConnectionCaps;
  538. case WNNC_PRINTING:
  539. return (WNetGetCaps16(nIndex)) ;
  540. case WNNC_DIALOG:
  541. return wDialogCaps;
  542. case WNNC_ADMIN:
  543. return wAdminCaps;
  544. case WNNC_ERROR:
  545. return wErrorCaps;
  546. default:
  547. return 0;
  548. }
  549. }
  550. /*
  551. * misc support functions
  552. */
  553. /*******************************************************************
  554. NAME: GetLanmanDrvEntryPoints
  555. SYNOPSIS: gets the address of the named procedure
  556. from LANMAN.DRV, will load library if first time.
  557. ENTRY: lplpfn - used to receive the address
  558. lpName - name of the procedure
  559. EXIT:
  560. RETURNS: 0 if success, error code otherwise.
  561. NOTES:
  562. HISTORY:
  563. ChuckC 25-Mar-93 Created
  564. ********************************************************************/
  565. WORD GetLanmanDrvEntryPoints(LPFN *lplpfn, LPSTR lpName)
  566. {
  567. #define LANMANSHORTPATH "32\\" LANMAN_DRV
  568. static HINSTANCE hModule = NULL ;
  569. CHAR szLanmanFullPath[MAX_PATH + sizeof(LANMANSHORTPATH)];
  570. USHORT usLanmanFullPathLen;
  571. //
  572. // if we havent loaded it, load it now
  573. //
  574. if (hModule == NULL)
  575. {
  576. usLanmanFullPathLen = GetSystemDirectory((LPSTR)&szLanmanFullPath, sizeof(szLanmanFullPath));
  577. if (usLanmanFullPathLen == 0 || usLanmanFullPathLen >= sizeof(szLanmanFullPath))
  578. {
  579. return WN_NOT_SUPPORTED ;
  580. }
  581. else
  582. {
  583. lstrcpyn(&(szLanmanFullPath[usLanmanFullPathLen]), LANMANSHORTPATH, sizeof(LANMANSHORTPATH));
  584. hModule = LoadLibrary(szLanmanFullPath) ;
  585. if (hModule <= HINSTANCE_ERROR)
  586. return WN_NOT_SUPPORTED ;
  587. }
  588. }
  589. //
  590. // get the procedure
  591. //
  592. *lplpfn = (LPFN) GetProcAddress(hModule, lpName) ;
  593. if (! *lplpfn )
  594. return WN_NOT_SUPPORTED ;
  595. return NO_ERROR ;
  596. }
  597. /*******************************************************************
  598. NAME: SetLastError
  599. SYNOPSIS: makes note of last error
  600. ENTRY:
  601. EXIT:
  602. RETURNS:
  603. NOTES:
  604. HISTORY:
  605. ChuckC 25-Mar-93 Created
  606. ********************************************************************/
  607. WORD SetLastError(WORD err)
  608. {
  609. vLastError = err ;
  610. return err ;
  611. }
  612. /*******************************************************************
  613. NAME: LibMain
  614. SYNOPSIS: dll init entry point. only thing we do here is init
  615. the capability bits.
  616. ENTRY:
  617. EXIT:
  618. RETURNS:
  619. NOTES:
  620. HISTORY:
  621. ChuckC 25-Mar-93 Created
  622. ********************************************************************/
  623. #define NETWARE_DRV "NETWARE.DRV"
  624. int FAR PASCAL LibMain(HINSTANCE hInstance,
  625. WORD wDataSeg,
  626. WORD cbHeapSize,
  627. LPSTR lpszCmdLine)
  628. {
  629. #define NETWARESHORTPATH "32\\" NETWARE_DRV
  630. BOOL fLoadNetware = FALSE ;
  631. char IsInstalledString[16] ;
  632. CHAR szNetwareFullPath[MAX_PATH + sizeof(NETWARESHORTPATH)];
  633. USHORT usNetwareFullPathLen;
  634. UNREFERENCED(hInstance) ;
  635. UNREFERENCED(wDataSeg) ;
  636. UNREFERENCED(cbHeapSize) ;
  637. UNREFERENCED(lpszCmdLine) ;
  638. I_SetCapBits() ;
  639. if (GetProfileString("NWCS",
  640. "NwcsInstalled",
  641. "0",
  642. IsInstalledString,
  643. sizeof(IsInstalledString)))
  644. {
  645. fLoadNetware = (lstrcmp("1",IsInstalledString)==0) ;
  646. }
  647. //
  648. // Grab the interrupt for NWIPXSPX
  649. //
  650. if (fLoadNetware)
  651. {
  652. GrabInterrupts();
  653. usNetwareFullPathLen = GetSystemDirectory((LPSTR)&szNetwareFullPath, sizeof(szNetwareFullPath));
  654. if (usNetwareFullPathLen != 0 && usNetwareFullPathLen < sizeof(szNetwareFullPath))
  655. {
  656. lstrcpyn(&(szNetwareFullPath[usNetwareFullPathLen]), NETWARESHORTPATH, sizeof(NETWARESHORTPATH));
  657. //
  658. // if the file NETWARE.DRV exists, we load it. we dont really
  659. // use it, but some Netware aware apps require that it is loaded.
  660. //
  661. if (LoadLibrary(szNetwareFullPath) > HINSTANCE_ERROR)
  662. {
  663. (void)WriteProfileString("Windows",
  664. "NetWarn",
  665. "0") ;
  666. }
  667. }
  668. }
  669. return 1 ;
  670. }
  671. /*******************************************************************
  672. NAME: I_SetCapBits
  673. SYNOPSIS: initernal routine to set the capability bits
  674. ENTRY:
  675. EXIT:
  676. RETURNS:
  677. NOTES:
  678. HISTORY:
  679. ChuckC 25-Mar-93 Created
  680. ********************************************************************/
  681. void I_SetCapBits(void)
  682. {
  683. wNetTypeCaps = WNNC_NET_MultiNet |
  684. WNNC_SUBNET_WinWorkgroups;
  685. wUserCaps = WNNC_USR_GetUser;
  686. wConnectionCaps = (WNNC_CON_AddConnection |
  687. WNNC_CON_CancelConnection |
  688. WNNC_CON_GetConnections |
  689. WNNC_CON_AutoConnect |
  690. WNNC_CON_BrowseDialog |
  691. WNNC_CON_RestoreConnection ) ;
  692. wErrorCaps = WNNC_ERR_GetError |
  693. WNNC_ERR_GetErrorText;
  694. wDialogCaps = (WNNC_DLG_DeviceMode |
  695. WNNC_DLG_ShareAsDialog |
  696. WNNC_DLG_PropertyDialog |
  697. WNNC_DLG_ConnectionDialog |
  698. WNNC_DLG_ConnectDialog |
  699. WNNC_DLG_DisconnectDialog |
  700. WNNC_DLG_BrowseDialog );
  701. wAdminCaps = ( WNNC_ADM_GetDirectoryType |
  702. WNNC_ADM_DirectoryNotify ) ;
  703. /* disable LFN for now
  704. | WNNC_ADM_LongNames ) ;
  705. */
  706. }