Re: Off-topic: Problem with a C func

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Sat, 8 Jul 2000 15:35:01 -0400, Darth Maul, aka Matt
<Uglyfish87 at HOTMAIL.COM> wrote:

>I just got a book recently, the "Win32 API Bible". It has tons of stuff in
>it from creating windows to error and exception handling, I've even made
>two programs that talk to each other with Windows thingies called atoms!
>I'm working on a library for using the registry. It's worked well so far
>except for one function: RegQueryValueEx. The problem is, I give it the
>exact parameters as shown in the book, but it either returns ERROR_BAD_
>PARAMETER or ERROR_FILE_NOT_FOUND, and I don't know why! I was hoping that
>maybe someone could help and show me what to pass it.
>

 Besure third parameter is set to ZERO

 RegQueryValueEx ( C_ULONG,   -- this has to be a handle to a key
                   C_POINTER, -- zero terminated string name of value
                   C_POINTER, -- always set to zero
                   C_POINTER, -- pointer buffer for a variable type
                   C_POINTER, -- pointer to buffer to receive data
                   C_POINTER )-- pointer to a variable buffer that
                              -- contains the sizeof above buffer in bytes.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu