CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Posts
    2

    [RESOLVED] Static or dynamic DLL- confused begginer question- please Help!!!

    Hello ,
    I'm writing some app and dll that will be using PS/SC reader(dll purpose is to read information from smart card card, exe app is only for calling dll and manage information readed by dll).

    Now i have some specification of dll - the main funtion is :
    int WINAPI Card_Read(char *CardCode, int size , int ReadersIndex, refreshStatus ptrFunc)

    I wrote some dll for another app and it is working.
    I want to use this dll in my app(and link it like a static library). My question is that if i change some code ( example APDU commands ) inside this dll function and compile dll - it will be still working with my app if i link it like a staic library?
    I don't uderstand it from assemby point of view. When I compile app with .lib from my dll it tells app what is adress of the function?
    So when I change some code that adress of the function will change too?
    There will be a need to change the code of this function from time to time - do I need to link it dynamically?

    Sorry - I know this is maybe silly question - but I'm confused about this.

  2. #2
    Join Date
    Jan 2005
    Location
    germany
    Posts
    160

    Re: Static or dynamic DLL- confused begginer question- please Help!!!

    You want to know, if changing code will influence the way your app calls a dll? I think:
    No matter if you use static linking (with a .lib) or dynamic linking with GetProcAddress(): As long as you do not change the calling convention and the signature of your functions, the App will work.

    regards
    HoM

  3. #3
    Join Date
    Aug 2009
    Posts
    2

    Re: Static or dynamic DLL- confused begginer question- please Help!!!

    Thank you HoM. That's all i want to know.

    Best Regards
    Damian Greda

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured