How to include a .DLL?


Closed Thread
Results 1 to 15 of 15
  1. #1
    Join Date
    May 2016
    Posts
    33

    Default How to include a .DLL?

    Hello all,

    I would like to encrypt part of my code by turning it to a .DLL.

    I am trying to turn part of my code to assembly and trun that to a DLL.

    Now I am a bit confused on how to include a DLL in Basic code? Should I use EASYHID and C++? Would appreciate simple instruction.

    BTW I am using PIC18F.

  2. #2
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    There is no easy way to include Dynamic-link library, it could be done, but...
    There is easy way to include static-link library. Just look up for my bootloader posts, and explanation how to pass variables between main app and bootloader.

  3. #3
    Join Date
    May 2016
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    Quote Originally Posted by pedja089 View Post
    There is no easy way to include Dynamic-link library, it could be done, but... There is easy way to include static-link library. Just look up for my bootloader posts, and explanation how to pass variables between main app and bootloader.
    Seems like there are lots of bootloader posts that you are involved.But I think bootloader is the way to go. Is there any example for reading data/including code from bootloader to main code?

  4. #4
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    There is. I can't remember topic name. In that topic I explained how variables can be shared between main app and bootloader.

  5. #5
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?


  6. #6
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    Can I ask you what you are trying to accomplish?

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    ditto the last post. Why would you want to include pre-compiled code when its so much easier to include the source and compile the whole thing.

    DLL's are commonly used to implement third party functions. The operating system controls initialization and there is a mutually understood way of defining and passing parameters. Non of these thing apply in this case.

    I'm sure it's possible but the real question is why?
    George

  8. #8
    Join Date
    May 2016
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    The purpose is to have an open source code that part of it is encrypted. So I don't want to release part of it.Either using an object file,DLL, or code in bootloader and then call it from main code.

  9. #9


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    If you don't want to provide the source, how can it be open source?
    George

  10. #10
    Join Date
    May 2016
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    Quote Originally Posted by towlerg View Post
    If you don't want to provide the source, how can it be open source?
    Most of it will be open source but I don't want to open source small part of it dealing with USB.So basically I want to release the source code but not one of include files.

  11. #11
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    Forget about that...
    First you can easily dissemble hex file, and get that ASM code. Second, how PIC will execute commands if they are encrypted. Any way you must write original source code to FLASH if you want to execute it.
    So even if code is loaded in flash encrypted, and then decrypt in pic and wrote to FLASH again, just run your code in some simulator, and look FLASH content...
    I don't want to be rude, but open source with hidden source is plain stupid...

  12. #12


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    I don't want to be rude either but pedja089 realy does have a point. It's either open sorce or its not (like being a little bit dead)
    George

  13. #13
    Join Date
    May 2016
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    I don't mind if they dissemble the hex.I just don't want it to be too easy to simply read the code.As far as I can call a function in Bootloader then I am fine.I am a bit new to bootloader but can I upload two hex files to MCU? or second hex should be done through bootloader?

  14. #14
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    There is some programmers that would you probably allow you to load two hex...
    I always put precompiled bootloader at end of main app and every thing i need for production is in one HEX.

  15. #15
    Join Date
    Aug 2016
    Posts
    22


    Did you find this post helpful? Yes | No

    Default Re: How to include a .DLL?

    You can create C++ app that references the DLL file.

Similar Threads

  1. SSD1306 Include example
    By timc in forum Code Examples
    Replies: 11
    Last Post: - 28th November 2017, 09:53
  2. Use of INCLUDE
    By Alexey in forum mel PIC BASIC
    Replies: 8
    Last Post: - 25th December 2013, 14:51
  3. where to put include files
    By queenidog in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st February 2013, 20:10
  4. Where are all the INCLUDE files??
    By Heckler in forum General
    Replies: 3
    Last Post: - 13th September 2011, 09:27
  5. Need to download Include files
    By laflam_p in forum Off Topic
    Replies: 2
    Last Post: - 2nd September 2009, 14:39

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

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