0

It's my first post, so if I’m posting wrong or something, please let me know!

I'm developing an application in C# where I have to stream picture and sound from an IP Camera.

I have found a SDK from the manufacturer of the IP camera which should make it possible to integrate the streaming process into an application.

The IP camera is a LevelOne FCS-0010, and the SDK contains an .OCX file, an .INF file and a PDF file, which describes the different configuration parameters for the .INF file.

And here's my question: how do I use the OCX file in my application?

According to some forums, the OCX can just be drag 'n dropped into the toolbar in VS and then drag 'n dropped onto a WinForms form. This actually goes pretty well!

But then I just get a clean ActiveX object into my application, nearly just blank. Probably the OCX component needs to be configured, but how?

I guess I have to use the -INF file in some way in my application, so the OCX component could be configured. However, I really can’t figure out how.

Olivier Jacot-Descombes
  • 104,806
  • 13
  • 138
  • 188
  • Does it look any different when you run the program as compared to design-time? – Kirk Woll Apr 08 '12 at 17:56
  • Where did you get this OCX from? I downloaded one at global.level1.com, but I cannot drag 'n drop it to VS. – Olivier Jacot-Descombes Apr 08 '12 at 18:16
  • Finally I could place the viewer control on a form; however its object model does not expose useful things. Probably it uses late binding and thus intellisense does not expose its interface. Without a programming manual it will not be possible to program it. – Olivier Jacot-Descombes Apr 08 '12 at 19:25
  • Kirk Woll: No it doesn't, just the same.. It has to be configured in some Way i Think.. – Daniel Knudsen Apr 09 '12 at 08:41
  • Olivier Jacot-Descombes: it sounds like your at the same situation like me now, as you say it does not Expose usefull things :( .. But if it is possible to drag 'n drop it with succes, i also Think it is possible to configure it so it is usefull.. We have to find put how :) – Daniel Knudsen Apr 09 '12 at 08:43

1 Answers1

2

It has to be registered first, use the vendor's recommended install procedure. Then you need to generate a AxHost wrapper for control, that allows it to be placed on a Winforms form or a WPF ElementHost.

Two ways to do that. Right-click the toolbox, Choose Items, COM tab and pick the control from the list. Which might be hard to do or not work at all if you don't know the name of the control. Second way is to run the Visual Studio Command Prompt and type aximp foo.ocx. That produces an AxFoo.Interop.dll, you can put it on the toolbox through Choose Items, Browse tab.

Not every ActiveX control is compatible with .NET, window-less controls are not supported.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Hey Hans Passant! Thx for your input.. The vendor doesn't pack it with a "how to" in any ways, they only let the .ocx and .inf file be avalible.. So i dont know the recommended installation procedure... - you say i have to generate a AxHost wrapper control, but isn't it the same if i just drag 'n drop it, which goes fine? Or Will the Way you Describe it by using the AxHost wrapper, include the configuration params in the .inf file? – Daniel Knudsen Apr 09 '12 at 09:09