Mais um kabrito de sucesso!

Meu amigo Paulo Bridi teve, após tensos dias de espera, seu aplicativo, Olho no Lance, desenvolvido para iPhone baseado no sistema iOS, aprovada no ITunes Apple Store.Olho no Lance
O objetivo é bem claro. Acompanhar os resultados dos jogos de futebol das jornadas dos campeonatos Gauchão e Brasileiro, e como um plus receber notificações “PUSH” para os jogos selectionados.
Hoje o aplicativo pode ser baixado gratuitamente no App Store.

Projetos pessoais, a.k.a. “kabritos” como este do Paulo, são uma forma proativa de se aprofundar em novas tecnologias nas horas livres.
Alem de ampliar a bagagem de conhecimentos do autor, é muito recompensador, mesmo o produto sendo gratuito.

Em breve espero poder escrever sobre o “kabrito” que estou criando, e que deve ficar pronto antes de 19/Maio atendendo ao desafio do meu brother Cícero Rolim, emprendedor, criador do Muambator e mentor de kabritos meu e do Paulinho.

Mais uma vez: Parabéns ao Paulo por mais essa conquista!
Abraço,

How-to verify COM dll is indeed registered, with C#.

I´ve been looking for a way to verify, from within Visual C#, whether a required COM component dynamic link library (DLL) has  indeed been registered in the system and that our dependent class can you use without fear.

In the way to the solution I found approaches using kernel32 LoadLibrary and FreeLibrary calls which actually only verify the existence of the component but nothing about whether it has been registered in the Windows registry.

The most reliable way to do this verification is to use a static method named GetTypeFromProgID,  available in the TYPE class, from the CLR,

This method attempts to load a particular type from the DLL under test.
If successfull it should return the full qualified type. Otherwise, if the DLL is not registered, it will render a NULL result.

This method takes a string parameter which is the ProgID. If progID is a valid entry in the registry and a type is associated with it; otherwise, Nothing

The sample code:


using System;
using System.Runtime.InteropServices;
namespace ComDllVerification
{
    class Program
    {
        static void Main(string[] args)        
        {
            try
            {
                Type T = Type.GetTypeFromProgID("WIA.DeviceManager");
                
                if (T != null)
                {
                    // Safe to go...
                }
            }
            catch (COMException ex)
            {
                // Handle the COM exception here...
            }
        }
    }
}

Git rebase

Source control management has never changed so much its paradigm until GIT.

Git revolutionized they way you deal and manage source code repositories breaking traditional concepts as those found in CVS and SVN.

Working on a branch of one of the mainstream projects I participate, the time came where a merge is needed.
Both master (trunk) and our branch (remote, because it sits on the server) have evolved and merging wouldn´t be easy.

To make things safer I decided to bring the master changes into our branch and for that purpose I choose to use “git rebase” that was expected to “replay” the master changes from the begining and finally apply our changes on top of them, all onto our branch.

The command is pretty easy:

$ git rebase origin/master

If there are many conflicts, they can be resolved manually. Rebase will stop on each conflict, allowing you to fix it and procced or abort.

To proceed:

$ git rebase –continue

To abort:

$ git rebase –abort.

You can also skip a patch by issuing:

$ git rebase –skip

 

And one very important note. Once it´s finished, NO commits or push commands are needed. I made that mistake once and ended up with a merge commit on top of the actual rebase. So don´t doi it! :)
Everything should be rebased on your remote server.
Verify the Git logs or use gitk and you´ll how ended up.

The good point is that commit history, authors, etc..are all preserved.That´s good.

 

Synergy weird behavior on Windows 7

To keep up the pace of running multiple development environments simultaneously, xp, win7, and to avoid dealing with multiple mice/keyboards combinations, I downloaded and installed Synergy, a little tool that allows you to control many computer desktops from just one of them, extending and embracing the combined dektops with a unique experience.

It allows your mouse to roll from one machine´s desktop to the other one, transparently.

My setup has a the Windows 7 box configured as the Synergy server, so others (clients) desktops connect to it to get access to the input devices.

Everything worked smoothly until a recent windows automatic update that took phace las Thursday, September 15th.
Albeit the server service was up and running and client machines connected ok to the server one, the server consistently refused to share its input devices with the clients.

After experimenting with different configurations, I realized the problem was related to the Synergy Windows service accessing the user desktop area.

Fixing this situation, involved:

  1. Disable the Synergy Windows service.
  2. Granting the Synergy app shortcut administrator execution privileges.
  3. Set the app Synergy app to automatically startup with Windows (through msconfig).

Now Synergy is back to normal! ;)