tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: [Tinycc-devel] windows resources LinkRes2Exe.exe by Mike Henning


From: Mike Henning
Subject: Re: Fw: [Tinycc-devel] windows resources LinkRes2Exe.exe by Mike Henning
Date: Thu, 5 Oct 2006 17:26:22 -0700 (PDT)

I'm glad to hear it is working now! :)

Is the manifest file only being used to get the
enhanced XP common controls? If that is the case you
should specify a resource id of 1 for the manifest
file in your .rc script file and it should work at
startup.

Mike H.

--- bj <address@hidden> wrote:

> i got the program name.
>   char*        programname
> =GetCommandLine();//GetCommandLine(); was what i  
> used before, anyone can set programname to ""
>   GetModuleFileName(NULL,programname,MAX_PATH);
> 
> now the exe file can create its own manifest file
> beside itself before it  
> shows any windows, but even if it shows the window
> it doesn't use the  
> manifest file. so you have to restart it again to
> see it use the manifest.  
> so i need the restartable program.
> 
> 
> On Fri, 06 Oct 2006 04:10:46 +0800, Rob Landley
> <address@hidden> wrote:
> 
> > On Thursday 05 October 2006 3:28 pm, Laurens
> Simonis wrote:
> >> D_FONT),RT_RCDATA);
> >>  > and at finally it worked!!! thank you very
> much!!
> >>  > to all, how does one code a c program that
> knows its executable name  
> >> and
> >>  > can restart itself?
> >>
> >>
> >> The executable name can be found in argv[0] I
> think. Starting an exe can
> >> be done with system();
> >>
> >> #include <stdio.h>
> >>
> >> int main(int argc, char **argv)
> >> {
> >>    printf(argv[0]);
> >>    return 0;
> >> }
> >
> > That's a little oversimplified.  The path isn't
> reliably in there, and  
> > the
> > executable might not be in $PATH.  On linux, you
> can exec /proc/self/exe  
> > and
> > expect it to work.  (I don't do Windows.)
> >
> > Also, system() washes stuff through "/bin/sh",
> which spawns an extra  
> > process
> > and it's a child process rather than a restart. 
> On Linux you want one  
> > of the
> > exec() family of calls (man exec).  Possibly
> execvp();
> >
> > Rob
> 
> 
> 
> -- 
> Using Opera's revolutionary e-mail client:
> http://www.opera.com/mail/
> 
> 
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
>
http://lists.nongnu.org/mailman/listinfo/tinycc-devel
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]