NO

Author Topic: DirectPlay8 problem?  (Read 4026 times)

Athlor

  • Guest
DirectPlay8 problem?
« on: March 08, 2005, 09:59:16 AM »
Hi,
  I came across a curious anomally working on my DirectPlay8 project. In this section:
Code: [Select]

  HRESULT hr;
  hr=dc->lpVtbl->Send(dc, &bufferDesc, 1, 0, NULL, &hAsync, 0);
  if (hr==S_OK || hr==DPNSUCCESS_PENDING)
  {              
    return S_OK;
  }
  return hr;
}

The 'IF' line generated an error that said:

  error #2182: '0x0e+' is a preprocessing number but an invalid integer constant.

I then looked at definition of DPNSUCCESS_PENDING in dplay8.h and saw:

  #define DPNSUCCESS_PENDING  MAKE_HRESULT(0,_DPN_FACILITY_CODE,(0x0e+_DPNHRESULT_BASE))

I put a space after the hex constant in the dplay8.h file and it worked perfectly. I don't if you'd consider that a problem of the compiler or the header file. There are a couple other similar definitions that I think would do the same thing like DPNSUCCESS_NOTEQUAL and DPNSUCCESS_EQUAL.

I just thought I had to tell you.  :D

Athlor

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
DirectPlay8 problem?
« Reply #1 on: March 08, 2005, 02:11:44 PM »
Thanks for the info. I have to look at it some more, but I think it's because C99 now allows hexadecimal floating-point numbers. It looks like the beginning of a fp number without the exponent. At the moment, it looks more like a header file problem...

Pelle
/Pelle