DDK bug with MFC and Win 2000 headers?

I’m wondering if I stumbled upon a bug in the Windows 2003 DDK.
The DDK is supposed to support development for both Windows 2000
and 2003, and so far it’s done that perfectly. Until today when
I tried to build a user mode MFC app.

The problem I found is that \DDK\inc\mfc42\afxdlgs.h contains a
reference to an OPENFILENAME_NT4 structure. This structure is
defined in \DDK\inc\wnet\commdlg.h, but not \DDK\inc\w2k\commdlg.h.
It appears that you can only compile MFC apps if you’re set up for
Windows 2003 development.

Has anybody else run into this?

I had the same problem. I created a file called afxfixw2k.h with the
following

#ifndef AFX_FIX_DONE_ROB

#if !defined(IA64) && !defined(AMD64)

#define AFX_FIX_DONE_ROB
#include <commdlg.h>

typedef struct tagOFN_NT4A {
DWORD lStructSize;
HWND hwndOwner;
HINSTANCE hInstance;
LPCSTR lpstrFilter;
LPSTR lpstrCustomFilter;
DWORD nMaxCustFilter;
DWORD nFilterIndex;
LPSTR lpstrFile;
DWORD nMaxFile;
LPSTR lpstrFileTitle;
DWORD nMaxFileTitle;
LPCSTR lpstrInitialDir;
LPCSTR lpstrTitle;
DWORD Flags;
WORD nFileOffset;
WORD nFileExtension;
LPCSTR lpstrDefExt;
LPARAM lCustData;
LPOFNHOOKPROC lpfnHook;
LPCSTR lpTemplateName;
} OPENFILENAME_NT4A, *LPOPENFILENAME_NT4A;
typedef struct tagOFN_NT4W {
DWORD lStructSize;
HWND hwndOwner;
HINSTANCE hInstance;
LPCWSTR lpstrFilter;
LPWSTR lpstrCustomFilter;
DWORD nMaxCustFilter;
DWORD nFilterIndex;
LPWSTR lpstrFile;
DWORD nMaxFile;
LPWSTR lpstrFileTitle;
DWORD nMaxFileTitle;
LPCWSTR lpstrInitialDir;
LPCWSTR lpstrTitle;
DWORD Flags;
WORD nFileOffset;
WORD nFileExtension;
LPCWSTR lpstrDefExt;
LPARAM lCustData;
LPOFNHOOKPROC lpfnHook;
LPCWSTR lpTemplateName;
} OPENFILENAME_NT4W, *LPOPENFILENAME_NT4W;
#ifdef UNICODE
typedef OPENFILENAME_NT4W OPENFILENAME_NT4;
typedef LPOPENFILENAME_NT4W LPOPENFILENAME_NT4;
#else
typedef OPENFILENAME_NT4A OPENFILENAME_NT4;
typedef LPOPENFILENAME_NT4A LPOPENFILENAME_NT4;
#endif // UNICODE

#endif // IA64
#endif // AFX_FIX_DONE_ROB

and then added an include before “afxdlgs.h”

#include “…\afxfixw2k.h”
#include <afxdlgs.h>

I notified this newsgroup about it when the w2003 sdk was released, but
don’t know if Microsoft knows. There are a bunch of other things missing
too…

Thanks,
Rob

> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:bounce-ntdev-
> xxxxx@lists.osr.com] On Behalf Of McNamee, John
> Sent: Wednesday, October 22, 2003 1:40 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] DDK bug with MFC and Win 2000 headers?
>
> I’m wondering if I stumbled upon a bug in the Windows 2003 DDK.
> The DDK is supposed to support development for both Windows 2000
> and 2003, and so far it’s done that perfectly. Until today when
> I tried to build a user mode MFC app.
>
> The problem I found is that \DDK\inc\mfc42\afxdlgs.h contains a
> reference to an OPENFILENAME_NT4 structure. This structure is
> defined in \DDK\inc\wnet\commdlg.h, but not \DDK\inc\w2k\commdlg.h.
> It appears that you can only compile MFC apps if you’re set up for
> Windows 2003 development.
>
> Has anybody else run into this?
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cdp.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com</afxdlgs.h></commdlg.h>

So far I’ve had great success using the 2003 DDK to build existing 2000
drivers, but I’m just starting to migrate user mode code. What other
things are missing?

–John

-----Original Message-----
From: Rob Green [mailto:xxxxx@cdp.com]
Sent: Wednesday, October 22, 2003 10:47 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: DDK bug with MFC and Win 2000 headers?

I had the same problem. I created a file called afxfixw2k.h with the
following

I notified this newsgroup about it when the w2003 sdk was released,
but
don’t know if Microsoft knows. There are a bunch of other things
missing
too…

> -----Original Message-----
> From: John McNamee
> Sent: Wednesday, October 22, 2003 1:40 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] DDK bug with MFC and Win 2000 headers?
>
> I’m wondering if I stumbled upon a bug in the Windows 2003 DDK.
> The DDK is supposed to support development for both Windows 2000
> and 2003, and so far it’s done that perfectly. Until today when
> I tried to build a user mode MFC app.
>
> The problem I found is that \DDK\inc\mfc42\afxdlgs.h contains a
> reference to an OPENFILENAME_NT4 structure. This structure is
> defined in \DDK\inc\wnet\commdlg.h, but not \DDK\inc\w2k\commdlg.h.
> It appears that you can only compile MFC apps if you’re set up for
> Windows 2003 development.
>
> Has anybody else run into this?

Quoted from earlier email:

"In case anyone on the ddk team is listening (Eliyas!) here are some of the
things I had to fix (I use the build to build all aspects of our product,
not just the drivers)

