Options

Modify code of a CU's Function from other CU

krzychub83krzychub83 Member Posts: 120
I would like to be able to access function code of one codeunit from another cu. I am not thinking about the simple rise of a function. I would like to see the code like the C\AL Editor does.
Is it possible and how? Thanks for help.

Comments

  • Options
    BeliasBelias Member Posts: 2,998
    can I ask you why do you need this?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Options
    XypherXypher Member Posts: 297
    As far as I know, no one has been able to "decompile" code found in the blob field of a corresponding object.

    If you're looking to create some kind of editor your best bet would be to import/export the objects of choice by Text.
  • Options
    krzychub83krzychub83 Member Posts: 120
    can I ask you why do you need this?

    Or there is couple reasons why I am looking for this. Code protection, modification menage, and and and...
    no one has been able to "decompile" code
    I wouldn't focus at the decompile process now. I guess that NAV is holding decompiled and compiled forms of objects (maybe I am wrong).

    There is always a way, but not always it has to be easy. :-k
  • Options
    XypherXypher Member Posts: 297
    Just off the top of my head to create some kind of "Code Protection" and "Modification Management" just use encryption on the Blob field of the Object(s).

    Make a specific CU for this to not only encrypt but to Run or to Edit the code as well.

    Only downside is you'd have to use this CU to run anything you have "protected". I'm not entirely sure how the other code protection utilities work. (You can search for them under the download sections of Mibuso)

    Although a crude idea on how to do what you want, I'm not entirely sure if it would work.

    Also I highly doubt Navision "decompiles" and loads all the text code into memory and it just chills there until you hit design on an object. I'm sure it "decompiles" on the fly.
  • Options
    David_SingletonDavid_Singleton Member Posts: 5,479
    I would also think again about discussing in a public forum that you are planning to do something illegal [-(
    David Singleton
  • Options
    XypherXypher Member Posts: 297
    I would also think again about discussing in a public forum that you are planning to do something illegal [-(

    Not to be disrespectful to you David, and thank you for your opinion, but there are already code protection implementations out there (even on this site). Not sure how it would be illegal to publicly talk about how to create something that legally already exists, as long as there is no copyright infringement involved.
  • Options
    David_SingletonDavid_Singleton Member Posts: 5,479
    Actually the reply was to krzychub83, but...

    In anycase it is illegal to in anyway reverse engineer Navision code (read the contract). I am sure people do it, but that doesn't make it legal.
    David Singleton
  • Options
    krzychub83krzychub83 Member Posts: 120
    Thank You Xypher and David

    I've just thought about utility to manage my modification code. However when I see a solution I see a possibilities of upgrading it functionality too.

    The encryption of a blob field is a way, but I am not looking for it. I am trying to read and write code outside the C\AL Editor.

    What about illegal/legal. If this is going to increase my knowledge about NAV I will take the shout, even to receive such comments.

    So thank You both for answers.
  • Options
    kinekine Member Posts: 12,562
    There is download which is using ROT to access NAV objects through NAV native interface (used e.g. by NDT). It have some bugs, but may be it will be enough for you. But do not forget that next version of NAV (NAV 2009) will compile the code into C# (it is easy to read the code from DB), and it means som implications for you like that the NAV is compiling the objects more often etc. (e.g. after importing FOB...)...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    krzychub83krzychub83 Member Posts: 120
    Thank You Kine =D>
  • Options
    rotoflexrotoflex Member Posts: 14
    kine wrote:
    There is download which is using ROT to access NAV objects through NAV native interface (used e.g. by NDT). It have some bugs, but may be it will be enough for you. But do not forget that next version of NAV (NAV 2009) will compile the code into C# (it is easy to read the code from DB), and it means som implications for you like that the NAV is compiling the objects more often etc. (e.g. after importing FOB...)...

    Hi kine, I know this is an old thread, but could you tell which download you are referring to?

    Thanks and regards,

    rotoflex
  • Options
    kinekine Member Posts: 12,562
    See http://gotcal.com/ for more...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    rotoflexrotoflex Member Posts: 14
    kine wrote:
    See http://gotcal.com/ for more...

    I have used that example, what I wanted to know for example how these code protectors handle compiling objects from NAV? I know they don't use their own NET classes and I suspect they use some automation for that.

    Regards,

    roto
Sign In or Register to comment.