Viewing .lib files

This is a discussion on Viewing .lib files within the C++ Programming forums, part of the General Programming Boards category; I'm trying to view the implementation of windows functions by looking at the libraries. (kernel32.lib in this case) However, I ...

  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    33

    Viewing .lib files

    I'm trying to view the implementation of windows functions by looking at the libraries. (kernel32.lib in this case) However, I only get machine code, which I expected, but can't make anything out of that mess. Is there a way to deconstruct a library after it has been created, or do they just stay in machine format?
    “Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. " -John Carmack

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    There's no easy way to decipher LIB files or any binaries for that matter. If you really want to try, look up "reverse engineering".

    You would probably be better off just asking questions of experienced programmers who may have discovered certain aspects of the implementations you are looking it.
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #3
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Closest you really can come is to do deassemble and then look at the assembly code. There are a few programs that can take it a few steps further but the code is still fairly rough.

  4. #4
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    There is no 'code' in kernel32.lib. This is an import library. It describes for the linker, how to link with the functions in kernel32.dll.

  5. #5
    Registered User
    Join Date
    Jan 2004
    Posts
    33
    Ok I see. I suppose theres no real way to decode dlls either.
    “Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. " -John Carmack

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with loading files into rich text box
    By blueparukia in forum C# Programming
    Replies: 3
    Last Post: 10-19-2007, 12:59 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. fopen vs. _open (for BIG image files)
    By reversaflex in forum C Programming
    Replies: 3
    Last Post: 04-01-2007, 12:52 AM
  4. I Need To Know Some Things That I Can Put Into A Batch File
    By TheRealNapster in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-20-2003, 08:12 PM
  5. reinserting htm files into chm help files
    By verb in forum Windows Programming
    Replies: 0
    Last Post: 02-15-2002, 08:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21