Posted By: adrian.h | Sep 4th, 2008 @ 7:28 AM
page 1 of 2
Comments: 27 | Views: 639
adrian.h
adrian.h
Would rather be camping or climbing!
Ok, so I'm able to export a bunch of interface functions (way more than I want, but I'll live with it for now till someone can tell me some less crazy way of hiding them).

My question now is how do I create events like in COM/AX?

Thanks
The words look like English, but I don't understand them.  I felt that way with your first post as well.

What in the heck is an "interface function"?  What do you mean by "export" and "hide"?

What do you mean by "events like in COM/AX"?  Do you just need an event concept (.NET provides this through delegates and events), or do you need to interop with COM?

No offense, but it sounds like you need to read a beginning C# book.
jh71283
jh71283
Throw new System.Beverage. OutOfCoffeeException​()
Come on wkempf!

you must know about exporting the bunch of interface functions!

it's the old method of parameterizing the subroutine delegate whilst marshalling to the left.


Sorry... this .Net keyword tourettes must be infectious.
That's my problem!  I marshal to the right!
jh71283
jh71283
Throw new System.Beverage. OutOfCoffeeException​()
OK cool.

It just seems that your approach to .net was that it's poorly designed and so on just because it is not the same as you are used to, which thousands of developers would disagree with.

Oh, and in the context of computers, it's program.  
Sorry.  Didn't mean to offend you, and I wasn't questioning your knowledge, skills or abilities.  I just totally didn't understand your questions.  I was especially confused by the first one, about "hiding" interface functions.  It seems like the easy answer is to instruct you to declare them "private", but then the way you described things left me wondering if that was really what you meant.  You used a lot of programming terms in ways I've never seen them used. Smiley
jh71283
jh71283
Throw new System.Beverage. OutOfCoffeeException​()
I don't want to be pedantic, but you're wrong Smiley

Americans use program regardless of context.

In the UK, you program a computer, but you watch a television programme.


Anyways, I meant no malice earlier in my post, just a light hearted poke.

Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...
No .NET is a fairly well designed library.  I should have included that I was trying to understand to how to use C# in making .NET assemblies, but it looks like it was assumed anyway.

You've lost me again. There is no way to use C# for anything other than making .Net assemblies, so what exactly is special about what you're trying to do?
littleguru
littleguru
<3 Seattle
Yeah... I'm confused too. This thread doesn't make any sense to me... first something about COM/AX (??) is asked and then a random switch over to C# not creating .NET assemblies happens.

/me is lost.
jh71283
jh71283
Throw new System.Beverage. OutOfCoffeeException​()
ok corona Smiley
See... you keep using technical terms, but don't quite seem to know the real definition.

An "application" written to run on the CLR is an assembly.  Assembly != DLL.  An assembly can be either an EXE or a DLL.

Now, I have no CLUE what you mean by "explicit" and "implicit" assemblies, much less "internal" (and presumably that means "external" variants as well).
Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...
Applications are also assemblies in .Net. Everything that comes out of the C# compiler is an assembly. What I expect you're talking about are class libraries, which are also assemblies.

There is also no such thing as "internal" or "external" assemblies, much less "implicit" or "explicit".

I don't mean to sound rude, but it seems as if you haven't really gotten the basics of the .Net Framework down. I would suggest getting a book before trying to ask more specific questions.
Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...
What you are referring to is a class library. In .Net, the term assembly means something else.

It means:
A collection of one or more files that are versioned and deployed as a unit. An assembly is the primary building block of a .NET Framework application. All managed types and resources are contained within an assembly and are marked either as accessible only within the assembly or as accessible from code in other assemblies. Assemblies also play a key role in security. The code access security system uses information about the assembly to determine the set of permissions that code in the assembly is granted. See also: private assembly, shared assembly.

A class libary is one type of assembly, which typically has the extension DLL. An application is another type of assembly, typically with the extension EXE (note that while an assembly can consist of more than one file, this is not common). And you can reference an application and use its public types in another application, but I would not recommend you do so (Visual Studio won't let you do it anyway, but you can do it using the command line compiler).

And here's a glossary: http://msdn.microsoft.com/en-us/library/6c701b8w.aspx

I also strongly recommend you read this thoroughly: http://msdn.microsoft.com/en-us/library/a4t23ktk.aspx
No, I did not say that.  Again Assembly != DLL or LIB or "library".

"To me, an assembly is just a library"?  We're talking about technical terms.  It can't mean one thing to you and another to me or anyone else.  That's why people are having problems helping you.  You use a LOT of terms that are technical, or at least technical sounding, but the context in which you use them don't make any sense to those who know enough to help you.

Even in this post, you confuse things badly.  A Stack and a Queue are classes, not libraries.  And all this "implicit" and "sub-assembly" stuff makes no sense.

Let me try and define at least some of the terms you're using.

An assembly is a binary file produced for the CLR.  There are two types of assemblies.  Applications (EXE) and libraries (DLL).

.NET doesn't use static libraries (LIB).

A library (DLL) used by an application (EXE) in .NET is a reference assembly, not a "sub-assembly" or "implicit assembly".  It's "external" in the sense that the two files are not combined, as is done with static libraries (LIB) in some other languages.

A class is a type definition, including implementation.  An interface is just a type definition with out an implementation.  In .NET classes use single inheritance, but may implement multiple interfaces.  This is all very much in line with other languages and technologies, including COM.  Which is another reason why your posts have been so confusing.
littleguru
littleguru
<3 Seattle
Read them all - they target all different aspects of what you want to know. You should really get familiar with the terms in .NET to make yourself clearer. Also try to first remove everything that you have in mind about COM/AX/... before you start with reading the books and see everything that comes up as a new idea instead of trying to compare. That makes it much easier to learn Smiley
figuerres
figuerres
???
Amen, as LG says try to start with just .Net; forget all about Com and ActiveX at first.

yes there are simmilaritys, yes .net does some things that relate  to the older tech.

BUT  .Net was built *NOT* as the "Next version of COM/AX" but rather as A new way to do things that has a better foundation.

for example some of the things you have posted about what you see if you expose a .net class to COM has to do with the very key differences between them.

COM and AX "interfaces" are based on a Non OO tech.  Yes it was extended to try and support OO but it's not OO at the core.

.Net is built on OO from the core.

.net has COM interop as a "Bridge"  but that bridge is not meant to allow every possible thing to be done, it is very capable but due to the very fundamental differences between the two models you will not get 100% transaltions between them w/o some manual work on the details.

evildictaitor
evildictaitor
if( !succeed( try() ) ) { while(true) try(); }
++

If you're going to start programming in C#, avoid ActiveX and COM like the plague. Absolutely anything and everything that you can possibly want done can be done without AX/COM, and the only reason for using them is that you have some legacy (or external) ActiveX or COM objects that you need to import and couldn't possible re-invent.
page 1 of 2
Comments: 27 | Views: 639
Microsoft Communities