w32api question

Chris Sutcliffe ir0nh34d@gmail.com
Wed Oct 6 11:34:00 GMT 2010


Hi Corinna,

On 20 July 2010 12:58, Corinna Vinschen wrote:
> 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.

Did you have a chance to follow up on the 'blackbox' approach to
including IActiveDesktop in w32api?

Thank you,

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d



More information about the Cygwin-apps mailing list