News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

OS Info Dump

Started by dedndave, July 28, 2009, 01:41:48 PM

Previous topic - Next topic

FORTRANS

Quote from: dedndave on August 05, 2009, 02:50:18 PM
well, it appears it is the PE format
of course, i do not see a file specifically named "kernel32.dll"
perhaps the win32s install has such a file
at this point, i am going to draw the line at win95 and call it "good", as Sinsi suggested
thank you Steve and Sinsi both for all your assistance

   Checking for a "kernel32.dll", shows it among the missing.  Unless
it's hidden or somesuch.

Oh well,

Steve N.

sinsi

Well, they had to do some trickery to get win32s working on a 16-bit dos extender... :bdg

Look in the windows\system\win32s directory, that's where it lives - look at the exports for W32SCOMB.DLL (a 32-bit PE file).
Freecell works (32-bit PE which loads at 014B0000h or something (?)), but a simple program consisting of 'ret' gets the same 'invalid' error. Must be a linker/library problem.


[attachment deleted by admin]
Light travels faster than sound, that's why some people seem bright until you hear them.

dedndave

soooooo - it can work !
looks like i need to build a disk
(now, where did i put that DOS 6.22 disk set - lol)
thanks Sinsi

FORTRANS

Hi,

   I did a text search for "kernel32" in the \WINDOWS
directory and its subdirectories (plus the freecel directory).
Here is a list of the files that contain that string.

Steve

[attachment deleted by admin]

ChillyWilly


DednDave OS Info Dump Ver 2.03

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Windows 7 Ultimate"
"CurrentVersion"="6.1"
"CurrentBuildNumber"="7100"
"SubVersionNumber"=(Value not found)
"CSDVersion"=(Value not found)
"BuildLab"="7100.winmain_win7rc.090421-1700"
"ProductId"="00428-321-XXXXXXX-XXXXX"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"="6.0"

OSVERSIONINFOEX Structure:

       Version.Build: 6.1.7100
         Platform ID: Win32 on Windows NT
         CSD Version:
Service Pack Version: 0.0
          Suite Mask: 0000000100000000
        Product Type: Windows 2000 Pro/XP/Vista Workstation

Press any key to exit


by the way my way i was getting the product version for xp/2k was to read the produspec.ini

  ;a little trick to get the 2k/xp version from the produc.ini
  invoke  GetSystemDirectory, offset szSysDirFileName, MAX_PATH
  invoke wsprintf,addr inipath,addr iniglue,addr szSysDirFileName,CTEXT("prodspec.ini")
  invoke GetFileSize,addr inipath,NULL  ;if the ini file doesnt exist we get the product version from registry
    mov FileSize,eax
    inc eax
.IF eax >= 1
    invoke GetPrivateProfileString,CTEXT("Product Specification"),CTEXT("Product"),CTEXT("Product Version Not Found"), ADDR WinVersion , 64,addr inipath
                         invoke MessageBox,0,CTEXT("Product Version"),ADDR WinVersion,0
    invoke SetDlgItemText,hWin,IDC_EDITWINVER, ADDR WinVersion
    .else
                    invoke MessageBox,0,CTEXT("Not Xp/2k"),CTEXT("prodspec.ini not found"),0
                  .endif

zenggongfu

From China
DednDave OS Info Dump Ver 2.03

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"ProductName"="Microsoft Windows XP"
"CurrentVersion"="5.1"
"CurrentBuildNumber"="2600"
"SubVersionNumber"=""
"CSDVersion"="Service Pack 2"
"BuildLab"="2600.xpsp_sp2_qfe.090206-1239"
"ProductId"="76481-640-XXXXXXX-XXXXX"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center]
"Ident"=(Value not found)

OSVERSIONINFOEX Structure:

       Version.Build: 5.1.2600
         Platform ID: Win32 on Windows NT
         CSD Version: Service Pack 2
Service Pack Version: 2.0
          Suite Mask: 0000000100000000
        Product Type: Windows 2000 Pro/XP/Vista Workstation

Press any key to exit

dedndave

thanks guys every little bit helps   :U

BATSoftware

PE programs will never run on a straight 3.1 system (without WIN32S). Why, simple, the loader cant read a PE image. A PE image is VERY different than an NE image. I know, I wrote a 16/32 resource hacker. Check the web for the number of 16bit resource editors/hackers....I found none...well there is 1 now!!!

http://home.comcast.net/~batsoftware/RES2RC/htm/RES2RC.htm

sinsi

I was looking at the discussion about functions and errors and thought about fasm (where you can build your own import section).
Anyway, looking at an example (pedemo) and right down the bottom is the line
section '.reloc' fixups data readable discardable       ; needed for Win32s
Here's the proof:

Light travels faster than sound, that's why some people seem bright until you hear them.

dedndave

hiya Sinsi
i know they're in there - lol
but the tables are made backwards for error reporting (they are made for loading, of course)
it wouldn't be hard to find them, though

sinsi

OK, to get a PE working under win32s you need a .reloc section, which means adding "/fixed:no" to the link command line.
I can't get your win3test to work - I'm not sure that win32s supports console-mode apps.
Light travels faster than sound, that's why some people seem bright until you hear them.

dedndave

ok Sinsi - thank you for playing with it
that tells me that most modern software will not run under win 3.11
unless the programmer specifically targets that platform
and - yes - i had neve thought of it, but i never saw a "console" in win 3.11
that's because they didn't need one
you can exit the windows shell back out to DOS if you want to run a DOS-mode program