Board index » delphi » *RegEnumValue: Delphi is frustrating!

*RegEnumValue: Delphi is frustrating!

Has anyone ever called the API function RegEnumValue successfully in
Delphi?

Delphi is so frustrating the way it is halfheartedly integrated into
Windows 95.

First I tried to call RegEnumValue like any of the Reg* functions I'd
called successfully before, but the program wouldn't compile.  The
pointer to the string length was highlighted, and it complained of a
type incompatibility and that I should be passing an integer.
I finally gave up and decided that Delphi has the prototype wrong.

I then rolled my own prototype, after discovering that no documentation
anywhere existed about which DLL RegEnumValue was in. I finally did a
string search on the entire Windows system library for references to
it, and found it in a DLL I had never heard of.

Now, the string being passed back from RegEnumValue is being truncated!
Just the name, not the value. It is being truncated by the RegEnumValue
call somehow, because I print the string right after that call.

Scott

 

Re:*RegEnumValue: Delphi is frustrating!


Scott McMahan - Softbase Systems (softb...@mercury.interpath.com) wrote:
: Has anyone ever called the API function RegEnumValue successfully in
: Delphi?

Nevermind. This time, it was the API call, not Delphi! The API call
was the problem -- I was using one length variable for both strings,
and that DOES NOT WORK.

Scott

Other Threads