K
Kerem Gümrükcü
Hi,
i have some interessting Situation here. I started to port my Application
to Windows Vista32/64 and i have some strange Situation there: On Windows
2000 and XP based System the call to SetupDiRemoveDevice(....) works just
fine, but on Windows Vista based System i get a INVALID_HANDLE Error
and the call fails. What i want to know is, to wich part this Error Code
belongs and
to what Parameter. The First Parameter is a handle to a device information
set
and the second is a pointer to SP_DEVINFO_DATA structure. Both Information
"seems" to be valid, since it hold data and no NULL or Zero Info or
something
weird. Since the first parameter is a handle, at first you will think:"Ok
thats it,
backtrack the variable", but the second pointer to SP_DEVINFO_DATA holds
a so called "opaque handle (DWORD)", a handle to a device instance. So which
one is invalid? Is there a simple way to check this, to check which one is
invalid?
The Application asks (while starting) for Elevation and accepts only a
"real"
administrator and wont start another way. So this is excluded. Addtionally
it
enables all possible privileges the User Token has, so this is also
excluded.
Maybe important to know is that the application calls everything from the
..NET
PInvoke Layer, but i had no problems so far,...it started on Vista (like
many many
other problems solved so far). The first thing that comes to mind is that
some sort
of security restriction breaks my design, but i think i would get a
ACCESS_DENIED or
something like YOU_ARE_NOT_ALLOWED_TO_USE_THIS_ERROR_CODE. Its just
a INVALID_HANDLE,...
Any help would be really great!
Regards
Kerem
i have some interessting Situation here. I started to port my Application
to Windows Vista32/64 and i have some strange Situation there: On Windows
2000 and XP based System the call to SetupDiRemoveDevice(....) works just
fine, but on Windows Vista based System i get a INVALID_HANDLE Error
and the call fails. What i want to know is, to wich part this Error Code
belongs and
to what Parameter. The First Parameter is a handle to a device information
set
and the second is a pointer to SP_DEVINFO_DATA structure. Both Information
"seems" to be valid, since it hold data and no NULL or Zero Info or
something
weird. Since the first parameter is a handle, at first you will think:"Ok
thats it,
backtrack the variable", but the second pointer to SP_DEVINFO_DATA holds
a so called "opaque handle (DWORD)", a handle to a device instance. So which
one is invalid? Is there a simple way to check this, to check which one is
invalid?
The Application asks (while starting) for Elevation and accepts only a
"real"
administrator and wont start another way. So this is excluded. Addtionally
it
enables all possible privileges the User Token has, so this is also
excluded.
Maybe important to know is that the application calls everything from the
..NET
PInvoke Layer, but i had no problems so far,...it started on Vista (like
many many
other problems solved so far). The first thing that comes to mind is that
some sort
of security restriction breaks my design, but i think i would get a
ACCESS_DENIED or
something like YOU_ARE_NOT_ALLOWED_TO_USE_THIS_ERROR_CODE. Its just
a INVALID_HANDLE,...
Any help would be really great!
Regards
Kerem