×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

Anyone knows the meaning of L in L"Hello! 32bit World"? Please see the C code inside.

#include <windows.h>

#if defined(_X86_)
#define TEST_STRING L"Hello! 32bit World"
#define CROSS_ACCESS KEY_WOW64_64KEY
#elif defined(_WIN64)
#define TEST_STRING L"Hello! 64bit World"
#define CROSS_ACCESS KEY_WOW64_32KEY
#endif

VOID
PrintRegistryValueKey(
HKEY hKeyParent,
PWCHAR KeyName,
DWORD dwAccessMask,
DWORD dwHiveFlag
)
{
DWORD dwState=0;
HKEY hKey;
WCHAR Buffer[MAX_PATH];
DWORD dwSize = sizeof (Buffer);
DWORD dwType;
DWORD dwRet;
....
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / Anyone knows the meaning of L in L"Hello! 32bit World"? Please see the C code inside.
    #include <windows.h>

    #if defined(_X86_)
    #define TEST_STRING L"Hello! 32bit World"
    #define CROSS_ACCESS KEY_WOW64_64KEY
    #elif defined(_WIN64)
    #define TEST_STRING L"Hello! 64bit World"
    #define CROSS_ACCESS KEY_WOW64_32KEY
    #endif

    VOID
    PrintRegistryValueKey(
    HKEY hKeyParent,
    PWCHAR KeyName,
    DWORD dwAccessMask,
    DWORD dwHiveFlag
    )
    {
    DWORD dwState=0;
    HKEY hKey;
    WCHAR Buffer[MAX_PATH];
    DWORD dwSize = sizeof (Buffer);
    DWORD dwType;
    DWORD dwRet;
    ....
    • L means wchar_t string constant. Each character has 2 bytes, e.g L'H' is 0x0048, L"H" is 0x00480000.
      • Thank you. You are right! Just verified in VC.