API calls in Windows XP

  • Thread starter Thread starter Alan A. Smith
  • Start date Start date
A

Alan A. Smith

My VB4 application uses a call of the API function
RegSetValueEx. This works in older versions of Windows
but returns an error code 5 in Windows XP. Any advice on
a work-around?
 
Looks like you do not have access to the registry key you are trying to set
(Error code 5 is 'Access is denied').

My VB4 application uses a call of the API function
RegSetValueEx. This works in older versions of Windows
but returns an error code 5 in Windows XP. Any advice on
a work-around?
 
Alan A. Smith said:
My VB4 application uses a call of the API function
RegSetValueEx. This works in older versions of Windows
but returns an error code 5 in Windows XP. Any advice on
a work-around?

The Windows API's can differ slightly among the
various versions of Windows. The most notorious
case of this I know of is ReadFile(). Usually, if you
read the documentation for an API carefully, you can
sort out what the differences are. Occasionally, some
of the differences are undocumented.

-- Bob Day
 
Back
Top