Showing posts with label tip. Show all posts
Showing posts with label tip. Show all posts

Friday, September 20, 2013

Generate Lib From DLL

Introduction
To avoid installing and fighting against MSYS and Cygwin, you can just extract exported symbols from libvlc.dll to generate a .lib (libvlc.lib) and link your program against it.

Open Visual Studio Command Prompt
It can be found within the Visual Studio Tools menu entry:
Start / Program Files / Microsoft Visual Studio / Visual Studio Tools / Visual Studio Command Prompt.

Extract Symbols
Within the command prompt type:
dumpbin /exports "C:\Program Files\VideoLAN\VLC\libvlc.dll" > "C:\Program Files\VideoLAN\VLC\libvlc.def"
Edit the libvlc.def file and modify it to get something like this:
EXPORTS
libvlc_add_intf
libvlc_audio_get_channel
libvlc_audio_get_mute
libvlc_audio_get_track
libvlc_audio_get_track_count
libvlc_audio_get_track_description
libvlc_audio_get_volume
...
Generate the .lib
Still within the command prompt type:
lib /def:"C:\Program Files\VideoLAN\VLC\libvlc.def" /out:"C:\Program Files\VideoLAN\VLC\libvlc.lib" /machine:x86
Of course, you'll need to adapt the path according to your configuration.

Source
Generate Lib From DLL

Friday, August 9, 2013

Firefox: Get results from your favorite Google country domain


Firefox's default search bar gets its configuration options (what search engine to use, what parameters to pass, etc.) from XML files located in 'searchplugins' directory in Firefox’s default directory. If you are on a Windows system this most probably be 'C:\Program Files\Mozilla Firefox\browser\searchplugins'. There's an XML file for Google called 'google.xml'.To modify it follow the following steps (I am doing it for google.co.in, you can replace it as per your requirement): 
  1. The XML tags in this file are self-explanatory. First copy google.xml and make a new one, let's call it 'google_india.xml' (you should have admin rights on your Windows OS).
  2. Edit 'ShortName' tag content and rename it to something else, for example, Google India.
  3. Then there are two 'Url' tags. Leave the first 'Url' tag as it is get search suggestions (though never seen it work as I am behind a firewall). In the second tag change template attribute to template="https://www.google.co.in/search" (or whatever you find useful).
  4. Change https://www.google.com/ to https://www.google.co.in within '<SearchForm>' tag. This specifies the page to display if you click on the magnifying glass icon, at the left hand corner of the search bar, without any search terms.
  5. Now restart your Firefox browser and make the newly added Google search engine as default.
 Credits: