Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to generate a ".lib" file from a DLL?

5 views
Skip to first unread message

creative22

unread,
Sep 7, 2009, 1:32:02 PM9/7/09
to
Hello
I have a dll driver for a TPM hardware(Trusted Platform Module) and need to
have it's library;
How can I generate a static library file for this dll?
I don't have any header file for this dll!

I've uploaded this dll on a host that is here:
http://www.ziddu.com/download/6401151/TPMDrivers.rar.html

A folder named "Main DLL" contains the main driver;
A folder named "Other DLL" contains another TPM driver;
A folder named "TPM .sys file" contains a .sys driver for TPM;

Could you produce a lib file for each one?

Thanks in Advance.

Brian Muth

unread,
Sep 14, 2009, 4:11:56 PM9/14/09
to
http://support.microsoft.com/kb/131313

Why not contact the author of the DLL? That's the most sensible course of
action.

Brian

Ben Voigt [C++ MVP]

unread,
Sep 15, 2009, 5:24:09 PM9/15/09
to

"creative22" <creat...@discussions.microsoft.com> wrote in message
news:42B71B9C-3CD5-4FB1...@microsoft.com...


> Hello
> I have a dll driver for a TPM hardware(Trusted Platform Module) and need
> to
> have it's library;
> How can I generate a static library file for this dll?

You can't turn a dll into a static library. The information needed by the
linker is no longer present.

You can make an import library that will make it easier to use the DLL (the
Windows loader will do all the LoadLibrary/GetProcAddress magic for you if
you have an import library, but you can always call those functions
yourself).

> I don't have any header file for this dll!

You will still need to know the prototype for each function, which is what a
header file usually contains, along with (even more important) some
instructions on how to use them. This information cannot be extracted from
a .DLL.

>
> I've uploaded this dll on a host that is here:
> http://www.ziddu.com/download/6401151/TPMDrivers.rar.html
>
> A folder named "Main DLL" contains the main driver;
> A folder named "Other DLL" contains another TPM driver;
> A folder named "TPM .sys file" contains a .sys driver for TPM;

And finally, a .sys file is a kernel library, not a DLL, so you can't import
it and call its functions. To use it, you call CreateFile on the associated
device name and issue IOCTLs.

0 new messages