Thread: Reinterpret_Cast in IF Block

  1. #1
    Registered User
    Join Date
    Nov 2002

    Reinterpret_Cast in IF Block

    Data Types:

    WCHAR AdapterName[8192];
    // Question 1: WCHAR is only a C datatype yes?
    ULONG AdapterLength = 4096;

    function prototype is:
    BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG BufferSize);

    envoking function via

    if(PacketGetAdapterNames(AdapterName,&AdapterLengt h)==FALSE)
    printf("Unable to retrieve the list of the adapters!\n");
    return -1;

    Visual C++ 6 error is
    types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

    how do i insert such a cast in the condition of the if block?
    If i define WCHAR AdapterName as char AdapterName,
    app runs but
    not correctly..

    trying to port app from c to c++
    Last edited by GUI_XP; 11-29-2002 at 03:42 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  2. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  3. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM
  4. Replies: 4
    Last Post: 01-16-2002, 12:04 AM
  5. pointers
    By fanaonc in forum C Programming
    Replies: 3
    Last Post: 11-17-2001, 02:18 AM