Click here to Skip to main content
15,894,646 members
Home / Discussions / C#
   

C#

 
GeneralRe: Word Automation Pin
Dominic Godin16-Apr-04 5:31
Dominic Godin16-Apr-04 5:31 
GeneralRe: Word Automation Pin
Heath Stewart16-Apr-04 5:49
protectorHeath Stewart16-Apr-04 5:49 
GeneralRe: Word Automation Pin
Dominic Godin19-Apr-04 22:06
Dominic Godin19-Apr-04 22:06 
GeneralRe: Word Automation Pin
Heath Stewart20-Apr-04 3:52
protectorHeath Stewart20-Apr-04 3:52 
GeneralRe: Word Automation Pin
Dominic Godin20-Apr-04 6:55
Dominic Godin20-Apr-04 6:55 
GeneralRe: Word Automation Pin
Heath Stewart20-Apr-04 8:31
protectorHeath Stewart20-Apr-04 8:31 
GeneralRe: Word Automation Pin
Dominic Godin21-Apr-04 1:37
Dominic Godin21-Apr-04 1:37 
GeneralRe: Word Automation Pin
Heath Stewart21-Apr-04 3:18
protectorHeath Stewart21-Apr-04 3:18 
Actually, try removing the out keyword from the last parameter declaration of GetIDsOfNames since an int[] array is already a reference type. The caller (you) must also allocate the array, so try int[] rgDispId = new int[1]; instead of creating an empty array.

This is definitely the right track, though I've never tried using the dispatch interface in managed code like this.

Another way would be to call IDispatch.GetTypeInfo and use the UCOMITypeInfo interface (which is fortunately defined in the FCL so you don't have to declare it) and use it's member methods to basically do the same thing.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Word Automation Pin
Dominic Godin21-Apr-04 4:14
Dominic Godin21-Apr-04 4:14 
GeneralRe: Word Automation Pin
Heath Stewart21-Apr-04 6:22
protectorHeath Stewart21-Apr-04 6:22 
GeneralRe: Word Automation Pin
Dominic Godin21-Apr-04 7:14
Dominic Godin21-Apr-04 7:14 
GeneralRe: Word Automation Pin
Dominic Godin22-Apr-04 0:54
Dominic Godin22-Apr-04 0:54 
GeneralRe: Word Automation Pin
Heath Stewart22-Apr-04 2:37
protectorHeath Stewart22-Apr-04 2:37 
Questionhow to get a list of computers on Local area network Pin
vutrunghieu16-Apr-04 0:55
vutrunghieu16-Apr-04 0:55 
AnswerRe: how to get a list of computers on Local area network Pin
Heath Stewart16-Apr-04 6:12
protectorHeath Stewart16-Apr-04 6:12 
GeneralRe: how to get a list of computers on Local area network Pin
vutrunghieu18-Apr-04 7:17
vutrunghieu18-Apr-04 7:17 
GeneralRe: how to get a list of computers on Local area network Pin
Heath Stewart19-Apr-04 2:13
protectorHeath Stewart19-Apr-04 2:13 
Generalweek numbers Pin
robmays16-Apr-04 0:02
robmays16-Apr-04 0:02 
GeneralRe: week numbers Pin
Stefan Troschuetz16-Apr-04 0:22
Stefan Troschuetz16-Apr-04 0:22 
GeneralRe: week numbers Pin
robmays16-Apr-04 0:25
robmays16-Apr-04 0:25 
GeneralRe: week numbers Pin
Stefan Troschuetz16-Apr-04 1:02
Stefan Troschuetz16-Apr-04 1:02 
GeneralRe: week numbers Pin
Colin Angus Mackay16-Apr-04 2:13
Colin Angus Mackay16-Apr-04 2:13 
GeneralRe: week numbers Pin
robmays16-Apr-04 2:23
robmays16-Apr-04 2:23 
GeneralRe: week numbers Pin
Stefan Troschuetz16-Apr-04 2:45
Stefan Troschuetz16-Apr-04 2:45 
GeneralRe: week numbers Pin
Colin Angus Mackay16-Apr-04 3:05
Colin Angus Mackay16-Apr-04 3:05 

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.