Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

The most complete C# Webbrowser wrapper control

, 28 May 2007
A C# (.NET 2.0) control which creates, hosts, and offers advanced customization such as dragdrop, file downloads, HTTP/S header viewing, and much more.
csexwb.zip
csExWB
COM_Component_Source_Binaries
csDLMan.rgs
csExWBDLMan.def
csExWBDLMan.dev
csExWBDLMan.dsp
csExWBDLMan.dsw
csExWBDLMan.tlb
csExWBDLManps.def
csExWBDLManps.mk
ProtocolCF.inl
ProtocolImpl.inl
AtlAux
Shared
EventFiringAcrosComponents
atlcpimplmt.exe
ReleaseMinDependency
csExWBDLMan.dll
csExWB
csExWB.csproj.user
bin
Release
App.ICO
csExWB.dll
csExWB.pdb
Interop.CSEXWBDLMANLib.dll
Properties
DemoApp
App.ICO
DemoApp.csproj.user
bin
Release
csExWB.dll
csExWB.pdb
DemoApp.exe
DemoApp.pdb
DemoApp.vshost.exe
Interop.CSEXWBDLMANLib.dll
Properties
Settings.settings
Resources
App.ICO
blank.gif
IeToolbar.bmp
// UrlParts.h: interface for the CUrlParts class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_URLPARTS_H__142A1831_D146_4168_B37B_8DEB367FF92D__INCLUDED_)
#define AFX_URLPARTS_H__142A1831_D146_4168_B37B_8DEB367FF92D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <wininet.h>

class CUrlParts  
{
public:
	CUrlParts();
	~CUrlParts();

	bool SplitUrl(BSTR bUrl);

	inline INTERNET_SCHEME GetInternetScheme(void) const { return lnScheme; }
	inline LPCTSTR GetScheme(void) const { return szScheme; }
	inline LPCTSTR GetHostName(void) const { return szHostName; }
	inline LPCTSTR GetUserName(void) const { return szUserName; }
	inline LPCTSTR GetPassword(void) const { return szPassword; }
	inline LPCTSTR GetUrlPath(void) const { return szUrlPath; }
	inline LPCTSTR GetExtraInfo(void) const { return szExtraInfo; }
	inline LPCTSTR GetFileName(void) const { return szFileName; }
	inline LPCTSTR GetFileExtension(void) const { return szFileExtension; }

	BSTR GetFileNameAsBSTR(void) const
	{
		CComBSTR m_str1(L"");
		if(dwFileName > 0)
		{
			m_str1.Empty();
			m_str1 = szFileName;
		}
		return m_str1.Copy();
	}

	BSTR GetFileExtensionAsBSTR(void) const
	{
		CComBSTR m_str1(L"");
		if(dwFileName > 0)
		{
			m_str1.Empty();
			m_str1 = szFileExtension;
		}
		return m_str1.Copy();
	}

	inline DWORD GetSchemeLen(void) { return dwScheme; }
	inline DWORD GetHostNameLen(void) { return dwHostName; }
	inline DWORD GetUserNameLen(void) { return dwUserName; }
	inline DWORD GetPasswordLen(void) { return dwPassword; }
	inline DWORD GetUrlPathLen(void) { return dwUrlPath; }
	inline DWORD GetExtraInfoLen(void) { return dwExtraInfo; }
	inline DWORD GetFileNameLen(void) { return dwFileName; }
	inline DWORD GetFileExtensionLen(void) { return dwFileExtension; }
	inline DWORD GetPort(void) { return dwPort; }
	void ResetBuffers();

private:
	bool Allocated;

	LPTSTR szScheme;
	LPTSTR szHostName;
	LPTSTR szUserName;
	LPTSTR szPassword;
	LPTSTR szUrlPath;
	LPTSTR szExtraInfo;
	LPTSTR szFileName;
	LPTSTR szFileExtension;

	DWORD dwScheme;
	DWORD dwHostName;
	DWORD dwUserName;
	DWORD dwPassword;
	DWORD dwUrlPath;
	DWORD dwExtraInfo;
	DWORD dwFileName;
	DWORD dwFileExtension;
	DWORD dwPort;
	
	INTERNET_SCHEME lnScheme;
	
	
	bool AllocateBuffers(int iNum);
};

#endif // !defined(AFX_URLPARTS_H__142A1831_D146_4168_B37B_8DEB367FF92D__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

mehrcpp

Canada Canada
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 28 May 2007
Article Copyright 2007 by mehrcpp
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid