forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Api Help

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Fri Jul 18, 2003 12:28 pm    Post subject: Api Help Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Jul 18, 2003 12:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Jul 18, 2003 12:43 pm    Post subject: Reply with quote

And after that I'm lost. Maybe someone else can help you. I would like to
learn how to do it too. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Fri Jul 18, 2003 12:52 pm    Post subject: Reply with quote

You may use MSIE's DDE server to obtain such information. Try to have a look at this thread:
http://forum.vdsworld.com/viewtopic.php?t=1222

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Jul 18, 2003 1:37 pm    Post subject: Reply with quote

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
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Jul 18, 2003 1:51 pm    Post subject: Reply with quote

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
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group