Solved

From which DLL I must import  Win32 LAN Manager Functions?

Posted on 1999-01-06
8
307 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
  • 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Table Size and Indexes in SQL Server 6 21
Vb.Net Loading Word 11 98
Microsoft Query from QuickBooks 9 63
Explain Unit of Work pattern 2 55
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now