Using windows DWORD

Here is my error: error C2664: 'PCEOpen' : cannot convert parameter 2 from 'const DWORD *' to 'DWORD *'

The windows typedef for DWORD is unsigned long, which is being converted to a const for some reason.

This is how I declare parameter 2 as type DWORD in my header file:

class myclass : public GenericFilter /

DWORD detail_error; // PCE funtion detail rc


I then pass detail_error to the function PCEOpen within the .cpp:
PCEsm = PCEOpen( &hMapFile, &detail_error);

Any ideas on why detail_error is a 'const DWORD*'
That's probably because the method which contains that line is const.
Last edited on
Thanks for the reply Athar. I tried to declare detail_error outside the method and received the following error: error C2166: l-value specifies const object
which is essentially the same error.

Conversely, Parameter 1 uses the windows type def HANDLE which is a void *HANDLE. When placed inside the method I get the same error as using DWORD; however, when placed outside the method, it doesn't declare it as a constant.
Last edited on
Topic archived. No new replies allowed.