- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please advice what compiler option(s) (if any) I should use to avoid a Fortran program to run on non authorised machines?
Thanks
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AFAIK there is no compiler option that does that for you.
We secured our programs by getting hardware information at runtime. That hardware information is hard coded in our program and compared at the beginning of the program. In case of a mismatch the program won´t start.
Markus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use PLS from Polyhedron and it has various options, one of them using hardware id values to license the software. It works great!
Neels
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
I am after something simple but that works. Markus, can you provide me with some code example(s) I can follow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, you could do the following things:
[fortran]
character*255 username,hostname
call GETENV ("USERNAME", userName)
l = Hostnam(hostname)
[/fortran]
These two functions get you the name of the computer and the logged in user. You can do some Registry stuff via Win32, like RegOpenKeyEx and RegQueryValueEx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is not a simple matter to license software. The more valuable your software, the more effort people will make to crack it and the more it will cost you to pretect it. For instance, if you embed hardware ID in your code, it will be a fairly simple matter to ovewrite your executable with any other ID, especially if you tell people that is how your software works ! You would need to employ encrytion to stop tampering. If you really want to protect the value of your software you should employ a good comercial system. Intel Fortran itself uses the Flex system I believe, but there are many others such as Safenet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Markus,
Thanks for the example.
Neels and Andrew thanks for your valuable comments.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page