This is the mail archive of the cygwin-talk@cygwin.com mailing list for the cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiling a windows.exe against cygwin1.dll ?


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.


Good idea btw. No need for another service, while we already have a scheduler.

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.


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.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]