Home > Archive > Visual Studio > May 2006 > An old problem - can't unregister ATL control
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
An old problem - can't unregister ATL control
|
|
| Steve Alpert 2005-01-10, 4:00 pm |
| Using .Net 2003:
1. Create an ATL project (non-attributed) and take all defaults
(BadReg)
2. Add at ATL Control (take all defaults)
(Test)
3. Build and see that it can be registered and unregistered
4. Add the following to the .RGS file for the control:
'Implemented Categories'
{
{7DD95801-9882-11CF-9FA9-00AA006C42C4}
{7DD95802-9882-11CF-9FA9-00AA006C42C4}
}
5. Build and see that the control can be registered BUT
If I try to unregister, I get: 0x80070005 (ACCESSDENIED)
Here is the trace. It seems like like the unregister code is trying to
delete the key 'Implemented Categories" BEFORE it removes the second
subkey: {7DD95802-9882-11CF-9FA9-00AA006C42C4}
I can implement object safety with the templates instead but this looks
like a bug in the underlying unregister code.
/steveA
Log follows:
HKCR
{
BadReg.Test.1 = s 'Test Class'
{
CLSID = s '{F2252E6A-0608-4D7B-A4BA-5CFBC350CD3F}'
}
BadReg.Test = s 'Test Class'
{
CLSID = s '{F2252E6A-0608-4D7B-A4BA-5CFBC350CD3F}'
CurVer = s 'BadReg.Test.1'
}
NoRemove CLSID
{
ForceRemove {F2252E6A-0608-4D7B-A4BA-5CFBC350CD3F} = s 'Test Class'
{
ProgID = s 'BadReg.Test.1'
VersionIndependentProgID = s 'BadReg.Test'
ForceRemove 'Programmable'
InprocServer32 = s 'c:\code\BadReg\debug\BadReg.dll'
{
val ThreadingModel = s 'Apartment'
}
val AppID = s '{69788C10-E61F-4212-B054-03344271916D}'
ForceRemove 'Control'
ForceRemove 'ToolboxBitmap32' = s 'c:\code\BadReg\debug\BadReg.dll, 102'
'MiscStatus' = s '0'
{
'1' = s '131473'
}
'TypeLib' = s '{2E9FF9E0-0042-40CF-8D9D-D4E9C607AD61}'
'Version' = s '1.0'
'Implemented Categories'
{
{7DD95801-9882-11CF-9FA9-00AA006C42C4}
{7DD95802-9882-11CF-9FA9-00AA006C42C4}
}
}
}
}
Deleting Key CLSID
Deleting Key BadReg.Test.1
Deleting Key CLSID
Deleting Key CurVer
Deleting Key BadReg.Test
Deleting Key ProgID
Deleting Key VersionIndependentProgID
Deleting Key Programmable
Deleting Key InprocServer32
Deleting Key Control
Deleting Key ToolboxBitmap32
Deleting Key 1
Deleting Key MiscStatus
Deleting Key TypeLib
Deleting Key Version
Deleting Key {7DD95801-9882-11CF-9FA9-00AA006C42C4}
Deleting Key Implemented Categories
'regsvr32.exe': Loaded 'C:\Program Files\Lotus\Sametime
Client\autoaway.dll', No symbols loaded.
'regsvr32.exe': Unloaded 'C:\code\BadReg\Debug\BadReg.dll'
'regsvr32.exe': Unloaded 'C:\WINDOWS\system32\msvcr71d.dll'
'regsvr32.exe': Unloaded 'C:\WINDOWS\system32\shlwapi.dll'
'regsvr32.exe': Unloaded 'C:\WINDOWS\system32\oleaut32.dll'
The thread 'Win32 Thread' (0x6a4) has exited with code 5 (0x5).
The program '[3348] regsvr32.exe: Native' has exited with code 5 (0x5).
--
Steve Alpert
my email Fgrir_Nycreg @ vqk.pbz is encrypted with ROT13 (www.rot13.org)
and spaces
| |
| nawash 2006-05-31, 3:17 am |
| Setting the RGS like this solves the problem :
NoRemove 'Implemented Categories'{
{7DD95801-9882-11CF-9FA9-00AA006C42C4}
}
'Implemented Categories'{
{7DD95802-9882-11CF-9FA9-00AA006C42C4}
}
quote: Originally posted by Steve Alpert
Using .Net 2003:
1. Create an ATL project (non-attributed) and take all defaults
(BadReg)
2. Add at ATL Control (take all defaults)
(Test)
3. Build and see that it can be registered and unregistered
4. Add the following to the .RGS file for the control:
'Implemented Categories'
{
{7DD95801-9882-11CF-9FA9-00AA006C42C4}
{7DD95802-9882-11CF-9FA9-00AA006C42C4}
}
5. Build and see that the control can be registered BUT
If I try to unregister, I get: 0x80070005 (ACCESSDENIED)
Here is the trace. It seems like like the unregister code is trying to
delete the key 'Implemented Categories" BEFORE it removes the second
subkey: {7DD95802-9882-11CF-9FA9-00AA006C42C4}
I can implement object safety with the templates instead but this looks
like a bug in the underlying unregister code.
/steveA
Log follows:
HKCR
{
BadReg.Test.1 = s 'Test Class'
{
CLSID = s '{F2252E6A-0608-4D7B-A4BA-5CFBC350CD3F}'
}
BadReg.Test = s 'Test Class'
{
CLSID = s '{F2252E6A-0608-4D7B-A4BA-5CFBC350CD3F}'
CurVer = s 'BadReg.Test.1'
}
NoRemove CLSID
{
ForceRemove {F2252E6A-0608-4D7B-A4BA-5CFBC350CD3F} = s 'Test Class'
{
ProgID = s 'BadReg.Test.1'
VersionIndependentProgID = s 'BadReg.Test'
ForceRemove 'Programmable'
InprocServer32 = s 'c:\code\BadReg\debug\BadReg.dll'
{
val ThreadingModel = s 'Apartment'
}
val AppID = s '{69788C10-E61F-4212-B054-03344271916D}'
ForceRemove 'Control'
ForceRemove 'ToolboxBitmap32' = s 'c:\code\BadReg\debug\BadReg.dll, 102'
'MiscStatus' = s '0'
{
'1' = s '131473'
}
'TypeLib' = s '{2E9FF9E0-0042-40CF-8D9D-D4E9C607AD61}'
'Version' = s '1.0'
'Implemented Categories'
{
{7DD95801-9882-11CF-9FA9-00AA006C42C4}
{7DD95802-9882-11CF-9FA9-00AA006C42C4}
}
}
}
}
Deleting Key CLSID
Deleting Key BadReg.Test.1
Deleting Key CLSID
Deleting Key CurVer
Deleting Key BadReg.Test
Deleting Key ProgID
Deleting Key VersionIndependentProgID
Deleting Key Programmable
Deleting Key InprocServer32
Deleting Key Control
Deleting Key ToolboxBitmap32
Deleting Key 1
Deleting Key MiscStatus
Deleting Key TypeLib
Deleting Key Version
Deleting Key {7DD95801-9882-11CF-9FA9-00AA006C42C4}
Deleting Key Implemented Categories
'regsvr32.exe': Loaded 'C:\Program Files\Lotus\Sametime
Client\autoaway.dll', No symbols loaded.
'regsvr32.exe': Unloaded 'C:\code\BadReg\Debug\BadReg.dll'
'regsvr32.exe': Unloaded 'C:\WINDOWS\system32\msvcr71d.dll'
'regsvr32.exe': Unloaded 'C:\WINDOWS\system32\shlwapi.dll'
'regsvr32.exe': Unloaded 'C:\WINDOWS\system32\oleaut32.dll'
The thread 'Win32 Thread' (0x6a4) has exited with code 5 (0x5).
The program '[3348] regsvr32.exe: Native' has exited with code 5 (0x5).
--
Steve Alpert
my email Fgrir_Nycreg @ vqk.pbz is encrypted with ROT13 (www.rot13.org)
and spaces
|
|
|
|
|