Re: Wrong type of char array

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Hi Thompson,

I am facing the exact same problem.
I am developing the GUI in C# and have a c++ .NET DLL.
I'm am also getting pdbcd->dbcc_name as only one character "\".
I would like to know if you have the solution to this?
I would appreciate the help.

Thanks
-M


Joe Thompson wrote:
*Hi,

I am using VS.net 2003 to write a managed C++ windows application.
My main form traps the WM_DEVICECHANGE message and calls a method in
my own
unmanaged class passing the wParam and lParam.
In the method, I cast the lParam to a PDEV_BROADCAST_DEVICEINTERFACE
like:

pdbcd = (PDEV_BROADCAST_DEVICEINTERFACE) lParam;

The problem I'm having is that the pdbcd->dbcc_name is only one
character "\".
If I look at it in memory, I can see what it should be
("\\?\USB#Vid_0
etc...") but it is twice as long and every other character is a 0
(("\.\.?.\.U.S.B.#.V.i.d._.0. etc...")).

I've tried the different Language option settings but they all seem
to work
the same. I guess I can live with it as long as I can get the
correct value
in after the cast.

Any ideas what I may be doing wrong or ways to fix it?

Thanks,
Joe *



--
mayuravb
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

.



Relevant Pages

  • Re: Development news catch-up
    ... to topline a new original movie for the cable channel, ... Does Ponce have the chops to be the lead/recurring character? ... 10-to-1 says this means a new cast. ... "Summerland") is the latest addition to the comedy pilot, ...
    (rec.arts.tv)
  • Re: The importance of Kid Vulcan as a new X-Man?
    ... successful addition to the X-Men cast, primarily as a new X-Man. ... character will be the one to break this rut. ... Will it be Kid Vulcan? ... He's set to be the driver of the first Brubaker written Uncanny X-Men ...
    (rec.arts.comics.marvel.xbooks)
  • Re: The importance of Kid Vulcan as a new X-Man?
    ... successful addition to the X-Men cast, primarily as a new X-Man. ... character will be the one to break this rut. ... Will it be Kid Vulcan? ... He's set to be the driver of the first Brubaker written Uncanny X-Men ...
    (rec.arts.comics.marvel.xbooks)
  • Re: The importance of Kid Vulcan as a new X-Man?
    ... successful addition to the X-Men cast, primarily as a new X-Man. ... character will be the one to break this rut. ... Will it be Kid Vulcan? ... he's going to be a member of the X-Men. ...
    (rec.arts.comics.marvel.xbooks)
  • Re: The importance of Kid Vulcan as a new X-Man?
    ... successful addition to the X-Men cast, primarily as a new X-Man. ... character will be the one to break this rut. ... Will it be Kid Vulcan? ... He's set to be the driver of the first Brubaker written Uncanny X-Men ...
    (rec.arts.comics.marvel.xbooks)