Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > C wrapper

Reply
Thread Tools

C wrapper

 
 
Seth7TS@gmail.com
Guest
Posts: n/a
 
      06-25-2007
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

 
Reply With Quote
 
 
 
 
Nick Keighley
Guest
Posts: n/a
 
      06-25-2007
On 25 Jun, 08:54, (E-Mail Removed) wrote:

> 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().


--
Nick Keighley

 
Reply With Quote
 
 
 
 
Seth7TS@gmail.com
Guest
Posts: n/a
 
      06-25-2007
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


On 25 Giu, 10:07, Nick Keighley <(E-Mail Removed)>
wrote:
> On 25 Jun, 08:54, (E-Mail Removed) wrote:
>
> > 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().
>
> --
> Nick Keighley



 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      06-25-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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?

 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      06-25-2007
jacob navia <(E-Mail Removed)> writes:
> (E-Mail Removed) wrote:
>> 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

>
> 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.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Seth7TS@gmail.com
Guest
Posts: n/a
 
      06-25-2007
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...

On 25 Giu, 10:58, Keith Thompson <(E-Mail Removed)> wrote:
> jacob navia <(E-Mail Removed)> writes:
> > (E-Mail Removed) wrote:
> >> 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

>
> > 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.
>
> --
> Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
> "We must do something. This is something. Therefore, we must do this."
> -- Antony Jay and Jonathan Lynn, "Yes Minister"



 
Reply With Quote
 
Clever Monkey
Guest
Posts: n/a
 
      06-25-2007
(E-Mail Removed) wrote:
> On 25 Giu, 10:07, Nick Keighley <(E-Mail Removed)>
> wrote:
>> On 25 Jun, 08:54, (E-Mail Removed) wrote:
>>
>>> 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().
>>

> 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?
--
clvrmnky <(E-Mail Removed)>

Direct replies will be blacklisted. Replace "spamtrap" with my name to
contact me directly.
 
Reply With Quote
 
Barry Schwarz
Guest
Posts: n/a
 
      06-25-2007
On Mon, 25 Jun 2007 07:54:31 -0000, (E-Mail Removed) wrote:

>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
 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      06-25-2007
On Mon, 25 Jun 2007 08:16:51 -0000, in comp.lang.c , (E-Mail Removed)
wrote:


>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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrapper on magic line? Nilsson Mats Perl 0 12-09-2003 02:48 PM
Deployment of DTSPKG.DLL wrapper Marlene Arauz ASP .Net 0 11-10-2003 07:50 PM
wrapper function for uploading files Brian Pittman ASP .Net 3 07-30-2003 06:09 PM
Re: Coding a c# wrapper class to unmanaged C++ program, need some guidance Brendan Duffy ASP .Net 0 07-25-2003 12:49 AM
Anyone know of a ASP.NET wrapper for HTMLTidy? Showjumper ASP .Net 2 07-04-2003 01:26 AM



Advertisments