Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8387631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:15:58+00:00 2026-06-09T18:15:58+00:00

I used Loadlibrary and Getprocaddress to link some of the WinApis for runtime linking.

  • 0

I used Loadlibrary and Getprocaddress to link some of the WinApis for runtime linking. It works fine, as expected.

But for some Apis I just used -ldllname as the compiler option. The same option gives linker error for some APIs, and needs the dll to be loaded.

Is there any particular difference in this, that is some particular APIs need runtime linking and other APIs will work with -ldllname option?? How to clasify APIs of these kind?

Update: What I observed is the APIs supporting UNICODE and ANSI i.e.,
The API which is suffixed with “W” and “A” , get resolved with static
linking itself? Am I correct? Correct me if I am wrong!

why some APIs need Run time linking and others get resolved with Static
linking itself(-l option)? Any reason for this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:16:00+00:00Added an answer on June 9, 2026 at 6:16 pm

    I used Loadlibrary

    That would be an example of taking an implicit dependency on a DLL. LoadLibrary is a function that’s exported by kernel32.dll, a Windows api DLL. It actually exists in two versions, LoadLibraryA and LoadLibraryW. Respectively the non-Unicode and the Unicode version of the function. You’ll get one or the other, depending on whether you have the UNICODE macro #defined when you compile.

    So that’s the exact opposite of dynamically linking an export with GetProcAddress, you must tell the linker that your program has a dependency on kernel32 with the -l option. And at runtime the DLL automatically gets loaded before your own code starts running.

    Having an implicit dependency on operating system DLLs is quite normal. And unavoidable, you can never dynamically link kernel32.dll, that would be a chicken-and-egg problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some clarification regarding runtime/heap issues when deleting an object which was created
Used as a scripting language, does Scala have some sort of include directive, or
Possible Duplicate: Application works in debug / run from Eclipse, but .APK gives .classNotFoundException
Used to be quite happy with the Ctrl + Shift + F10 shortcut in
Used code I found on SO to use the COM based Acrobat Reader to
Anybody used Neural Network approaches for clustering data? Particularly ART Neural Network (Adaptive Resonance
I used the phonegap website to create an IPA file. Now I want to
I used Jquery to insert a variable to div. Please check my code. var
Having used storyboards for a while now I have found them extremely useful however,
I used ReconstructMe to scan my first half body (arm and head). The result

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.