Archive for C# / .NET

Dynamically Loading Unmanaged DLLs And Linking Using Reflection

 

My word, what a nerd-geek title ! But what does it mean ? Well, I wanted to load an unmanaged DLL in my C# project and link to its functions at runtime. Thing is, there are a 100+ functions to be linked to and life’s too short to type in the code to link each one in turn – to say nothing of error prone! So, lets see if reflection can come to the rescue.

Read more

Extract Images From PDF Files using iTextSharp

Birmingham library is real hi-tech – free access to microfilm scanners where you can also log on to your Drive / Dropbox / Cloud*.* storage to send the scans. Sweet … except the flaming scanned images get embedded in damn PDF files. How do we get those images back out ?

Read more

Hosting VLC Player in .NET Winforms – Part 4

EVENTS

Previously, in parts 1, 2 and 3, we’ve shown how to get to the stage where you can basically play and pause a media file using VLC, displaying the video on a panel on your own form. However, we need to do more: Read more

Hosting VLC Player in .NET Winforms – Part 3

Building A Player

Previously, in part 2, we covered the basic mechanics of accessing VLCs DLLs and creating the objects we need to make our own media player based on VLC.

If you’ve been reading thus far, you’ll have created three IntPtr handles :

  • A “session handle” to the DLL itself (hDllSession).
  • A media handle for the file we wish to play (lets call it hMedia)
  • A player handle in which to play the media (lets call it hPlayer)

I’m guessing you’ll want to play the media in its own window placed somewhere on a form. So Read more

Hosting VLC Player in .NET Winforms – Part 2

The Building Blocks

Previously, in Part 1, we covered the basic mechanics of accessing the VLC DLLs. Next, we just need to step back and get an overview of what we are going to do with the DLL. Read more