Inc\w2k\comdef.h, line 266, is missing an end parenthesis.
Lib\w2k\i386\netapi32.lib is completely missing
The following header files are missing
AccCtrl.h
AclAPI.h
ClusApi.h
COMIP.H
ComSvcs.h
COMUTIL.H
LM.H
LMACCESS.H
LMALERT.H
LMAPIBUF.H
LMAUDIT.H
LMCHDEV.H
LMCONFIG.H
LMCons.h
LMERRLOG.H
LMMSG.H
LMREMUTL.H
LMREPL.H
LMSERVER.H
LMSHARE.H
LMSNAME.H
LMSTATS.H
LMSVC.H
LMUSE.H
LMUSEFLG.H
LMWKSTA.H
MSTask.h
MSTErr.h
RICHEDIT.H
SoftPub.h
Transact.h
ZMOUSE.H
And the following lib
I386\COMSUPP.LIB"

Thanks,
Rob

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-ntdev-
xxxxx@lists.osr.com] On Behalf Of McNamee, John
Sent: Wednesday, October 22, 2003 12:58 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: DDK bug with MFC and Win 2000 headers?

So far I’ve had great success using the 2003 DDK to build existing 2000
drivers, but I’m just starting to migrate user mode code. What other
things are missing?

–John

> -----Original Message-----
> From: Rob Green [mailto:xxxxx@cdp.com]
> Sent: Wednesday, October 22, 2003 10:47 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] RE: DDK bug with MFC and Win 2000 headers?
>
> I had the same problem. I created a file called afxfixw2k.h with the
> following
>
> …
>
> I notified this newsgroup about it when the w2003 sdk was released,
but
> don’t know if Microsoft knows. There are a bunch of other things
missing
> too…
>
>
> > -----Original Message-----
> > From: John McNamee
> > Sent: Wednesday, October 22, 2003 1:40 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] DDK bug with MFC and Win 2000 headers?
> >
> > I’m wondering if I stumbled upon a bug in the Windows 2003 DDK.
> > The DDK is supposed to support development for both Windows 2000
> > and 2003, and so far it’s done that perfectly. Until today when
> > I tried to build a user mode MFC app.
> >
> > The problem I found is that \DDK\inc\mfc42\afxdlgs.h contains a
> > reference to an OPENFILENAME_NT4 structure. This structure is
> > defined in \DDK\inc\wnet\commdlg.h, but not \DDK\inc\w2k\commdlg.h.
> > It appears that you can only compile MFC apps if you’re set up for
> > Windows 2003 development.
> >
> > Has anybody else run into this?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@cdp.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

I’ll look into this for you. If I understand you correctly, you “build
all aspects of your product” within the DDK environment. Please email
me directly with more information on this. What is your product, what
are the types of applications you ship with it? Are you building more
than a driver/support utility/control panel?

Thanks,
Richard Moore
xxxxx@microsoft.com
PM Build Environment

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Rob Green
Sent: Wednesday, October 22, 2003 10:09 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: DDK bug with MFC and Win 2000 headers?

Quoted from earlier email:

"In case anyone on the ddk team is listening (Eliyas!) here are some of
the
things I had to fix (I use the build to build all aspects of our
product,
not just the drivers)

Inc\w2k\comdef.h, line 266, is missing an end parenthesis.
Lib\w2k\i386\netapi32.lib is completely missing
The following header files are missing
AccCtrl.h
AclAPI.h
ClusApi.h
COMIP.H
ComSvcs.h
COMUTIL.H
LM.H
LMACCESS.H
LMALERT.H
LMAPIBUF.H
LMAUDIT.H
LMCHDEV.H
LMCONFIG.H
LMCons.h
LMERRLOG.H
LMMSG.H
LMREMUTL.H
LMREPL.H
LMSERVER.H
LMSHARE.H
LMSNAME.H
LMSTATS.H
LMSVC.H
LMUSE.H
LMUSEFLG.H
LMWKSTA.H
MSTask.h
MSTErr.h
RICHEDIT.H
SoftPub.h
Transact.h
ZMOUSE.H
And the following lib
I386\COMSUPP.LIB"

Thanks,
Rob

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-ntdev-
xxxxx@lists.osr.com] On Behalf Of McNamee, John
Sent: Wednesday, October 22, 2003 12:58 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: DDK bug with MFC and Win 2000 headers?

So far I’ve had great success using the 2003 DDK to build existing
2000
drivers, but I’m just starting to migrate user mode code. What other
things are missing?

–John

> -----Original Message-----
> From: Rob Green [mailto:xxxxx@cdp.com]
> Sent: Wednesday, October 22, 2003 10:47 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] RE: DDK bug with MFC and Win 2000 headers?
>
> I had the same problem. I created a file called afxfixw2k.h with
the
> following
>
> …
>
> I notified this newsgroup about it when the w2003 sdk was released,
but
> don’t know if Microsoft knows. There are a bunch of other things
missing
> too…
>
>
> > -----Original Message-----
> > From: John McNamee
> > Sent: Wednesday, October 22, 2003 1:40 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] DDK bug with MFC and Win 2000 headers?
> >
> > I’m wondering if I stumbled upon a bug in the Windows 2003 DDK.
> > The DDK is supposed to support development for both Windows 2000
> > and 2003, and so far it’s done that perfectly. Until today when
> > I tried to build a user mode MFC app.
> >
> > The problem I found is that \DDK\inc\mfc42\afxdlgs.h contains a
> > reference to an OPENFILENAME_NT4 structure. This structure is
> > defined in \DDK\inc\wnet\commdlg.h, but not
\DDK\inc\w2k\commdlg.h.
> > It appears that you can only compile MFC apps if you’re set up for
> > Windows 2003 development.
> >
> > Has anybody else run into this?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@cdp.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com