Wednesday, November 16, 2005

problems with creating the a working control panel

For the last two days i have had problems
getting the control panel to work correctly
in the image i had created. More specifically
the display control panel applet was not working
correctly.

"Class Install Library - Image Device [Version 5.1.2600.1106, R1507]"
"Class Installer - Imaging devices [Version 5.1.2600.1106, R1507]"
"Display Control Panel [Version 5.1.2600.1106, R1507]"...
"Shell Control Panel Registry Data [Version 5.1.2600, R620]"...
"Shell Control Panel Registry Data (Pro) [Version 5.1.2600, R620]"...
"Shell Hyperterminal Registry Data [Version 5.1.2600, R620]"...
"System Control Panel [Version 5.1.2600.1106, R1507]"...
"Accessories/Communications Programs [Version 5.1.2600, R620]"...
"Add Hardware Control Panel [Version 5.1.2600.1106, R1507]"...

are all possible candidates

1. Display Control Panel

Tuesday, November 15, 2005

INF files and Driver Issues

Currently I dont have a precise
method to create a component for
the nvidia (or ati) using the inf
files that come with.

Here is a pretty good online article
about inf files:
http://www.wd-3.com/archive/InfFiles.htm

Here is what he says about some
of the sections:

These are global:

Version
Control Flags
SourceDisksNames
SourceDisksFiles
DestinationDirs
Strings

These are Hierarchical:

Manufacturer
Models Section --- componet, service, .hw
InstallComponent --- add reg, copy files
InstallServices --- add service
.HW --- add reg

AddReg
CopyFiles

AddServer
AddReg

Ok lets take a look at our inf file
of instrest, an nvidia 5200 card.

Yes i do see the version section that
was previously mentioned.

[Version]
Signature = "$Windows NT$"
Provider = %NVIDIA%
ClassGUID = {4D36E968-E325-11CE-BFC1-08002BE10318}
Class = Display
CatalogFile = NV4_DISP.CAT
DriverVer = 10/10/2005, 8.1.8.5

Signature section means that this
can only be parsed by windows nt
or greater. That makes sese.
Provider is nvidia which is no
surprise.

Next look at this section extract:
---------------------------------------
[SourceDisksNames]
1 = %DiskID1%

[SourceDisksFiles]
nv4_mini.sys = 1
nvcod.dll = 1
nvsvc32.exe = 1
nv4_disp.dll = 1
nvhwvid.dll = 1
nvoglnt.dll = 1
nvcpl.dll = 1
nvmctray.dll = 1
nvcpl.hlp = 1
nvwddi.dll = 1
nvnt4cpl.dll = 1
nvwcplen.hlp = 1
nvmccs.dll = 1
nvapi.dll = 1

[Manufacturer]
%NVIDIA% = NVIDIA.Mfg
---------------------------------------

so %1% is macro for = %DiskID1%
which is later defined to be:

DiskID1 = "NVIDIA Windows 2000/XP Driver Library Installation Disk 1"

I toyed around with nvcodins.dll
Dump of file nvcodins.dll

File Type: DLL

Section contains the following exports for NVCoInstaller.dll

0 characteristics
434B52D1 time date stamp Tue Oct 11 00:51:13 2005
0.00 version
1 ordinal base
1 number of functions
1 number of names

ordinal hint RVA name

1 0 0000289A NVCoInstaller

Summary
Dump of file nvcodins.dll

File Type: DLL
----------------------------- end exports ------------------

And here are the imports from dumpbin run.
(Not all of dumpbin output is present.)
....
ADVAPI32.dll
2001000 Import Address Table
2007540 Import Name Table
0 time date stamp
0 Index of first forwarder reference

1CD RegCreateKeyExW
1C8 RegCloseKey
1EC RegQueryValueExW
1E2 RegOpenKeyExW
1F9 RegSetValueExW
...
-------------------------------------------------------------------

So this dll calls RegCreateKeyExW makes sense.
Does this single dll create the regsitry keys
needed for nvidia system?


Here are the threads going through my mind.
1) What does the install programm really do?
Is an install responsible placement of dlls
and modification of the registry or does
it call functionality built into the driver
system.
2) why cant i just call the driver installer
program from fba? make vba scrit that runs
the installer program?

Friday, November 11, 2005

Opengl Issues.

I have discovered that my understanding
of opengl on windows was way way off.

I had that a vendor would replace the
opengl32.dll with there own. This is
not the case, look at Microsoft KB
article "How to use the Windows OpenGL
extension mechanism to access OpenGL extensions"
of Article ID 328303.

Is there a well known way that a vendor
must add extentions to MS's opengl system?

Here is something I found on google groups:


Alex Mizrahi
Oct 22 2003, 4:22 pm show options
Newsgroups: comp.graphics.api.opengl
From: "Alex Mizrahi" - Find messages by this author
Date: Wed, 22 Oct 2003 23:24:02 +0300
Local: Wed, Oct 22 2003 2:24 pm
Subject: Re: OpenGL SDK for windows
Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse

