This is the mail archive of the
cygwin-talk@cygwin.com
mailing list for the cygwin project.
Re: Compiling a windows.exe against cygwin1.dll ?
On Mon, 25 Oct 2004, Reini Urban wrote:
> Wim Van Oudenhove schrieb:
> > I would have done that a long time ago if I knew how to use COM under
> > GCC. The key purpose of this program is that it talks to the windows
> > sceduler, so it uses:
> >
> > #include <mstask.h>
> > CoInitialize()
> > CoCreateInstance(CLSID_CTaskScheduler,...)
> > CoTaskMemFree()
> >
> > And a whole bunch of functions related to them.
> >
> > Not exactly the most common functions in GCC afaik.
>
> COM works fine with gcc/w32api. The vtable layout was fixed some years
> ago. Just for directx you'd need some stubs which are available
> elsewhere.
>
> $ grep CoInitialize /usr/include/w32api/*
> $ grep CTaskScheduler /usr/include/w32api/*
> $ grep CTaskScheduler /usr/include/mingw/*
>
> This CLSID CLSID_CTaskScheduler is not in w32api and not in mingw.
> So you have to find the raw CLSID string. I didn't find it in
> oleview.exe or the registry, so you to find the CLSID elsewhere. in the
> official headers it should be somewhere.
You might also consider adding these to the w32api headers (guarded by
suitable version number defines, of course). Send a patch to
cygwin-patches, IIRC.
> Good idea btw. No need for another service, while we already have a
> scheduler.
Yeah, but cron, AFAIK, has many more options than the Windows Task
Scheduler. Of course, you may not need them all...
> > It also uses some of the AFX CList, CMap, and CArray templates. I'm sure
> > someone has written equivalents for them in ansi C somewhere, but all this
> > sounds like too much work for the same purpose.
>
> Better avoid AFX templates and use easier STL templates instead.
Not knowing much about the AFX templates, I wasn't sure if I should have
recommended that.
> > The function it performs is available by default on a unix
> > workstation, so I doubt that I'll ever need it for another operating
> > system than windoze.
HTH,
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing." -- Dr. Jubal Harshaw