Re: DLL of ActiveX GUID
- From: "Chris.Cheney" <Chris.CheneyXXNOSPAMXX@xxxxxxxxx>
- Date: Fri, 21 Sep 2007 09:00:35 GMT
"alanglloyd@xxxxxxx" <alanglloyd@xxxxxxx> wrote in
news:1190363313.939538.69010@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
On 21 Sep, 01:04, Jamie
<jamie_ka1lpa_not_valid_after_ka1l...@xxxxxxxxxxx> wrote:
alangll...@xxxxxxx wrote:Jamie
Is there an easy function or API to get the FilePathName of a DLL
which implements the referenced GUID. Or does one have to do the
tedious access of the registry CLSIDs.
GetFullPathName
Is that what you're looking for?
Not sure if that will do what you need.
Not really. GetFullPathName adds the current folder path to the
specified filename.
I have the GUID of a registered dll (ActiveX / OLE). I want to get the
fullpathname of the dll implementing that GUID. It's held in the
default value of the registry key of HKCR \ CLSID \ <that GUID> \
InprocServer32.
I just hoped that there was an API or Delphi cal which saved me
messing about with registry access.
No way round it that I know of. But it's really not too bad if you use
the MS API:
function GetDllName(GuidStr: String): String;
var
Key: HKey;
DataLen: Integer;
begin
case RegOpenKeyEx(HKEY_CLASSES_ROOT, PChar(Format('CLSID\%s
\InProcServer32', [GuidStr])), 0, KEY_READ, Key) of
ERROR_SUCCESS:
try
DataLen := 0;
case RegQueryValueEx(Key, nil, nil, nil, nil, @DataLen) of
ERROR_SUCCESS:
begin
SetLength(Result, DataLen - 1);
case RegQueryValueEx(Key, nil, nil, nil, PByte(PChar(Result)),
@DataLen) of
ERROR_SUCCESS: ;
else
Result := '';
end;
end;
else
Result := '';
end;
finally
RegCloseKey(Key);
end;
else
Result := '';
end;
end;
.
- Follow-Ups:
- Re: DLL of ActiveX GUID
- From: alanglloyd@xxxxxxx
- Re: DLL of ActiveX GUID
- References:
- DLL of ActiveX GUID
- From: alanglloyd@xxxxxxx
- Re: DLL of ActiveX GUID
- From: Jamie
- Re: DLL of ActiveX GUID
- From: alanglloyd@xxxxxxx
- DLL of ActiveX GUID
- Prev by Date: Re: DLL of ActiveX GUID
- Next by Date: Re: DLL of ActiveX GUID
- Previous by thread: Re: DLL of ActiveX GUID
- Next by thread: Re: DLL of ActiveX GUID
- Index(es):