The Linux Page

Help other users realize that everything is possible, especially avoiding Windows for their own personal use.

Welcome to The Linux Page


Fox Trot by Bill Amend. Click to enlarge.
Click to enlarge

This site is a collection of my own work with Linux. Certain things are easy, others take time to decipher and if I ever need to repeat the work (which usually happens!), then I need to remember everything by memory or... have a site with all the steps taken and to take again.

The following are my most recent posts:

If you were wondering how to make MS-Windows know about your Intranet computers, let me tell you, it's very simple, you just have to add the address(es) to your hosts file. Am I kidding?! Yeah! Right! Have a look for yourself, on NT and Windows 2000, XP, 2003, Vista, etc. you have a "network driver"1 here:

  • 1. For your information, the network stack comes from FreeBSD. That additional module you bought for $100+ for MS-DOS and then MS-Windows 1.0 to 3.1... was free software.

Often, when one writes a game, one wants a specific resolution to make sure that the game works as expected. Zoomed out textures may not look as nice and the speed could be affected too (drawing 1280x1024 pixels instead of 640x480 is more than 4x higher and all video boards won't be as fast as required in this case). Under MS-Windows you can ask the system to change resolution (size & depth) with a call to ChangeDisplaySettings().

If you are using a folder much, then you can create a substitute using the subst command in a shell. This command will assign a path to the given letter and the result is something which looks like you had an additional hard drive.

To look at your processes, threads, modules, network, etc. at a quite low level, you can use the SysInternals Tools. System Internals was bought by Microsoft. So the new site is at Microsoft.com. The old URL still functions though (http://www.sysinternals.com).

Note that since that purchase Microsoft has worked to ameliorate their libraries to give these tools legitimate access to the data they query!

In most cases, these tools work against running processes and not against the source (not the .exe, .dll, etc. files, but their loaded/in memory versions.)

If you're like me, you need to register an OCX, DLL, COM object once in a while. Not so often that you will remember what the command is. So...

In order to register a DLL, an OCX and any other COM object, use the MS-Windows tool regsvr32.exe (which usually is in C:\Windows\system32 or some similar folder).

There is also a way to edit the registry, but frankly, just use the tool!

Question: Is there a regsvr64.exe under Win64? 8-)

Always wondered how they automatically restart an application after a reboot under MS-Windows?

There is a function named RegisterApplicationRestart() that does just that.

There are flags to tell when your application should be started or under which circumstances.

For instance, you can start only if something crashed the OS.

The doc is here: https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-registerapplicationrestart

Noticing that this is a rather old link, there is my own implementation of the EDLL in case you had not found it yet! 

This Enhanced DLLs page is the first I wrote before starting on the project for real.

This works great with MinGW and does not require to have all symbols defined in a tree like definition. (i.e. these DLLs can link back to the main executable, just like under Linux and many other Unices.)

Look at the SHGetSpecialFolderPath()1 function! You can actually use names such as "My Documents" and transform them a valid path as you would expect (i.e. C:\Settings & Stuff\username\My Docs\...).

And yes! If you have no clue about that function, that's not going to be easy to find it...

Note that there has been talks about creating such functions under Linux. There are some but so far I have not seen too many people using

  • 1. The SH stands for Shell. The explorer windows are considered shells under MS-Windows. Nothing to do with a real good Unix shell, of course.

cl.exe has a special option to be told that the input file is a C (/Tc) or a C++ (/Tp) file. This is necessary if you want to use an extension other than the default .c, .cxx and .cpp. For instance, many people use .cc or .c++ for C++ files. Just add the /Tp command line option and your file will be accepted as a C++ file no matter what the extension is.

Also, in your environment, you can change the editor and Open/Close feature to recognize these files. The Microsoft page available here:

https://support.microsoft.com/?scid=kb%3Ben-us%3B181506

explains how you can tweak the registry for VC6 ...

The other day, I wrote a module for Drupal. Up to here, no problem. What I wrote required a small amount of Javascript to make a dropdown menu feature work. That worked just fine under Mozilla and FireFox, and even Safari & Konqueror.

When I tried with Internet Explorer, nope. Not working at all.

The function I was using goes like this:

Thank you for visiting my website.