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: bj
Subject: Re: Fw: [Tinycc-devel] windows resources LinkRes2Exe.exe by Mike Henning
Date: Sat, 07 Oct 2006 01:12:19 +0800
User-agent: Opera Mail/9.02 (Win32)


i thought it'll work but it didn't then i googled it and came with search result no 3
                http://www.codurisursa.ro/print.php?id=95
        and though it's not english, i understood it.
besides making the resource id 1, resource type should be 24 not RCDATA or RT_MANIFEST(which didn't work on LinkRes2Exe,btw). then i replace it with 24 and then it worked. YEAH!! that was so simple that it feels stupid, anyway, thanks :D ;) :) and i have no more problems regarding my exe, and even if i have, i can google it and if it came up with unsatisfying results then i'll ask you guys about it again. hehe :)
        anyway, just out of curiosity i have these questions for you:
i have found a restartable program called RestartableApp.exe in www.codeproject.com. dare to make a version of it that compiles in tcc?
                what is the smallest gui c compiler anyone of you used?
                what are other uses of the manifest file, anyway?


On Fri, 06 Oct 2006 08:26:22 +0800, Mike Henning <address@hidden> wrote:

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


_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/




reply via email to

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