Author Topic: PFD address Error  (Read 3439 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
PFD address Error
« on: April 14, 2011, 02:36:58 PM »
Deleted...
« Last Edit: May 05, 2015, 12:41:54 PM by Peter »

Charles Pegge

  • Guest
Re: PFD address Error
« Reply #1 on: April 14, 2011, 03:44:21 PM »

Hi Peter,

It could be several things. For example:

1: Declaration of ChoosePixelFormat

2: Is #case capital being used .. PFD pfd.

my ImgWin.inc uses #case capital for the C style headers and this can be disruptive if some of the symbol names are capitalised in some places but not others. I have had to rework some of my examples when adding imgwin/GDIplus for this reason.

Charles


Charles Pegge

  • Guest
Re: PFD address Error
« Reply #2 on: April 15, 2011, 07:03:31 AM »

Hi Peter,

I'm using low level GetClientRect in the GUI examples, and that expression works for them

May we see your code?

Charles

Charles Pegge

  • Guest
Re: PFD address Error
« Reply #3 on: April 16, 2011, 11:19:39 AM »

Hi Peter,

can you show me the full prototypes + code. I need the full works to investigate. Otherwise I'm only guessing.

Charles

Charles Pegge

  • Guest
Re: PFD address Error
« Reply #4 on: April 16, 2011, 12:53:27 PM »
I am not sure whether these are the problem:

If a prototype specifies a 'byref' parameter then the parameter should be passed as is. Not its '&' address. The compiler does that automatically.

If you need to pass a null pointer to a 'byref' parameter then you must not use '0'. Instead use 'byval 0' to force it! Otherwise the compiler will create a temp variable and store 0 in it then pass the address of the temp variable. This will often cause a GPF.

Charles