C wrapper

S

Seth7TS

Hi everyone,
i need to make a protection for a fortran software(a line command in
linux). My desire is to write a C wrapper that control the execution
of the program. Can someone help me? i dont know i to start it!My
question is also how can i make the fortran binary to execute from
C.....
tnx in advance

Seth
 
N

Nick Keighley

i need to make a protection for a fortran software(a line command in
linux). My desire is to write a C wrapper that control the execution
of the program. Can someone help me? i dont know i to start it!My
question is also how can i make the fortran binary to execute from
C.....

I didn't entirely understand your question and you're probably close
to
being off-topic. You might be better off asking your question in a
platform specific group (Unix or Windows). You may be asking the
wrong
question (for instance a shell script *may* be a better idea than C,
and a "fork" may be better than "system").

If you want to call another program from C use system().
 
S

Seth7TS

i don't think to be off-topic..however maybe i explained bad..
the problem is this:
i have a fortran software that runs in line command under linux.
i want to make a C wrapper to control the execution of that program.In
particolar i want to make a time-licence to sell it.
But i don't know how to start e how to make a wrapper that would to
this.
hope to get some help!!(and not to be off-topic!)

thanx
 
J

jacob navia

Hi everyone,
i need to make a protection for a fortran software(a line command in
linux). My desire is to write a C wrapper that control the execution
of the program. Can someone help me? i dont know i to start it!My
question is also how can i make the fortran binary to execute from
C.....
tnx in advance

Seth

Since you are going to sell this stuff, either you give the people
here money for their advise, or you hire someone competent to do
the job. It would be unethical to ask people here to work for free
so that YOU can earn your money isn't it?
 
K

Keith Thompson

jacob navia said:
Since you are going to sell this stuff, either you give the people
here money for their advise, or you hire someone competent to do
the job. It would be unethical to ask people here to work for free
so that YOU can earn your money isn't it?

I see nothing unethical about it. I see nothing wrong with asking for
advice, even if it happens to be about something for which one is
paid. People ask such questions here all the time.
 
S

Seth7TS

i don't want people here to work for me...im just asking some
advice,some documents to read and learn...
and almost all of people than ask for advice here is for "work", or
something like that...
 
C

Clever Monkey

> i don't think to be off-topic..however maybe i explained bad..
> the problem is this:
> i have a fortran software that runs in line command under linux.
> i want to make a C wrapper to control the execution of that program.In
> particolar i want to make a time-licence to sell it.
> But i don't know how to start e how to make a wrapper that would to
> this.
> hope to get some help!!(and not to be off-topic!)
>
[Please don't top-post. I've correct your post here.]

It is starting to sound off-topic for this group. I understand you want
to construct a C program that wraps an external executable, but this is
just a guess, and the requirements are rather sketchy.

Given we are probably off-topic...

Since it doesn't matter what language, really, an executable is written
in, all you care about is that you have an executable of some sort that
you want to control access to.

That being said, how do you keep me from just running the executable
directly, bypassing your wrapper?

However, it sounds like you want to implement a license key system of
some sort, which is a surprisingly hard thing to get right (which is why
there are so many third-party licensing schemes you can buy). The idea
is to have the user provide a key that you can use to mathematically
determine if the software is unlocked. Part of the processing might
require a time and/or date component, which will further require
querying the system for the current time, and/or writing an obfuscated
cookie file in a known location so you can keep people from simply
hacking the system time to get around your check.

You need to determine your requirements and limitations, and then write
some code. Then come back with specific questions about C, if you are
writing C to solve this problem.

You can also set up a simple wrapper that calls home to get a license
key, which pushes all this processing to a web service of some sort.
This way you keep the client-side processing very simple.

This cat, it can be skinned in a variety of ways. But then again, who
wants a skinned cat?
 
B

Barry Schwarz

Hi everyone,
i need to make a protection for a fortran software(a line command in
linux). My desire is to write a C wrapper that control the execution
of the program. Can someone help me? i dont know i to start it!My
question is also how can i make the fortran binary to execute from
C.....
tnx in advance

The only portable method of executing a generic line command from your
C program is the standard system() function. You can dynamically
build the command string you pass to the function so the command
parameters can be generated at run time.


Remove del for email
 
M

Mark McIntyre

i have a fortran software that runs in line command under linux.
i want to make a C wrapper to control the execution of that program.

You can use the system() function to run other programmes from within
a C programme.

If you want to find out whether the other programme worked, or to do
anything more complicated than just run it, with some commandline
arguments, you probably need to ask in a group specialising in
unix/linux programming.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top