Prev: What is watchdog!WdUpdateRecoveryState: Recovery enabled.?
Next: Intermediate driver (IM) installation using DPFx question
From: Anonymous on 17 Jan 2006 17:44 This is highly unusual, why on earth do we get the sdk files in the ddk if we cannot use nmake? Could you tell me what the Sources file need to be to compile this /*-------------------------------------------------------------- HelloMsg.c -- Displays "Hello, Windows" in a message box (c) Charles Petzold --------------------------------------------------------------*/ #include <windows.h> int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { MessageBox (NULL, TEXT ("Hello, Windows"), TEXT ("HelloMsg"), 0) ; return 0 ; } thanks
From: Ivan Brugiolo [MSFT] on 17 Jan 2006 18:39 You can use nmake, but, you would be on your own. `sources` is a file processed by `makefile.def`, that is included by `makefile`. It ensures that your code is using the proper includes and libs for the target of your choice. There are so many ways to destroy the functionality of your binary by choosing improper compile/link options, that, the only standard safe and sound way is `sources`. If you need to get fancy, you can use makefile.inc, and other techniques. For the file below, you should be able to change the template with C_DEFINES = $(C_DEFINES) -DUNICODE -D_UNICODE UMTYPE=windows UMENTRY=wwinmain TARGETLIBS=\ $(SDK_LIB_PATH)\kernel32.lib \ $(SDK_LIB_PATH)\user32.lib \ $(SDK_LIB_PATH)\gdi32.lib -- -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm <zzz> wrote in message news:u4gHge7GGHA.516(a)TK2MSFTNGP15.phx.gbl... > This is highly unusual, why on earth do we get the sdk files in the ddk > if we cannot use nmake? > > Could you tell me what the Sources file need to be to compile this > > /*-------------------------------------------------------------- > HelloMsg.c -- Displays "Hello, Windows" in a message box > (c) Charles Petzold > --------------------------------------------------------------*/ > > #include <windows.h> > > int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, > PSTR szCmdLine, int iCmdShow) > { > MessageBox (NULL, TEXT ("Hello, Windows"), TEXT ("HelloMsg"), 0) ; > > return 0 ; > } > > thanks > >
From: Anonymous on 17 Jan 2006 19:03 Yes, it works, thank you. I believe the unicode is unnecessary, unless one wants to work with L"" strings... thanks.
From: Ivan Brugiolo [MSFT] on 17 Jan 2006 20:26 OT: Who would not want to work nowadays with L"" strings ? You are forcing the OS to convert the strings in all the places. -- -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm <zzz> wrote in message news:uLevXK8GGHA.3056(a)TK2MSFTNGP09.phx.gbl... > Yes, it works, thank you. I believe the unicode is unnecessary, > unless one wants to work with L"" strings... > thanks. > >
From: Maxim S. Shatskih on 17 Jan 2006 22:25
> Is it possible to compile win32 programs with the ddk? Surely. Do this for more then a year. > Here is what I received from the standard 'HelloWorld' app of > the VC6 wizard: Here is the sample SOURCES file for main() based Unicode HelloWorld app: TARGETNAME=myapp TARGETPATH=bin TARGETTYPE=PROGRAM UMTYPE=console UMENTRY=wmain UMBASE=0x10000000 USE_MSVCRT=1 USE_PDB=1 MSC_WARNING_LEVEL=/W4 !IF !$(FREEBUILD) MSC_OPTIMIZATION=/Od !ENDIF TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib $(SDK_LIB_PATH)\user32.lib SOURCES=myfile.c -- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation maxim(a)storagecraft.com http://www.storagecraft.com |