Click here to Skip to main content
15,897,315 members
Home / Discussions / C#
   

C#

 
GeneralRe: Newbie...DLL/Friend Pin
Alvaro Mendez21-Apr-03 6:46
Alvaro Mendez21-Apr-03 6:46 
GeneralHELP! Making getexternal a usable object!!! Pin
LongRange.Shooter21-Apr-03 3:59
LongRange.Shooter21-Apr-03 3:59 
GeneralRe: HELP! Making getexternal a usable object!!! Pin
Stephane Rodriguez.21-Apr-03 8:03
Stephane Rodriguez.21-Apr-03 8:03 
GeneralRe: HELP! Making getexternal a usable object!!! Pin
LongRange.Shooter21-Apr-03 8:37
LongRange.Shooter21-Apr-03 8:37 
GeneralRe: HELP! Making getexternal a usable object!!! Pin
Stephane Rodriguez.21-Apr-03 10:01
Stephane Rodriguez.21-Apr-03 10:01 
GeneralRe: HELP! Making getexternal a usable object!!! Pin
LongRange.Shooter22-Apr-03 3:31
LongRange.Shooter22-Apr-03 3:31 
GeneralRe: HELP! Making getexternal a usable object!!! Pin
Stephane Rodriguez.22-Apr-03 4:43
Stephane Rodriguez.22-Apr-03 4:43 
GeneralRe: HELP! Making getexternal a usable object!!! Pin
LongRange.Shooter22-Apr-03 7:41
LongRange.Shooter22-Apr-03 7:41 
Actually, I am beginning to put together an article as well as a sample application. I have had no raw COM development experience -- this was the first time for me. So it has taken me longer to understand all this stuff.

Now here is one more question to you!
I have a need for the exposed method to populate a property sheet in my fat client. Much more complex than a stand-alone class that throws a message box. I built the sample app to do this:
It has rows of buttons corresponding to product pictures.
Click on the button and it calls my client. The client populates the form.

The example is a fun, twinky deployment to test my more difficult property object setting.
So instead of defining a separate class implementation of my interface
ppDispatch = new ClassInstance();
I am doing an implementation in my code.
ppDispatch = this;

So I have my interface:
<br />
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]<br />
public interface IPopulateWindow<br />
{<br />
	void PopulateWindow(string item);<br />
}<br />


and I'm setting ICustomDoc.SetUIHandler in my constructor logic and inside my code I have the interface implemented:

<br />
void IPopulateWindow.PopulateWindow(string itemSelected)<br />
{<br />
switch (itemSelected)<br />
{<br />
<snip> populate form based on value of selected item </snip><br />
}<br />
this.Invalidate();<br />
throw new COMException("", 0);<br />
}<br />


Now --- I am getting the window.external object populated. That is good.
But --- IDispatch is not exposing the PopulateWindow method.
(Object does not support this property or method)
Is there something else I have to implement in my form class to have IDispatch properly see my method? Do I have to mark my implemenation as
[ComVisible(true)]
for instance?

_____________________________________________
The world is a dangerous place.
Not because of those that do evil,
    but because of those who look on and do nothing.

GeneralRe: HELP! Making getexternal a usable object!!! Pin
LongRange.Shooter22-Apr-03 8:11
LongRange.Shooter22-Apr-03 8:11 
GeneralObjects' Binary Representation Pin
fesenjoon21-Apr-03 3:30
fesenjoon21-Apr-03 3:30 
GeneralRe: Objects' Binary Representation Pin
Stephane Rodriguez.21-Apr-03 7:42
Stephane Rodriguez.21-Apr-03 7:42 
GeneralMicrosoft's ShellCmd sample freezes windows Pin
2sky21-Apr-03 2:45
2sky21-Apr-03 2:45 
GeneralRe: Microsoft's ShellCmd sample freezes windows Pin
Stephane Rodriguez.21-Apr-03 5:33
Stephane Rodriguez.21-Apr-03 5:33 
GeneralRe: Microsoft's ShellCmd sample freezes windows Pin
2sky21-Apr-03 11:57
2sky21-Apr-03 11:57 
GeneralGetting properties into Property grid (at runtime) Pin
peterchen20-Apr-03 22:05
peterchen20-Apr-03 22:05 
GeneralRe: Getting properties into Property grid Pin
Stephane Rodriguez.20-Apr-03 22:46
Stephane Rodriguez.20-Apr-03 22:46 
GeneralRe: Getting properties into Property grid Pin
peterchen20-Apr-03 22:52
peterchen20-Apr-03 22:52 
GeneralCreating a struct with an fixed array Pin
Mikaelr20-Apr-03 20:51
Mikaelr20-Apr-03 20:51 
GeneralRe: Creating a struct with an fixed array Pin
Stephane Rodriguez.20-Apr-03 22:58
Stephane Rodriguez.20-Apr-03 22:58 
GeneralRe: Creating a struct with an fixed array Pin
Mikaelr21-Apr-03 4:12
Mikaelr21-Apr-03 4:12 
GeneralRe: Creating a struct with an fixed array Pin
Stephane Rodriguez.21-Apr-03 5:26
Stephane Rodriguez.21-Apr-03 5:26 
QuestionIs System.Uri broken? Pin
Arun Bhalla20-Apr-03 17:54
Arun Bhalla20-Apr-03 17:54 
AnswerRe: Is System.Uri broken? Pin
Stephane Rodriguez.20-Apr-03 21:58
Stephane Rodriguez.20-Apr-03 21:58 
GeneralTooltip question Pin
Jasper4C#20-Apr-03 14:42
Jasper4C#20-Apr-03 14:42 
GeneralRe: Tooltip question Pin
Stephane Rodriguez.20-Apr-03 23:21
Stephane Rodriguez.20-Apr-03 23:21 

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.