Click here to Skip to main content
15,918,303 members
Home / Discussions / C#
   

C#

 
QuestionThreading using the ref statement? Wha Happen? Pin
jremignanti27-Oct-03 5:23
jremignanti27-Oct-03 5:23 
AnswerRe: Threading using the ref statement? Wha Happen? Pin
Heath Stewart27-Oct-03 6:35
protectorHeath Stewart27-Oct-03 6:35 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
jremignanti27-Oct-03 8:00
jremignanti27-Oct-03 8:00 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
Heath Stewart27-Oct-03 8:05
protectorHeath Stewart27-Oct-03 8:05 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
jremignanti27-Oct-03 8:28
jremignanti27-Oct-03 8:28 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
Heath Stewart27-Oct-03 8:34
protectorHeath Stewart27-Oct-03 8:34 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
jremignanti27-Oct-03 9:02
jremignanti27-Oct-03 9:02 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
Heath Stewart27-Oct-03 10:08
protectorHeath Stewart27-Oct-03 10:08 
Hmm, it's usually right...but not always the easiest to implement. It would make sense, since ref'ing the first element would return the address of the array, but as you can see...it's not working. Cry | :((

What I was referring to was actually defining the interface yourself and not using the interop assembly that's generated automatically. Especially for small typelibs or for typelibs which you only need a couple of things (like many do for mshtml's typelib), it's just easier defining the interface with the right attributes and method placements (for IUnknown interfaces, order of the methods is important; for IDispatch interfaces, using the DispIdAttribute with the correct ID is important). You can still instantiate the COM object through the interop, or derive a class from AxHost and override the necessary things, also implementing your interface, or using various methods in the Marshal class or Type class, and set the reference to a variable defined as your class interface. Access the methods from the interface (as in all COM you should, anyway).

Still, though, that method signature should be right. When you say jibberish, what exactly do you mean?

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Threading using the ref statement? Wha Happen? Pin
jremignanti27-Oct-03 10:36
jremignanti27-Oct-03 10:36 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
Heath Stewart27-Oct-03 10:43
protectorHeath Stewart27-Oct-03 10:43 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
jremignanti27-Oct-03 10:54
jremignanti27-Oct-03 10:54 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
Heath Stewart27-Oct-03 10:55
protectorHeath Stewart27-Oct-03 10:55 
GeneralRe: Threading using the ref statement? Wha Happen? Pin
jremignanti27-Oct-03 11:17
jremignanti27-Oct-03 11:17 
GeneralAllowDrop Property Problem Pin
Volker Jacobsen27-Oct-03 3:14
Volker Jacobsen27-Oct-03 3:14 
GeneralRe: AllowDrop Property Problem Pin
Heath Stewart27-Oct-03 8:44
protectorHeath Stewart27-Oct-03 8:44 
GeneralRe: AllowDrop Property Problem Pin
Volker Jacobsen27-Oct-03 20:46
Volker Jacobsen27-Oct-03 20:46 
GeneralTwo ImageList and two ImageIndex (and maybe... useful source code for you) Pin
god4k27-Oct-03 1:36
god4k27-Oct-03 1:36 
GeneralRe: Two ImageList and two ImageIndex (and maybe... useful source code for you) Pin
Heath Stewart27-Oct-03 2:37
protectorHeath Stewart27-Oct-03 2:37 
QuestionHow do I catch Windows messages in c#?? Pin
IrishSonic27-Oct-03 0:03
IrishSonic27-Oct-03 0:03 
AnswerRe: How do I catch Windows messages in c#?? Pin
Heath Stewart27-Oct-03 2:13
protectorHeath Stewart27-Oct-03 2:13 
AnswerRe: How do I catch Windows messages in c#?? Pin
oOomen27-Oct-03 4:58
oOomen27-Oct-03 4:58 
GeneralFOCUS Pin
oOomen26-Oct-03 20:27
oOomen26-Oct-03 20:27 
GeneralRe: FOCUS Pin
Heath Stewart27-Oct-03 2:25
protectorHeath Stewart27-Oct-03 2:25 
GeneralRe: FOCUS Pin
oOomen27-Oct-03 5:01
oOomen27-Oct-03 5:01 
GeneralRe: FOCUS Pin
allancto27-Oct-03 18:32
allancto27-Oct-03 18:32 

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.