Click here to Skip to main content
15,914,071 members
Home / Discussions / C#
   

C#

 
AnswerRe: Urgent Help:Removing all EventHandlers Pin
Dave Kreskowiak14-Oct-05 12:19
mveDave Kreskowiak14-Oct-05 12:19 
GeneralRe: Urgent Help:Removing all EventHandlers Pin
Shubhabrata Mohanty14-Oct-05 12:49
Shubhabrata Mohanty14-Oct-05 12:49 
AnswerRe: Urgent Help:Removing all EventHandlers Pin
S. Senthil Kumar14-Oct-05 20:14
S. Senthil Kumar14-Oct-05 20:14 
GeneralRe: Urgent Help:Removing all EventHandlers Pin
Shubhabrata Mohanty14-Oct-05 21:13
Shubhabrata Mohanty14-Oct-05 21:13 
QuestionA problem please help ??? Pin
snouto14-Oct-05 9:59
snouto14-Oct-05 9:59 
AnswerRe: A problem please help ??? Pin
Guffa14-Oct-05 11:59
Guffa14-Oct-05 11:59 
QuestionInvalidCast Exception in Typed Dataset Pin
sameerhanda14-Oct-05 8:09
sameerhanda14-Oct-05 8:09 
AnswerRe: InvalidCast Exception in Typed Dataset Pin
snouto14-Oct-05 10:04
snouto14-Oct-05 10:04 
GeneralRe: InvalidCast Exception in Typed Dataset Pin
sameerhanda14-Oct-05 10:10
sameerhanda14-Oct-05 10:10 
QuestionReposition a Control on Scroll Pin
miah alom14-Oct-05 8:02
miah alom14-Oct-05 8:02 
QuestionBusiness layer, Data Layer and entities Pin
tsramkumar14-Oct-05 6:46
tsramkumar14-Oct-05 6:46 
QuestionUse function of VB.NET in C# Pin
rockxuyenmandem14-Oct-05 6:36
rockxuyenmandem14-Oct-05 6:36 
AnswerRe: Use function of VB.NET in C# Pin
Russell Jones14-Oct-05 6:50
Russell Jones14-Oct-05 6:50 
GeneralRe: Use function of VB.NET in C# Pin
miah alom14-Oct-05 7:58
miah alom14-Oct-05 7:58 
GeneralRe: Use function of VB.NET in C# Pin
mav.northwind14-Oct-05 8:51
mav.northwind14-Oct-05 8:51 
QuestionMSMQ Trigger Parameters Pin
Russell Jones14-Oct-05 6:18
Russell Jones14-Oct-05 6:18 
QuestionInternet Explorer Extension (COM) Pin
Milos Stojanovic14-Oct-05 5:44
Milos Stojanovic14-Oct-05 5:44 
Hello,
I need to create a IE Extension in C#. I want to add a button to IE standard toolbar and then make IE call the DLL when button is clicked.
I have started with the following code
<br />
	[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Unicode)]<br />
	public struct OLECMDTEXT<br />
	{<br />
		public uint cmdtextf;<br />
		public uint cwActual;<br />
		public uint cwBuf;<br />
		[MarshalAs(UnmanagedType.ByValTStr,SizeConst=100)]public char rgwz;<br />
	}<br />
	[StructLayout(LayoutKind.Sequential)]<br />
	public struct OLECMD<br />
	{<br />
		public uint cmdID;<br />
		public uint cmdf;<br />
	}<br />
	[ComImport,<br />
	InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]<br />
	public interface IOleCommandTarget<br />
	{<br />
		void QueryStatus(ref Guid pguidCmdGroup, UInt32 cCmds,<br />
			[MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] <br />
			OLECMD[] prgCmds, ref OLECMDTEXT CmdText);<br />
		void Exec(ref Guid pguidCmdGroup, uint nCmdId, uint nCmdExecOpt, <br />
			ref object pvaIn, ref object pvaOut);<br />
	}<br />
	[ClassInterface(ClassInterfaceType.None),<br />
	ComSourceInterfaces(typeof(COM_Events))]<br />
	public class COMAddin: IOleCommandTarget<br />
	{<br />
		// ....<br />
		public void QueryStatus(ref Guid pguidCmdGroup, <br />
				UInt32 cCmds, OLECMD[] prgCmds, ref OLECMDTEXT CmdText)<br />
		{<br />
			// ....<br />
		}<br />
		public void Exec(ref Guid pguidCmdGroup, uint nCmdId, <br />
				uint nCmdExecOpt, ref object pvaIn, ref object pvaOut)<br />
		{<br />
			// .... I would add here OnClick actions<br />
		}<br />
	}

But I don't know what to do next.
I know that I have to add a key in HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions.

And I have to somehow register the COM DLL (regasm?), and create some GUIDs. I don't know where to put those GUIDs, in which class, should I do it over attributes or over assembly... This is a managed DLL, all articles that I find on the net are related to plain native C++. And I need to get the IE Document data somehow (IHTMLDocument2 or something?), but that is not primary here.
Can anyone point me to a good article for this, or help me directly?

Thank you in advance,
Milos
QuestionScroll Panel control when mouse is dragged near the edge Pin
Gulfraz Khan14-Oct-05 4:28
Gulfraz Khan14-Oct-05 4:28 
AnswerRe: Scroll Panel control when mouse is dragged near the edge Pin
Dan Neely14-Oct-05 5:12
Dan Neely14-Oct-05 5:12 
QuestionFileSystemWatcher problem Pin
Dan Neely14-Oct-05 3:39
Dan Neely14-Oct-05 3:39 
AnswerRe: FileSystemWatcher problem Pin
Dave Kreskowiak14-Oct-05 4:39
mveDave Kreskowiak14-Oct-05 4:39 
GeneralRe: FileSystemWatcher problem Pin
Dan Neely14-Oct-05 5:06
Dan Neely14-Oct-05 5:06 
QuestionMESSAGEBOX TAB Pin
Greeky14-Oct-05 0:32
Greeky14-Oct-05 0:32 
AnswerRe: MESSAGEBOX TAB Pin
Stefan Troschuetz14-Oct-05 1:53
Stefan Troschuetz14-Oct-05 1:53 
AnswerRe: MESSAGEBOX TAB Pin
albCode14-Oct-05 21:00
albCode14-Oct-05 21:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.