CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Dll question

  1. #1
    Join Date
    Jul 2009
    Posts
    45

    Talking Dll question

    I would not like to distribute my dll as a separate file in the release of the tool I made
    but my application needs it to run properly although it is sure to not be there as a necessity

    So I wonder how I can merge the dll into my exe so it will be out as a complete whole single entity

    Thanks a lot for any replies

  2. #2
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: Dll question

    What is the technology? It is .NET or C++ or something else? Generally speaking, your could link the library statically, or embed it to .exe as a resource.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

  3. #3
    Join Date
    Jul 2009
    Posts
    45

    Re: Dll question

    But how ? I have only the dll

  4. #4
    Join Date
    Oct 2009
    Posts
    5

    Re: Dll question

    Hello, Ha555
    I have a similar problem in this link http://www.codeguru.com/forum/showth...wpost&t=486140
    Did you have a solution already ? Please help me
    Thank you very much

  5. #5
    Join Date
    Jul 2009
    Posts
    45

    Question Re: Dll question

    Quote Originally Posted by Star Beaver View Post
    Hello, Ha555
    I have a similar problem in this link http://www.codeguru.com/forum/showth...wpost&t=486140
    Did you have a solution already ? Please help me
    Thank you very much
    You see it or not!
    boudino's INTENTION was to keep me online at that time so that I would be charged higher! (I was using his internet service!). Ripper!

    It's his greed: he has a store of T shirts, coffee, he has multiple ways to publish his views, his books he wrote....That greedy!

  6. #6
    Join Date
    Jul 2009
    Posts
    45

    Re: Dll question

    Oh well,
    I have not resolved my own problem and as I can see in Find All Your Posts \
    I am surprised as you too do something the same.

    Let's close our eyes and make a wish that someone will help us out.


    Someone please throw in one post to help 2 persons at the same time ?
    Somebody please ?

  7. #7
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Dll question

    Actually, boudino gave you two solutions to your problem:

    1) If you have the source code, compile the DLL into a static library instead. Link your EXE with the static library.

    2) If you do not have the source code, embed your DLL into your EXE as a resource. Then, before you start anything in your EXE, you write the DLL resource to disk, and load it from there.

    Viggy

  8. #8
    Join Date
    Jul 2009
    Posts
    45

    Re: Dll question

    thank you ******** me
    1> I stated in n my OP that I loaded it inmy memory already. Why did he repeat it ? lenghthening the period ?
    2> Ok I loaded it into memory

    HINSTANCE hlib=::afxloadlib("hello.dll");
    if(null=hlib){}
    why is hlib always null ?


    <* is c;clarify, a way of deceving people online once filtering that word to remind everyone within the family keep on cheating people more and more. should be a method of an old woman online but very agreessive>

  9. #9
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Dll question

    Assuming you mean AfxLoadLibrary. NULL means there was an error loading the library.

    Viggy

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