In Windows 95/98, drivers can be loaded statically at Windows startup or dynamically after startup.
Use the Win32 CreateFile function to dynamically load SCNSM. For example, the following code snippet loads the driver if it is in the current or Windows system directories:
HANDLE hDevice = CreateFile("\\\\.\\SCNSM.vxd", 0, 0, NULL, CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE, NULL);
See the example test32/main.c.
The driver can be loaded at Windows startup by doing the following:
The driver can be loaded at Windows startup by doing the following: