Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# WeakClone and DeepClone Pin
BillWoodruff29-Jul-17 17:55
professionalBillWoodruff29-Jul-17 17:55 
QuestionIntermittent AccessViolationException with richtextbox Pin
shrishjain27-Jul-17 20:28
shrishjain27-Jul-17 20:28 
QuestionRe: Intermittent AccessViolationException with richtextbox Pin
Jochen Arndt27-Jul-17 23:01
professionalJochen Arndt27-Jul-17 23:01 
QuestionGet host name from different segment of LAN Pin
w1424327-Jul-17 17:39
w1424327-Jul-17 17:39 
AnswerRe: Get host name from different segment of LAN Pin
Jochen Arndt27-Jul-17 22:04
professionalJochen Arndt27-Jul-17 22:04 
AnswerRe: Get host name from different segment of LAN Pin
Nathan Minier28-Jul-17 1:19
professionalNathan Minier28-Jul-17 1:19 
AnswerRe: Get host name from different segment of LAN Pin
Member 1333447128-Jul-17 8:42
Member 1333447128-Jul-17 8:42 
QuestionCOM and C#.net Interoperability Pin
Vijjuuu.26-Jul-17 8:59
Vijjuuu.26-Jul-17 8:59 
Hi all,

i am trying to expose C# object to COM and in this process i got a query and not sure how to progress further. so here i am seeking for help.

i want to define a interface in C# in such a way the consumer of the COM object should be able to use the method in the following way.

comObject.methodName(123)

the above statement will return a value, assume where 123 is the parameter which could id or some thing like that

comObject.methodName(123) = 100

the above statement should set the value 100 something internal member having id 123

in both the above statement the methodName is the same.

so the question is how can we define an interface in C# that can be exposed to COM using regasm.exe.

i know it is possible to define such a way in C++ using ATL but not sure how can i achieve the same in C#.

[Comvisible(true)]
interface ExposeToCom
{
// don't know what all to add to make the method appear to COM to be get and set
int methodName(int);

}

Thanks for your help,
AnswerRe: COM and C#.net Interoperability Pin
Richard MacCutchan26-Jul-17 10:05
mveRichard MacCutchan26-Jul-17 10:05 
AnswerRe: COM and C#.net Interoperability Pin
Bernhard Hiller26-Jul-17 22:05
Bernhard Hiller26-Jul-17 22:05 
GeneralRe: COM and C#.net Interoperability Pin
Vijjuuu.27-Jul-17 7:27
Vijjuuu.27-Jul-17 7:27 
GeneralRe: COM and C#.net Interoperability Pin
Pete O'Hanlon27-Jul-17 20:46
mvePete O'Hanlon27-Jul-17 20:46 
AnswerRe: COM and C#.net Interoperability Pin
BenScharbach12-Aug-17 10:21
BenScharbach12-Aug-17 10:21 
QuestionIssue with the below code Pin
Paul McGann25-Jul-17 22:44
professionalPaul McGann25-Jul-17 22:44 
AnswerRe: Issue with the below code Pin
F-ES Sitecore25-Jul-17 23:00
professionalF-ES Sitecore25-Jul-17 23:00 
GeneralRe: Issue with the below code Pin
Paul McGann26-Jul-17 3:14
professionalPaul McGann26-Jul-17 3:14 
AnswerRe: Issue with the below code Pin
Nathan Minier26-Jul-17 1:23
professionalNathan Minier26-Jul-17 1:23 
GeneralRe: Issue with the below code Pin
Paul McGann26-Jul-17 3:14
professionalPaul McGann26-Jul-17 3:14 
AnswerRe: Issue with the below code Pin
BillWoodruff26-Jul-17 4:00
professionalBillWoodruff26-Jul-17 4:00 
GeneralRe: Issue with the below code Pin
Paul McGann26-Jul-17 10:34
professionalPaul McGann26-Jul-17 10:34 
AnswerRe: Issue with the below code Pin
Ravi Bhavnani28-Jul-17 8:00
professionalRavi Bhavnani28-Jul-17 8:00 
AnswerRe: Issue with the below code Pin
BenScharbach12-Aug-17 9:42
BenScharbach12-Aug-17 9:42 
QuestionCreate an API in winform Pin
JohnPL25-Jul-17 18:56
JohnPL25-Jul-17 18:56 
QuestionRe: Create an API in winform Pin
Richard MacCutchan25-Jul-17 20:39
mveRichard MacCutchan25-Jul-17 20:39 
AnswerRe: Create an API in winform Pin
Bernhard Hiller25-Jul-17 20:42
Bernhard Hiller25-Jul-17 20:42 

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.