Subj : Re: difficulty with macros in Borland C++ 5.02 To : borland.public.cpp.borlandcpp From : "Ed Mulroy [TeamB]" Date : Fri Sep 05 2003 02:48 pm You are using a 1997 compiler. You should expect that things will have changed over the 6 years period since your compiler was new. As expanded for Win32 programs using the header files on my machine, those from C++ Builder 6. The only include I used in the program whose preprocessing found these things was WINDEF.H. (I could have used WINDOWS.H which includes WINDEF.H) From BASETSD.H typedef unsigned __int64 ULONG_PTR, *PULONG_PTR; typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR; HKEY is defined in WINNT.H by DECLARE_HANDLE(HKEY); and DECLARE_HANDLE comes about from these lines in WINNT.H but I have added a backslash continuation character to defend against news reader word wrapping. #ifdef STRICT typedef void *HANDLE; #define DECLARE_HANDLE(name) \ struct name##__ { int unused; }; typedef struct name##__ *name #else typedef PVOID HANDLE; #define DECLARE_HANDLE(name) typedef HANDLE name #endif typedef HANDLE *PHANDLE; .. Ed > trevor Arsenault wrote in message > news:3f58c67d@newsgroups.borland.com... > I am having difficulty translating code from VC++ to Borland recieving > various error in standard header files. > > DWORD_PTR ve_valueptr; line 107 > is the line located in WINDDK\2600\INC\WXP\winreg.h > the error message is: > Error: winreg.h(107,26):Type name expected > Error: winreg.h(107,26):Declaration missing ; > As this is a standard header file in the DDK I don't want to begin editing > it. I have included windows.h so the macros should be understood, however, > no luck so far. DWORD is accepted but not DWORD_PTR there are multiple other > errors such as: > Error: winreg.h(145,12):'HKEY' cannot start a parameter declaration > found on the following lines > > WINADVAPI > LONG > APIENTRY > RegCloseKey ( > IN HKEY hKey > ); > > so I assume it is just a macro not understood in the borland enviornment but > do not wish to redeclare all macro's again...if it really is a macro issue > as now I'm a little unsure. > > I don't explicitly include winreg.h it is implicitly included in another > header header file that I have not been able to track down. > > Thank you for any assistance > Trevor Arsenault > > .