Solved

From which DLL I must import  Win32 LAN Manager Functions?

Posted on 1999-01-06
8
305 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

19 Experts available now in Live!

Get 1:1 Help Now