1. 程式人生 > >Printf %輸出格式

Printf %輸出格式

Format 
Specifies a pointer to the format string to print. The Format string supports all the printf-style formatting codes. However, the Unicode format codes (%C, %S, %lc, %ls, %wc, %ws, and %wZ) can only be used with IRQL = PASSIVE_LEVEL.

符號                                 格式說明符                                        型別
%c, %lc                           ANSI字元                                            char
%C, %wc                         寬字元                                                wchar_t
%d, %i                            十進位制有符號整數                                 int
%D                                  十進位制_int64                                       _int64
%L                                  十六進位制的LARGE_INTEGER               LARGE_INTEGER
%s, %ls                           NULL終止的ANSI字串                      char*
%S, %ws                        NULL終止的寬字串                           wchar_t*
%Z                                 ANSI_STRING字串
%wZ                              UNICODE_STRING字串
%u                                 十進位制的ULONG                                   ULONG
%x                                小寫字元十六進位制的ULONG                    ULONG
%X                                大寫字元十六進位制的ULONG                    ULONG
%p                                指標Pointer 32/64位