Solved

From which DLL I must import  Win32 LAN Manager Functions?

Posted on 1999-01-06
8
319 Views
Last Modified: 2013-12-03
Hello,

I use Borland C++ 5.0. My 32-bit programm uses some LAN Manager Functions. It couldn't start. I receive a system message box that my program use a missing function in NETAPI32.DLL . After browsing WINDOWS\SYSTEM directory I learned that NETAPI32.DLL has a size about 4096 bytes and it doesn't export any function!

In Online Support (http://support.microsoft.com) I found that in Windows 95 we must import functions from SRVAPI.DLL . And again, I learned SRVAPI.DLL doesn't export any function!

I also found in Windows\System directory NETAPI.DLL but this is 16-bit DLL. I couldn't change my project to 16-bit b/c header file lm.h is only for 32-bit applications.

Please tell me from which DLL I must import so I can use Win-32 LAN Manager Functions under Windows 95? And if I want to use NETAPI.DLL (16-bit) what I have do in case of header file lm.h only for 32-bit applications?

Thanks.
0
Comment
Question by:toannds
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 10 total points
ID: 1418249
Use netapi32.dll in Windows NT or svrapi.dll in Windows 9x. The file size in your system is wrong.
0
 

Author Comment

by:toannds
ID: 1418250
Chensu, my LAN use Windows 95 only. I check all PC of my LAN and see that:

SRVAPI.DLLs have the same size 13312 bytes and export nothing.
NETAPI32.DLLs have the same size 4096 bytes and export one function: netbios

I don't understand why our system works well! I see "My Computer" can share my disk to other PCs so maybe it and other applications use LAN Manager Functions reside in another DLLs?. I really want to know where they are (LAN Manager functions). Don't laugh at my stupid thinking.

Do you have any idea?
Thanks.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1418251
Do you have the import libraries (srvapi.lib and netapi32.lib)? If so, just use them and test your program.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:toannds
ID: 1418252
Chensu, I view the import32.lib and see that it already contains LAN Manager Functions.

I created SRVAPI.LIB, NETAPI32.LIB by IMPLIB.EXE and linked them to my program. Compiling is successful but help nothing. I think SRVAPI.DLL, NETAPI32.DLL didn't contain any LAN Manager Functions so linker used what it found in IMPORT32.LIB without any warning or error.

Thanks.
0
 

Author Comment

by:toannds
ID: 1418253
Chensu, I have installed VC++ 5.0. I add SRVAPI.LIB into my project and now I receive a link error:

unresolve reference NetShareSetInfo

I view SRVAPI.LIB and see NetShareSetInfo there! I couldn't understand why I can use NetShareGetInfo and others but not NetShareSetInfo although they're imported from the same DLL.

0
 
LVL 23

Expert Comment

by:chensu
ID: 1418254
The function prototype of NetShareSetInfo in svrapi.h is different from the one in lmshare.h. For Windows 95, you have to include svrapi.h.
0
 

Author Comment

by:toannds
ID: 1418255
Chensu, thank you very much! Although I have some other troubles but my program's on the right way. I can not understand why QuickView and implib.exe (from Borland C++) doesn't see any export function of svrapi.dll ?

0
 
LVL 23

Expert Comment

by:chensu
ID: 1418256
You may use Depends.exe that comes with the Platform SDK to see the exported functions.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question