LPCTSTR and HRESULT

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?R2Vvcmdl?=

    #1

    LPCTSTR and HRESULT

    Hello everyone,


    If I want to convert LPCTSTR and HRESULT to standard C/C++ data type (like
    char*, int, long, etc.), I am wondering what standard data types should I
    convert to be safe and do not lose and data precise?


    thanks in advance,
    George
  • David Wilkinson

    #2
    Re: LPCTSTR and HRESULT

    George wrote:
    Hello everyone,
    >
    >
    If I want to convert LPCTSTR and HRESULT to standard C/C++ data type (like
    char*, int, long, etc.), I am wondering what standard data types should I
    convert to be safe and do not lose and data precise?
    George:

    LPCTSTR is just a typedef for const TCHAR*.

    HRESULT I'm not sure, but it can be converted to an SCODE, which is a
    DWORD, which is unsigned int.


    --
    David Wilkinson
    Visual C++ MVP

    Comment

    • =?Utf-8?B?R2Vvcmdl?=

      #3
      Re: LPCTSTR and HRESULT

      Thanks David,


      I find in winnt.h, HRESULT is defined to long.


      regards,
      George

      "David Wilkinson" wrote:
      George wrote:
      Hello everyone,


      If I want to convert LPCTSTR and HRESULT to standard C/C++ data type (like
      char*, int, long, etc.), I am wondering what standard data types should I
      convert to be safe and do not lose and data precise?
      >
      George:
      >
      LPCTSTR is just a typedef for const TCHAR*.
      >
      HRESULT I'm not sure, but it can be converted to an SCODE, which is a
      DWORD, which is unsigned int.
      >
      >
      --
      David Wilkinson
      Visual C++ MVP
      >

      Comment

      Working...