On Jul 20 11:51, Chris Sutcliffe wrote: > On 20 July 2010 10:32, Corinna Vinschen wrote: > > Can you please explain this a bit more? What exactly are these > > applications doing? I'm asking because one way to extract the constants > > via an application is "grep" in the VC++ include directory. How are the > > apps in question extracting constants? > > One example is the following code employed by a user to determine the > value IID_IActiveDesktop: > > #include <windows.h> > #include <shlguid.h> > #include <stdio.h> > #include <string.h> > > void print_guid(const char *name, const GUID *guid) > { > int mem[4]; /* Assume sizeof(int) == 4 */ > int i; > > memcpy(mem, guid, sizeof(mem)); > > printf("%s: 0x", name); > for (i = 0; i < 4; i++) > printf("%X", mem[i]); > printf("\n"); > } > > int main(void) { > GUID template = IID_IShellView2; > GUID cls = CLSID_ActiveDesktop; > GUID iid = IID_IActiveDesktop; > > print_guid("template", &template); > print_guid("cls", &cls); > print_guid("iid", &iid); > > return 0; > } > > This code was compiled VC++ and run to extract IID_IActiveDesktop. > From what the OP stated, he never looked at the header files, just > used this 'blackbox' approach.
Hmm, that looks... interesting. No worries for the CLSID value which can easily be extracted from the registry (HKEY_CLASSES_ROOT\CLSID), but otherwise... > > FYI, I already asked for legal advice about the situation with Mingw64, > > which is different, but might give some important insight. kIf you give > > me some hints about these apps, I'll forward your request as well. The > > reply might take some time, though. > > No worries, I would very much appreciate the legal advice around this > and will gladly hold off doing anything with the patch until I've > heard back. Ok, I'll forward this problem. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat