Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

From which DLL I must import  Win32 LAN Manager Functions?

Posted on 1999-01-06
8
Medium Priority
?
334 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 40 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

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…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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 this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

610 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