1. Off-topic: Problem with a C func
- Posted by "Darth Maul, aka Matt" <Uglyfish87 at HOTMAIL.COM> Jul 08, 2000
- 458 views
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. P.S. I noticed that if I give it a LONG and six POINTERs, it returns ERROR_BAD_PARAMETER. But if I pass it only 5 POINTERs, it returns ERROR_SUCCESS and the area where the value data should be has nothing but garbage.
2. Re: Off-topic: Problem with a C func
- Posted by "Thomas Parslow (PatRat)" <patrat at INAME.COM> Jul 08, 2000
- 445 views
- Last edited Jul 09, 2000
pi_3wzc.htm This should have the information you need Thomas Parslow (PatRat) ICQ #:26359483 Rat Software http://www.ratsoft.freeserve.co.uk/ Get paid to surf the web! http://members.tripod.co.uk/paid2surf/ ----- Original Message ----- From: Darth Maul, aka Matt <Uglyfish87 at HOTMAIL.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Saturday, July 08, 2000 8:35 PM Subject: Off-topic: Problem with a C func > 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. > > P.S. I noticed that if I give it a LONG and six POINTERs, it returns > ERROR_BAD_PARAMETER. But if I pass it only 5 POINTERs, it returns > ERROR_SUCCESS and the area where the value data should be has nothing but > garbage. >
3. Re: Off-topic: Problem with a C func
- Posted by Davi Tassinari de Figueiredo <davitf at USA.NET> Jul 09, 2000
- 453 views
Hi, I created a set of routines for accessing the Windows Registry some time ago; you might want to take a look at it (some routines use RegQueryValueExA). It is available from my Euphoria page at http://davitf.n3.net/ , in the "Misc libraries" section. I hope it helps! Regards, Davi Figueiredo davitf at usa.net > 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.
4. Re: Off-topic: Problem with a C func
- Posted by Bernie <xotron at PCOM.NET> Jul 09, 2000
- 440 views
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.
5. Re: Off-topic: Problem with a C func
- Posted by "Darth Maul, aka Matt" <Uglyfish87 at HOTMAIL.COM> Jul 16, 2000
- 430 views
Sadly, I did set the third parameter to 0 when I coded the func.