| View previous topic :: View next topic |
| Author |
Message |
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Fri Jul 18, 2003 12:28 pm Post subject: Api Help |
|
|
Could this help retrieve the current URL in the address bar of IE ?
VB:
Private Declare Sub GetClassURL Lib "URLMON.dll" (ByVal szURL As String, ByRef pclsid As Long)
C:
[DllImport("URLMON.dll")]
static extern void GetClassURL (string szURL, int32 pclsid);
Delphi:
procedure GetClassURL (szURL : PChar, pclsid : Integer)
And how would you code it in VDS ? |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Jul 18, 2003 12:41 pm Post subject: |
|
|
I don't really know what I'm doing but here's what I have so far:
| Code: | LOADLIB URLMON.DLL
%u = @lib(urlmon,GetClassURL,INT:)
FREELIB URLMON.DLL
info %U
# procedure GetClassURL (szURL : PChar, pclsid : Integer) |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Jul 18, 2003 12:43 pm Post subject: |
|
|
And after that I'm lost. Maybe someone else can help you. I would like to
learn how to do it too.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Fri Jul 18, 2003 1:37 pm Post subject: |
|
|
GetClassURL is still a beta and as per msdn online still not implemented
U can use DDE as Dr. Dread said if U want to get URL.
But if u want the CLSID of the object pointed to by the URL U should go for this API.
I may have a look into it. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Fri Jul 18, 2003 1:51 pm Post subject: |
|
|
Some more info on use of this API:
-------------------------------------------
BTW I think it amy be better that this be in API section of developers forum. Sorry if i am wrong
Retrieves the CLSID associated with the specific resource.
HRESULT RevokeFormatEnumerator( LPCWSTR szURL //The display name to be parsed.
CLSID * pclsid //Points to the retrieved CLSID
);
Parameters
szURL
[in] The display name to be parsed.
pbsc
[in] On successful return, points to the CLSID associated with the object indicated by the display name supplied in szURL.
Return Values
S_OK
Success.
MK_E_CANTOPENFILE
Indicates inability to attach to the specified resource.
Remarks
GetClassURL attempts to determine the CLSID of the resource using the following steps:
1. In the case of HTTP, the initial HTTP response packet header may contain the CLSID of the actual (Get) or referred to (Head) resource as an extension-header to the Entity Header section of the Full-Response message of the form:
CLSID = "CLSID" ": " stringized-clsid
where stringized-clsid can be created using StringFromCLSID and interpreted using CLSIDFromString. New HTTP servers can support this functionality readily.
2. URL Moniker examines the media type of the data. If the media type is "application/x-oleobject" the first 16-bytes of the actual data (Content-Body) contain the CLSID of the resource and subsequent data is to be interpreted by the class itself. For all other media types, URL Moniker looks in the system registry for the HKEY_CLASSES_ROOT\MIME\Database\Content-Type\\CLSID key.
3. URL Moniker matches portions of arriving data to patterns registered in the system registry under HKEY_CLASSES_ROOT\FileTypes.
4. Finally, URL Moniker correlates the trailing extension of the resource, if any, to a CLSID using the HKEY_CLASSES_ROOT\.??? keys in the system registry, as is done by GetClassFile and the shell.
See Also GetClassFile _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
|