Skip to content

Modify the import name in import library of Visual C++

Notifications You must be signed in to change notification settings

sorayuki/ImpLibEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a tool that can modify name decoration inside an import library.

Sometimes you will find it hard to generate an import library like those in
Windows SDK.

Take Sleep in kernel32.dll for example.
You may feel like to generate kernel32.lib from this .def file:

LIBRARY kernel32.dll
EXPORTS
Sleep

Then you will find the linker is looking for _Sleep@4, not Sleep.
If .def file is changed to:

LIBRARY kernel32.dll
EXPORTS
Sleep@4

Then the program won't run because it tries to import Sleep@4 from kernel32

This tool can help you change the import name Sleep@4 to Sleep,
while the linking name keeps Sleep@4. Just open the import library and
change the import type to undecorate, save it.

NOTICE: IT CAN ONLY MODIFY THE .LIB GENERATED BY LIB.EXE OR LINK.EXE /LIB.

If you need targeted .net FW 2.0 but doesn't have the toolset.
you may use ildasm to convert the CoreInterfaces.dll into .il,
then convert it back into .dll by using the ilasm of .net fw 2.0 which could
be found in "C:\Windows\Microsoft.NET\Framework\v2.0.50727".

About

Modify the import name in import library of Visual C++

Resources

Stars

Watchers

Forks

Packages

No packages published