Click here to Skip to main content
15,888,579 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: DirectShow .NET HELP!!! Pin
J. Dunlap17-Jul-03 8:41
J. Dunlap17-Jul-03 8:41 
GeneralRe: DirectShow .NET HELP!!! Pin
Brian JR17-Jul-03 8:57
Brian JR17-Jul-03 8:57 
GeneralRe: DirectShow .NET HELP!!! Pin
J. Dunlap17-Jul-03 11:50
J. Dunlap17-Jul-03 11:50 
GeneralRe: DirectShow .NET HELP!!! Pin
Heath Stewart16-Jul-03 4:56
protectorHeath Stewart16-Jul-03 4:56 
GeneralRe: DirectShow .NET HELP!!! Pin
Brian JR16-Jul-03 9:10
Brian JR16-Jul-03 9:10 
GeneralRe: DirectShow .NET HELP!!! Pin
Heath Stewart16-Jul-03 9:21
protectorHeath Stewart16-Jul-03 9:21 
GeneralRe: DirectShow .NET HELP!!! Pin
Brian JR16-Jul-03 15:40
Brian JR16-Jul-03 15:40 
GeneralRe: DirectShow .NET HELP!!! Pin
Heath Stewart17-Jul-03 1:21
protectorHeath Stewart17-Jul-03 1:21 
The best thing I can tell you to do is reprioritize your learning. I, too, am self taught, dating back to the early 80's, and much of it was spent reading stuff on gopher and then the Web (I've never personally been a big fan of books, but most people swear by them). So, read first, then do trial and error. Most people don't even bother to read and end-up relying on IntelliSense (or the like) and using the few classes they know over and over, or reinventing the wheel. The .NET base class library is full of useful classes and knowing at least most of them is important to knowing what you should use and when. Knowing how to read IL (that which all ".NET languages" compile down to, so don't worry about the source language when people state it what a library, for example, is written in) is also handy, but there are several tools like .NET Reflector[^] that let you see how things work. This can also be extremely handy and gives you ideas on how to design your projects to be flexible by being modular and supporting all the right interfaces so they can be used in anything (this practice is what I value above any coding practice, but that's of a personal nature).

So, the best thing I can do is to tell you to read about Interop[^] in .NET. This gives some great explanations about how the CLR (that which JITs and executes IL - not a specific language like C#, VB.NET, etc) creates CCWs and RCWs for COM and the Runtime to call. There's even some pretty good diagrams.

Basically, though, the difference between C++ wrappers and COM interop are the following points:

  • C++ wrappers you actually have to write and compile into a separate DLL.
  • IF you use P/Invoke, you're often left with marshaling problems and having to practically recreate most of the Win32 API that you're going to use.
  • COM interop uses existing typelibs (contains type information about COM objects written in a DLL, OCX, etc.) and creates an assembly that contains all that information.
  • The COM interop assemblies allow you to get COM type information, where as with C++ wrappers you only get type information about the C++ wrapper itself, and not the underlying code.
  • COM interop assemblies can be created as easily as running tlbimp.exe with a couple parameters, or simply including a reference to a COM typelib in your project in VS.NET.

There are many other great uses for COM interop, but the important thing to remember (what most people forget, and what Microsoft doesn't even bring-up in documentation) is that you should still follow COM practices when create .NET classes that will be exposed to COM. That is, don't use auto-generated class interfaces of any kind - make your own so you have complete control over what's included and in what order in the VTABLE (and with what DISPIDs), and never change an interface once you've released your code - make a new interface with a version identifier (just like you should in COM) and implement that interface as the new primary class interface (again, just like in COM).

I hope that gives you some pointers. Just make sure you put research first and know your environment - both the Framework and knowing how to get the most out of your IDE or SDK tools (being able to use the SDK tools without an IDE is also important, I believe).

 

Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN

GeneralRe: DirectShow .NET HELP!!! Pin
Brian JR17-Jul-03 8:49
Brian JR17-Jul-03 8:49 
GeneralRe: DirectShow .NET HELP!!! Pin
Heath Stewart17-Jul-03 8:51
protectorHeath Stewart17-Jul-03 8:51 
GeneralRe: DirectShow .NET HELP!!! Pin
Brian JR16-Jul-03 15:46
Brian JR16-Jul-03 15:46 
GeneralRe: DirectShow .NET HELP!!! Pin
drpepper5-Aug-03 5:09
drpepper5-Aug-03 5:09 
Generaldot.net application error Pin
misiek14-Jul-03 7:11
misiek14-Jul-03 7:11 
GeneralRe: dot.net application error Pin
Russell Morris14-Jul-03 8:17
Russell Morris14-Jul-03 8:17 
GeneralRe: dot.net application error Pin
misiek14-Jul-03 21:09
misiek14-Jul-03 21:09 
GeneralRe: dot.net application error Pin
Heath Stewart15-Jul-03 8:55
protectorHeath Stewart15-Jul-03 8:55 
Generalnext dot.net application error Pin
misiek16-Jul-03 6:20
misiek16-Jul-03 6:20 
GeneralGarbage Collection in DotNet Pin
dskumar9914-Jul-03 4:24
dskumar9914-Jul-03 4:24 
GeneralRe: Garbage Collection in DotNet Pin
Philip Fitzsimons15-Jul-03 2:32
Philip Fitzsimons15-Jul-03 2:32 
GeneralRe: Garbage Collection in DotNet Pin
Heath Stewart15-Jul-03 8:58
protectorHeath Stewart15-Jul-03 8:58 
GeneralSocket Problems on particular machine Pin
stonee7413-Jul-03 5:43
stonee7413-Jul-03 5:43 
GeneralRe: Socket Problems on particular machine Pin
stonee7428-Jul-03 4:49
stonee7428-Jul-03 4:49 
GeneralAnother "Interop" question. Pin
igor196012-Jul-03 12:46
igor196012-Jul-03 12:46 
GeneralRe: Another "Interop" question. Pin
igor196012-Jul-03 15:23
igor196012-Jul-03 15:23 
GeneralRe: Another "Interop" question. Pin
Mike Dimmick13-Jul-03 1:16
Mike Dimmick13-Jul-03 1:16 

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.