Oxygen Basic

Programming => Problems & Solutions => Topic started by: Peter on April 14, 2011, 02:36:58 PM

Title: PFD address Error
Post by: Peter on April 14, 2011, 02:36:58 PM
Deleted...
Title: Re: PFD address Error
Post by: Charles Pegge 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

Title: Re: PFD address Error
Post by: Charles Pegge 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
Title: Re: PFD address Error
Post by: Charles Pegge 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
Title: Re: PFD address Error
Post by: Charles Pegge 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