Get GUIDs/CLSIDs from Exe, dll, ocx, tlb, etc

23. October 2007 10:08 by Mrojas in General  //  Tags: , ,   //   Comments (0)

A simple way of getting the GUID from an exe, dll, ocx, tlb is using the  TLBINF32.dll

This file is in the system path and it must be registered
(Remember to use regsvr32 if you haven't registered).

            TLI.TLIApplicationClass a = new TLI.TLIApplicationClass();
            try
            {

                TLI.TypeLibInfo inf = a.TypeLibInfoFromFile(@"c:\windows\system32\MSHFLXGD.OCX");
                MessageBox.Show(
                "TypeLibrary Name " +  inf.Name + "\r\n" + //name of (Type Library)
                "Tlb ID " +  inf.GUID + "\r\n" + // GUID for Library
                "LCID "  + inf.LCID + "\r\n" + // Language / Country
                "Major Version "+ inf.MajorVersion + "\r\n" + // Major Version
                "Minor Version "+ inf.MinorVersion); // Minor Version
                for (short i = 1; i < inf.TypeInfoCount; i++)
                {

                    TLI.TypeInfo inf2 = inf.TypeInfos[i];
                    MessageBox.Show("CLSID " + inf2.Name + " - " + inf2.GUID,i + " of " +
inf.TypeInfoCount);

                }
            }
            catch (Exception ee)
            {
                MessageBox.Show("No guid");
            }

 

 

MAN for .NET

5. October 2007 03:32 by Mrojas in General  //  Tags: , , , ,   //   Comments (0)
Microsoft recently published the MTPS Content Service

In brief, the MTPS Content Services are a set of
web services for exposing the content in
Microsoft/TechNet Publishing System (MTPS).


And Craig Andera, has develop a swift nice tool
called msdnman that you use from the command line to
get information from the MSDN

Also I recommend you to see this cool video of a Human LCD that Hugo sent me

Input Line Too Long

3. October 2007 09:35 by Mrojas in General  //  Tags: ,   //   Comments (0)
I was trying to compile a C++ Project in Visual Studio
and this project has a post-build step that executes
some batch statements.

And succendly from one day to the other the project failed
and the only message I had was
The input line is too long


After some googling I found that this error is displayed
when the command line in the command prompt
exceeds the maximum number of characters.
(Something quite obvious jeje)

The bottom line was that recenlty I had installed
some software and my PATH variable became TOO long
I fixed it by creating a new environment variable
called EXTRA_PATH where I put some references to
Some big paths and then changed my PATH variable
replacing all those long variables for %EXTRA_PATH%.

And problem solved!

IE7 Print shrink to fit problem

29. September 2007 17:22 by Mrojas in General  //  Tags: , , ,   //   Comments (0)
IE7 has an interesting bug...
Someone decided to change the printing default
to "Shrink to Fit".This is supposed to be good
because it will make printing of web pages better
but it affects several applications develop for
IE, for example if you are using the Web Access
to your Exchange server, or if you have an application
that prints on a page that is not a letter size page


Well a guy from a forum found an excellent solution.

The only problem is that he refers a hot fix,
but if you have problems with that hotfix, then
do the following:

1. Go to windowsupdate.microsoft.com

2. Make sure you have the following updates:

** Security Update for Internet Explorer 7 for Windows XP (KB938127)
** Cumulative Security Update for Internet Explorer 7 for Windows XP (KB937143)

And then run the following in the command prompt:
reg add "HKLM\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_STF_Scale_Min" /v iexplore.exe /t REG_DWORD /d 100 /f

VB6 API calls to .NET

27. September 2007 10:06 by Mrojas in General  //  Tags: , , , ,   //   Comments (0)
Every SERIOUS VB6 application, ended up requiring
that you import some functionality from the windows API or another DLL.
However if you were looking for a .NET equivalent and
google did not take you to the right page,
there is a document (a little old I might say) called
Microsoft Win32 to Microsoft .NET Framework API Map

I remember a couple of other pages that were even more complete,
but right know I can only remember http://pinvoke.net that gives some info about APIs

SVN get files without the .svn directories

24. September 2007 16:19 by Mrojas in General  //  Tags: , ,   //   Comments (0)
I felt so stupid today. Because when for a couple of months,
every now and then, when someone asked me for a copy of the source code
I just made a copy of my src directory and then searched for the .svn* folder
and then I erased them,
until by mistake i found the EXPORT function.
I use SmartSVN and I was creating a new project
and then the light came to me :S
Well if it happens to you just remember there is a
svn export
command. This will get the code from the repository without all the nasty files.