473,498 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to make an import library in vs2008

1 New Member
a requirement was sent to me below:

API should be in the form of static library. company xxx will link the library into a third party application to prevent any possible exposure of the code(dll)

could they mean an import library? An import library is a library that automates the process of loading and using a dynamic library. On Windows, this is typically done via a small static library (.lib) of the same name as the dynamic library (.dll). The static library is linked into the program at compile time, and then the functionality of the dynamic library can effectively be used as if it were a static library.

this might be what they might be eluding to.....I am not sure how to make this in vs2008 .

Additional facts: I have a static lib that i use in my current application. Now, I have to convert my app that uses that static lib into an import lib so that they can use a third party prog to access the API's they providede me which in turn will use that static lib i am using.

I hope I am clearly explaining this. I am just not sure how to go about it in vs2008. I am looking for specific steps to do this. I already have the coding done. Just need to convert it into the form they are asking and I have to provide the API they want. Other than that then I need to create a test prog which will act as that third party prog so I can make sure my import library works. Thus, if i can just make the import library then I can do the other stuff to test it.
Mar 19 '10 #1
1 3416
weaknessforcats
9,208 Recognized Expert Moderator Expert
I don't see how a DLL exposes the code.

What the decision should be based on is: Does the link occur at run-time or compile time? If run-time, then use a DLL. If compile time then use a static library.

A DLL requires a LoadLibrary call followed by a GetProcAddress followed by a type-cast of the FARPROC returned by GetProcAddress to a function pointer of the correct prototype for the function bein called.

However, you can still use a DLL as a static library if the DLL interface functions can be imported. That is, the DLL must support __dllimport.

In this case, a .lib is created by Visual Studio for each function in the dll that supports __dllimport. In that lib is a function of the correct name an prototype (as would be in your function pointer) and inside that funciton is called LoadLibrary and GetProcAddress.

However, the DLL is still run-time linked.

If you are uncertain on how to create libraries, then create a WIN32 project and when the wizard appears, do not click finish. Instead, click Application settings. On that dialog are check boxes for static or dynamic library. Make your selection and then click finish.
Mar 19 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
5701
by: pac | last post by:
I'm preparing to distribute a Windows XP Python program and some ancillary files, and I wanted to put everything in a .ZIP archive. It proved to be inordinately difficult and I thought I would...
7
5941
by: Cirene | last post by:
I used to use the Web Deployment Project with my VS2005 projects. Now I've fully upgraded to VS2008. Do I have to download a new version of the Web Deployment Project? If so where can I find...
8
3728
by: Joe Withawk | last post by:
I have a solution consisting of a c# project as win application and a c++ project as classlibrary. Both are .net 2.0 The classlibrary handles some loading of quicktime movies, but that should not...
20
2858
by: Iouri | last post by:
Hi everybody, We are currently using VS2003 and now we are in the porcess of upgrading to the next Visual Studio version. Does somebody have a real life experience with VS2008? My boss wants to...
3
1374
by: GaryDean | last post by:
Is there any possible downside of completely replacing VS2005 with VS2008 willy-nilly? Shouldn't it work with all of my 2.0 projects and websites? (I have MSDN vs2008 DVD (disk 4400)) ...
2
2429
by: Academia | last post by:
I have vs2005 installed on the System disk and vs2008 installed on a different disk. I want to remove VS2005. I read one time about some problem with uninstalling vs2005 after vs2008 is...
9
2094
by: rsoh.woodhouse | last post by:
Hi, I'm trying to work out some strange (to me) behaviour that I see when running a python script in two different ways (I've inherited some code that needs to be maintained and integrated with...
0
1299
by: ker_01 | last post by:
I received a copy of VS2008 Standard Edition at a recent MS launch event. I need to test some code for MS Office (Excel) and also update a program I wrote in VS2003 for a mobile device (still to...
4
2938
by: BillE | last post by:
I have found articles on line about using word interop for spell checking with visual studio applications. Most of the articles are several years old, though - VS2003, maybe 2005. I couldn't...
3
5793
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Hi everybody, There is a fatal error while installing VS2008 SP1 on Vista 64bit Business edition. The last line of error log is Installation failed with error code: (0x80070643) I tried to...
0
7121
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.