Thread: byte array to lpbyte conversion

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    5

    byte array to lpbyte conversion

    May I know if anyone can help me on this issue? I'm trying to use a function in DLL library that requires LPBYTE data type parameters. So, what I can provide is just byte array a.k.a characters. However, I'm having problem converting it to LPBYTE.

    Anyone o ut there having the same problem or have done this before?
    Please give me some tips. thank you.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    An LPBYTE appears to be a 'char *'. Typecast as appropriate, but it looks to just be a pointer to a character. Probably all you need to do is pass your array's name like you normally would.


    Quzah
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User SKeane's Avatar
    Join Date
    Sep 2006
    Location
    England
    Posts
    234
    LPBYTE is a Long Pointer to a BYTE (Windows terminology) which is effectively a pointer to an unsigned char.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple Byte Array problem
    By OldGit in forum Networking/Device Communication
    Replies: 8
    Last Post: 02-20-2009, 05:45 AM
  2. Class Template Trouble
    By pliang in forum C++ Programming
    Replies: 4
    Last Post: 04-21-2005, 04:15 AM
  3. Header File Question(s)
    By AQWst in forum C++ Programming
    Replies: 10
    Last Post: 12-23-2004, 11:31 PM
  4. ANSI C ASCII String to HEX byte array conversion
    By phyte in forum C Programming
    Replies: 10
    Last Post: 12-14-2004, 08:02 AM
  5. error: identifier "byte" is undefined.
    By Hulag in forum C++ Programming
    Replies: 4
    Last Post: 12-10-2003, 05:46 PM