Having Trouble Porting from Windows 3.1 to Windows NT

Having Trouble Porting from Windows 3.1 to Windows NT

Post by josef jur » Thu, 19 Oct 1995 04:00:00



Hello:

I have been trying to port an image processing program from MSVC for
Windows 3.1 to MSVC for Windows NT for about a month now, and I still
cannot get the program to run correctly, though I have gotten it to
compile.  The problem is that at one point, when a dialog box is
supposed to pop up, it does not, and the program just hangs there.
I guess this means that the correct message is never getting to that
switch statement.

Well, here is a list of the things which I have done so far to get
the program to compile on Windows NT.  Perhaps someone might spot
something I missed.

     Replaced the FAR PASCAL declarations with CALLBACK.
     Defined __export to be blank space.
     Replaced MAKEPOINT() with LONG2POINT().
     Replaced GetCurrentTask() with GetCurrentThread().
     Replaced unsigned with UINT.
     Replaced PostAppMessage() with PostThreadMessage().
     Replaced SetWindowOrg() with SetWindowOrgEx().
     Used LOWORD() when testing the wParam ids.
     Removed LOWORD() when testing the hwnd of lparam.

I found no instances of the high word of lparam being used in the
original code, and so I did not use the HIWORD() macro to access the
high word of wparam for the port.

One thing I worry about is replacing GetCurrentTask() with
GetCurrentThread() because I understand that it can also be replace with
GetCurrentProcess, and I was wondering how one decides which function
to replace GetCurrentTask with.

I left MakeProcInstance() alone, as I understand that it is replaced
with a macro that does nothing anyways.

Assumming that there are no packed data structures in this program,
I wonder if anyone can suggest anything that I might have missed.

Also, am I correct in understanding that in 32-bit Windows, the id is
in the low word of the wparam and that the cmd is in the high word?

Thank you,

Josef Jurek

 
 
 

1. Wanted: Windows installer for Windows 3.1/Windows NT

Hi,

I'm looking for an installation generator for Windows 3.1/Windows NT,
either public domain or not. Has anyone heard of a good one?

Thanks,

-- Nitsan Seniak
--

------------------------------------------------------------------------------

ILOG S.A.                               tel: +33 1 46 63 66 66
2 Avenue Gallieni, BP 85                fax: +33 1 46 63 15 82
94253 Gentilly Cedex                    url: http://www.ilog.fr/
FRANCE                                  or   http://www.ilog.com

2. ME10-bidirectional interface - New Informations

3. Differences in Windows Nt and Windows 3.1 apis?

4. 100baseT adapters for Indigo2

5. inp & outp in windows 3.1 and windows Nt

6. AOpen 32x cdrom & DAE?

7. How to view a Window NT hlp-file with Window 3.1?

8. Do I need WinNT Server for 2 PCs network?

9. Help: Windows 3.1 Application on Windows NT

10. inp & outp in windows 3.1 and windows Nt

11. Windows 3.1/Postscript trouble

12. Porting NT 3.1 to NT 4.0