RE: ShLwApi translation problem

"Marcel van Brakel" <[email protected]> Wed, 15 Jun 2005 00:10:48 +0200
Newsgroups gmane.comp.lang.delphi.jedi
Message-ID <20050614221048.BHGL8168.amsfep14-int.chello.nl@SOFIE>
Alec,

> The most important one being that it shows the following GUIDs
[...]
> But if I go back to the MS header file ShlGuid.h

This could well be in error.
 
> Also, (Marcel, if you are listening) was there a reason why
> IQueryAssociation was translated from the original as plural
> (IQueryAssociations) in the ShlwApi.pas file.

Sorry, it's been too long ago, I have no idea. There's a good chance it's
simply an error. Back then I did many translations by hand, I didn't switch
to using tools later..
 
> BTW, I got to this point trying to get the helper function AssocCreate
> to work. Even with the above changes, I still can't get this to return
> an IQueryAssociation interface. I always get an access violation in
> SHELL32.DLL (go figure). As a side note, if anyone knows how to get a
> valid IQueryAssociation interface I'd be much obliged. I've 
> been hung up on this for a day now and it's kicking my butt.

Hmmm, it may be that AssocCreate is translated incorrectly:
 
LWSTDAPI AssocCreate(CLSID clsid, REFIID riid, LPVOID *ppv);

function AssocCreate(clsid: TCLSID; riid: TREFIID; ppv: Pointer): HRESULT;
stdcall;

The trouble is that REFIID is a pointer to a GUID, TREFIID is (probably)
merely a GUID. Similarly, LPVOID* is a pointer to a pointer, not just a
pointer. A more accurate translation would be:

function AssocCreate(
  clsid: TCLSID; 
  const riid: TGUID; 
  out ppv: Pointer): HRESULT; stdcall;

Does this make a difference?

Looks like I made quite a bit of mistakes back then :-(

PS It seems the JEDI website is down. It returns a 500 status for me..

Marcel



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Delphi-JEDI/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/