(message (Hello 'Olaf.Baey...@skyscan.be)
(you :wrote :on '(Tue, 21 Oct 2003 16:14:40 +0200))
(

OB> These library will statically hook themselves to some OpenGL dll
OB> (driver that came with your video card, I do not remember how it is
OB> called, probably
OB> OpenGL32.dll or something like that)

opengl32.dll, that's dll of OS and should never be updated.
if hardware acceleration is present, it loads some dll (for nVIDIA cards
it's nvoglnt.dll, there's a key in registry that describes filename),
queries it for features it has and translates opengl calls to driver calls.
nvopglnt itself do not export any ogl functions directly, it exports only
DrvGetProcAddress so function can be got. as i understand, this does not use
standard exporting mechanizm at all.

And from emperical evidence opengl32.dll is NOT being
updated. So opengl32 is conduit to something
else that is in turn a conduit to the
real function call on the GPU.

Thursday, November 10, 2005

OpenGL and NVidia driver issues.

Some of the following ideas are taken
from a thread of conversation
the google groups: microsoft.public.windowsxp.embedded
with the thread title " NVidia Driver Component, Anyone have?"
author Brian M. Amira of date Oct 5 2004

Amira was looking for a way to install the drivers
as am i.
one person said use an extration utility
to remove files from the exe:

Open the package (.exe) with WinZip. Extract all the files to a temp dir. Run expand.exe against all the compressed file (their
extensions are ending with _ symbol) and change their extension.

This what I though about.

but another person stated use the trial version
http://www.driverguidetoolkit.com/

I found this to be particularly useful as it would extract the
drivers from an existing system and place them with
inf file into a directory.
I then used the component designer to import the files
and copied the nvidia files into windows xpe embedded
repository.

Wednesday, November 09, 2005

replacing the splash screen

there are several threads of discussion about
how to replace the screen.
one involves changing hacking a bitmap resources
in the file ntoskrnl.exe
others involve using a dll call bootvid.dll
i have tried the ntoskrnl.exe method and this
works but with some difficulty. you cant
just copy the modified file to the /windows/system32
directory you have to copy in during safe mode.

after some search microsoft says this:

You can prevent the Windows splash screen from being displayed while the run-time image is booting.

Note You cannot replace the Windows XP logo with a custom logo, because doing so violates the Microsoft EULA.

To remove the Windows boot splash screen

1. Edit the c:\boot.ini file of your run-time image with Microsoft® Notepad, or a similar text editor.
2. Add the /NOGUIBOOT switch to the boot arc path of your run-time image. For example type,

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Embedded" /NOGUIBOOT

but i have heard that there other command line switches to boot.ini
that will actually read a 16 bit bmp file.

another question about rebranding would be to totally remove the
explorer bar. but this maybe a lager task for a later date.

check out this reference
http://www.sysinternals.com/Information/bootini.html

but what is interesting is that
eventough microsoft says that "... cannot replace the Windows XP logo with a custom logo, because doing so violates the Microsoft EULA. " they provide
a switch to do so.

/BOOTLOGO
Use this switch to have Windows XP or Windows Server 2003 display an installable splash screen instead of the standard splash screen. First, create a 16-color (any 16 colors) 640x480 bitmap and save it in the Windows directory with the name Boot.bmp. Then add "/bootlogo /noguiboot" to the boot.ini selection.
this tip came from the link:
http://bink.nu/?ArticleID=2705

Friday, November 04, 2005

MS artticle dealing with using virtual pc and windows xp embedded

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnembedded/html/embedded04232004.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxpesp2/html/tchHowToDemonstrateWindowsXPEmbeddedUsingVirtualPC.asp

Attempt at booting Windows XP embedded on a USB Stick

1. In an attempt to get away from the switching
drives i thought that using a usb key might
be a better technique, i.e. just plugging
in the usb drive and unhooking the main
ide drive (or removing it using a drive
tray)

2. To create a bootable usb stick the
following givens must be met:
a. The pc that you intend to boot of off
must support booting of a usb key.
b. you must have access to a pc that
has a high density 3 1/4 floppy drive.
c. install dos, in my case dos 6.22
these can be fount at http://www.bootdisk.com/
onto a 3 1/4 floppy.
d. download and install the program
"SP27213.exe" which you should be able to
which is make available by the hewlette packard
compnay, and can be located on HP's web site.
see the website
http://www.novell.com/coolsolutions/feature/3612.html
for a snapshot on how this works.
when you use this utility and you click
"Create a Dos startup disk"
point the directory button to the previosly
created dos boot floppy. This will
copy the dos boot sector, msdos.sys and io.sys
to the usb key drive. The drive will now
be able to boot. after that I manually
copied all the dos files from the floppy
dirve to the usb key drive.
The usb key should now boot to dos.


This above my a working usb dos pen drive.
I attempted to convert this into a drive
into something that was capable of booting
windows xp embedded for this i had to bootprep.exe.

From Sean Limingsbook's Windows XP Embedded
Advanced Chapter 8.2.2.1 "BOOTPREP.EXE prepares
your media, whos active partition has been
formatted and made bootable with FAT16, BIGDOS FAT 16
or FAT32, for booting into Windows XP Embedded."

I booted the usb key into does ran bootprep.exe
then restarted and place a pre-fba boot image
onto the usb key. After restarting the
computer Windows XP embedded attempted to start:
I had the initial white on black progress
bar and the windows XP embedded splash screen
but immediately after that. i had the following
STOP screen with the STOP code
0x0000007B (0x f894d640 , 0xc0000034 0x0000000 0x00000000)

Then I did some research on