By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,640 Members | 1,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,640 IT Pros & Developers. It's quick & easy.

registering 64bit ATL COM dll error 0x80020009

P: n/a
I have built a 64bit ATL COM dll.

When i register the dll on IA64 windows Enterprise server 2003, i get
following error.

DllRegisterServer in mydll.dll failed.
Return code was : 0x80020009

The command i am using to register the dll is

c:\test>regsvr32 mydll.dll

I have verified that even for 64bit the regsvr is called regsvr32.exe
in system32 folder.

Winerror.h says the error is DISP_E_EXCEPTION
which is Exception occurred.

#define DISP_E_EXCEPTION _HRESULT_TYPEDEF_(0x80020009L)

Can this be any alignment issue that is triggering this exception ?

I have verified using dependency walker that all the files referenced
by the dll
exist on the machine.

32bit version of the DLL same works perfectly well on 32bit machines.

My build machine setup is :
1)Windows 2003 standard server (32 bit)
2)VC++ .NET 2003 (v7.1)
2)Platform SDK April 2003

The target machine is Itanium based HP Rx 2600 with Windows Enterprise
server 2003.

Any clues will be greatly appreciated.

Regards,
Vijay Chegu
//vijaycheguregsvrexception
Nov 16 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Run it under the debugger and see, "ntsd -lines regsvr32 mydll.dll"

--

Ken Wickes [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Vijay Chegu" <vi********@indiatimes.com> wrote in message
news:68**************************@posting.google.c om...
I have built a 64bit ATL COM dll.

When i register the dll on IA64 windows Enterprise server 2003, i get
following error.

DllRegisterServer in mydll.dll failed.
Return code was : 0x80020009

The command i am using to register the dll is

c:\test>regsvr32 mydll.dll

I have verified that even for 64bit the regsvr is called regsvr32.exe
in system32 folder.

Winerror.h says the error is DISP_E_EXCEPTION
which is Exception occurred.

#define DISP_E_EXCEPTION _HRESULT_TYPEDEF_(0x80020009L)

Can this be any alignment issue that is triggering this exception ?

I have verified using dependency walker that all the files referenced
by the dll
exist on the machine.

32bit version of the DLL same works perfectly well on 32bit machines.

My build machine setup is :
1)Windows 2003 standard server (32 bit)
2)VC++ .NET 2003 (v7.1)
2)Platform SDK April 2003

The target machine is Itanium based HP Rx 2600 with Windows Enterprise
server 2003.

Any clues will be greatly appreciated.

Regards,
Vijay Chegu
//vijaycheguregsvrexception

Nov 16 '05 #2

P: n/a
Hi Ken Wickes,

I have pasted the output obtained when i ran this command

c:\test\release>ntsd -lines regsvr32 mydll.dll

I couldnt make out any thing from the output :-(
I have pasted it below.

The dll is in the same folder from where i am executing this command.
But i see "The system cannot find the file specified." error.
Which file is it trying to find ?

When i ran
c:\test\release>regsvr32 mydll.dll

The error i get is not "file not found", so regsvr32 is definitely
able to find mydll.dll to register.

Can u kindly point me at some resources that can help me isolate the
problem ?

Thanx and Regards,
Vijay Chegu

------------->
Microsoft (R) Windows Debugger Version 5.2.3790.0
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: regsvr32 mydll.dll
The call to LoadLibrary(ext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(exts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(uext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(ntsdexts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
Symbol search path is: *** Invalid *** : Verify _NT_SYMBOL_PATH
setting
Executable search path is:
ModLoad: 00000000`01000000 00000000`01010000 regsvr32.exe
ModLoad: 00000000`77e70000 00000000`77ff4000 ntdll.dll
ModLoad: 00000000`77c90000 00000000`77e60000
C:\WINDOWS.0\system32\kernel32.dl
l
ModLoad: 000006fb`7faa0000 000006fb`7fb86000
C:\WINDOWS.0\system32\msvcrt.dll
ModLoad: 000006fb`7fe80000 000006fb`7ffe0000
C:\WINDOWS.0\system32\ADVAPI32.dl
l
ModLoad: 000006fb`7fc60000 000006fb`7fe74000
C:\WINDOWS.0\system32\RPCRT4.dll
ModLoad: 00000000`77b30000 00000000`77c8a000
C:\WINDOWS.0\system32\USER32.dll
ModLoad: 000006fb`7fb90000 000006fb`7fc5e000
C:\WINDOWS.0\system32\GDI32.dll
ModLoad: 000006fb`7e7b0000 000006fb`7eb20000
C:\WINDOWS.0\system32\ole32.dll
(328.6e8): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found. Defaulted to export
symbols for ntdl
l.dll -
ntdll!EtwpGetTraceBuffer+f4eb8:
Falcon EM Decoder xversion 9.60, api 9.6, emdb 1.2
00000000`77f6be58 break.i 80016

0:000>
<-------------

--------------
"Ken Wickes [MSFT]" <ke****@online.microsoft.com> wrote in message news:<eF**************@tk2msftngp13.phx.gbl>...
Run it under the debugger and see, "ntsd -lines regsvr32 mydll.dll"

--

Nov 16 '05 #3

P: n/a
the break below is the initial breakpoint on process startup.

Get the debugger package from the web (dor IA64)
http://www.microsoft.com/whdc/ddk/de...g/default.mspx
and set the symbols path as per the documentation.

Then run
c:\debuggers>start ntsd -g -G regsvr32.exe <FULL_PATH_TO_YOUR_DLL>

If everything is OK, the debugger will start and exit cleanly,
otherwise it will break for good. Please report the output of the
break-for-good.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Vijay Chegu" <vi********@indiatimes.com> wrote in message
news:68**************************@posting.google.c om...
Hi Ken Wickes,

I have pasted the output obtained when i ran this command

c:\test\release>ntsd -lines regsvr32 mydll.dll

I couldnt make out any thing from the output :-(
I have pasted it below.

The dll is in the same folder from where i am executing this command.
But i see "The system cannot find the file specified." error.
Which file is it trying to find ?

When i ran
c:\test\release>regsvr32 mydll.dll

The error i get is not "file not found", so regsvr32 is definitely
able to find mydll.dll to register.

Can u kindly point me at some resources that can help me isolate the
problem ?

Thanx and Regards,
Vijay Chegu

------------->
Microsoft (R) Windows Debugger Version 5.2.3790.0
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: regsvr32 mydll.dll
The call to LoadLibrary(ext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(exts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(uext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(ntsdexts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
Symbol search path is: *** Invalid *** : Verify _NT_SYMBOL_PATH
setting
Executable search path is:
ModLoad: 00000000`01000000 00000000`01010000 regsvr32.exe
ModLoad: 00000000`77e70000 00000000`77ff4000 ntdll.dll
ModLoad: 00000000`77c90000 00000000`77e60000
C:\WINDOWS.0\system32\kernel32.dl
l
ModLoad: 000006fb`7faa0000 000006fb`7fb86000
C:\WINDOWS.0\system32\msvcrt.dll
ModLoad: 000006fb`7fe80000 000006fb`7ffe0000
C:\WINDOWS.0\system32\ADVAPI32.dl
l
ModLoad: 000006fb`7fc60000 000006fb`7fe74000
C:\WINDOWS.0\system32\RPCRT4.dll
ModLoad: 00000000`77b30000 00000000`77c8a000
C:\WINDOWS.0\system32\USER32.dll
ModLoad: 000006fb`7fb90000 000006fb`7fc5e000
C:\WINDOWS.0\system32\GDI32.dll
ModLoad: 000006fb`7e7b0000 000006fb`7eb20000
C:\WINDOWS.0\system32\ole32.dll
(328.6e8): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found. Defaulted to export
symbols for ntdl
l.dll -
ntdll!EtwpGetTraceBuffer+f4eb8:
Falcon EM Decoder xversion 9.60, api 9.6, emdb 1.2
00000000`77f6be58 break.i 80016

0:000>
<-------------

--------------
"Ken Wickes [MSFT]" <ke****@online.microsoft.com> wrote in message

news:<eF**************@tk2msftngp13.phx.gbl>...
Run it under the debugger and see, "ntsd -lines regsvr32 mydll.dll"

--

Nov 16 '05 #4

P: n/a
I ran ntsd on IA64 machine. I have used debug build.
I have copied the MFC related debug files also in the directory.
Trace statments from my program are preceeded by --->.

The actual dll is xena.dll, which uses xenautil.dll which is also in
the local folder. dependency walker shows no problem when i open
xena.dll.

Here is the output.

c:\>start ntsd -g -G regsvr32.exe c:\test\dbg\xena.dll

Microsoft (R) Windows Debugger Version 5.2.3790.0
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: regsvr32.exe c:\test\dbg\xena.dll
The call to LoadLibrary(ext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(exts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(uext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(ntsdexts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
Symbol search path is: *** Invalid *** : Verify _NT_SYMBOL_PATH
setting
Executable search path is:
ModLoad: 00000000`01000000 00000000`01010000 regsvr32.exe
ModLoad: 00000000`77e70000 00000000`77ff4000 ntdll.dll
ModLoad: 00000000`77c90000 00000000`77e60000
C:\WINDOWS.0\system32\kernel32.dl
l
ModLoad: 000006fb`7faa0000 000006fb`7fb86000
C:\WINDOWS.0\system32\msvcrt.dll
ModLoad: 000006fb`7fe80000 000006fb`7ffe0000
C:\WINDOWS.0\system32\ADVAPI32.dl
l
ModLoad: 000006fb`7fc60000 000006fb`7fe74000
C:\WINDOWS.0\system32\RPCRT4.dll
ModLoad: 00000000`77b30000 00000000`77c8a000
C:\WINDOWS.0\system32\USER32.dll
ModLoad: 000006fb`7fb90000 000006fb`7fc5e000
C:\WINDOWS.0\system32\GDI32.dll
ModLoad: 000006fb`7e7b0000 000006fb`7eb20000
C:\WINDOWS.0\system32\ole32.dll
ModLoad: 00000000`10000000 00000000`100c4000 c:\test\dbg\xena.dll
ModLoad: 000006fb`ff320000 000006fb`ff3a8000 c:\test\dbg\xenapd.dll
ModLoad: 000006fb`ff2f0000 000006fb`ff31e000
c:\test\dbg\xenautil.dll
ModLoad: 000006fb`7dbb0000 000006fb`7dbf4000
C:\WINDOWS.0\system32\iphlpapi.dl
l
ModLoad: 000006fb`73b60000 000006fb`73ba4000
C:\WINDOWS.0\system32\WS2_32.dll
ModLoad: 000006fb`73b40000 000006fb`73b5a000
C:\WINDOWS.0\system32\WS2HELP.dll

ModLoad: 00000000`5f800000 00000000`5fbe0000 c:\test\dbg\MFC42uD.DLL
ModLoad: 00000000`10200000 00000000`103e0000 c:\test\dbg\MSVCRTD.dll
ModLoad: 00000000`5f600000 00000000`5f628000
c:\test\dbg\MFCN42uD.DLL
ModLoad: 000006fb`73ac0000 000006fb`73ad0000
C:\WINDOWS.0\system32\WSOCK32.dll

ModLoad: 000006fb`7e410000 000006fb`7e7aa000
C:\WINDOWS.0\system32\OLEAUT32.dl
l
ModLoad: 00000000`10480000 00000000`1061a000
c:\test\dbg\MSVCP60D.dll
ModLoad: 000006fb`7cc70000 000006fb`7ce5e000
C:\WINDOWS.0\system32\SETUPAPI.dl
l
ModLoad: 000006fb`fefe0000 000006fb`ff2ee000
c:\test\dbg\MFCO42uD.DLL
ModLoad: 000006fb`792f0000 000006fb`79342000
C:\WINDOWS.0\system32\oledlg.dll
ModLoad: 000006fb`7c050000 000006fb`7c198000
C:\WINDOWS.0\system32\urlmon.dll
ModLoad: 000006fb`7eb30000 000006fb`7ebec000
C:\WINDOWS.0\system32\SHLWAPI.dll
ModLoad: 000006fb`7fa80000 000006fb`7fa98000
C:\WINDOWS.0\system32\VERSION.dll
ModLoad: 000006fb`7ed90000 000006fb`7fa0a000
C:\WINDOWS.0\system32\SHELL32.dll
ModLoad: 000006fb`7d670000 000006fb`7d6d2000
C:\WINDOWS.0\system32\ATL.DLL
--->Xenautil.dll Initializing!
ModLoad: 000006fb`72370000 000006fb`725a8000
C:\WINDOWS.0\WinSxS\ia64_Microsof
t.Windows.Common-Controls_6595b64144ccf1df_6.0.100.0_x-ww_B3722BAB\comctl32.dll
--->InitInstance
--->DllRegisterServer
--->About to call _Module.RegisterServer(FALSE)
ModLoad: 000006fb`7e1f0000 000006fb`7e338000
C:\WINDOWS.0\system32\CLBCatQ.DLL
ModLoad: 000006fb`7e340000 000006fb`7e40c000
C:\WINDOWS.0\system32\COMRes.dll

Dialog box pops up saying
DllRegisterServer in c:\test\dbg\xena.dll failed
Return code was : 0x80020009

Thanx and Regards,
Vijay Chegu
"Ivan Brugiolo [MSFT]" <iv******@online.microsoft.com> wrote in message news:<#w**************@TK2MSFTNGP11.phx.gbl>...
the break below is the initial breakpoint on process startup.

Get the debugger package from the web (dor IA64)
http://www.microsoft.com/whdc/ddk/de...g/default.mspx
and set the symbols path as per the documentation.

Then run
c:\debuggers>start ntsd -g -G regsvr32.exe <FULL_PATH_TO_YOUR_DLL>

If everything is OK, the debugger will start and exit cleanly,
otherwise it will break for good. Please report the output of the
break-for-good.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 16 '05 #5

P: n/a
You will have to debug the DllRegisterServer() till you get
to the point where the error 0x80020009 is generated.
There is nothing informative and no break below.
Looks like is coming from the SetErrorInfo wrapper offered by ATL.
Do you do anything special besides registry manipulation in your
RegisterServer ?

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Vijay Chegu" <vi********@indiatimes.com> wrote in message
news:68**************************@posting.google.c om...
I ran ntsd on IA64 machine. I have used debug build.
I have copied the MFC related debug files also in the directory.
Trace statments from my program are preceeded by --->.

The actual dll is xena.dll, which uses xenautil.dll which is also in
the local folder. dependency walker shows no problem when i open
xena.dll.

Here is the output.

c:\>start ntsd -g -G regsvr32.exe c:\test\dbg\xena.dll

Microsoft (R) Windows Debugger Version 5.2.3790.0
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: regsvr32.exe c:\test\dbg\xena.dll
The call to LoadLibrary(ext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(exts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(uext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(ntsdexts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
Symbol search path is: *** Invalid *** : Verify _NT_SYMBOL_PATH
setting
Executable search path is:
ModLoad: 00000000`01000000 00000000`01010000 regsvr32.exe
ModLoad: 00000000`77e70000 00000000`77ff4000 ntdll.dll
ModLoad: 00000000`77c90000 00000000`77e60000
C:\WINDOWS.0\system32\kernel32.dl
l
ModLoad: 000006fb`7faa0000 000006fb`7fb86000
C:\WINDOWS.0\system32\msvcrt.dll
ModLoad: 000006fb`7fe80000 000006fb`7ffe0000
C:\WINDOWS.0\system32\ADVAPI32.dl
l
ModLoad: 000006fb`7fc60000 000006fb`7fe74000
C:\WINDOWS.0\system32\RPCRT4.dll
ModLoad: 00000000`77b30000 00000000`77c8a000
C:\WINDOWS.0\system32\USER32.dll
ModLoad: 000006fb`7fb90000 000006fb`7fc5e000
C:\WINDOWS.0\system32\GDI32.dll
ModLoad: 000006fb`7e7b0000 000006fb`7eb20000
C:\WINDOWS.0\system32\ole32.dll
ModLoad: 00000000`10000000 00000000`100c4000 c:\test\dbg\xena.dll
ModLoad: 000006fb`ff320000 000006fb`ff3a8000 c:\test\dbg\xenapd.dll
ModLoad: 000006fb`ff2f0000 000006fb`ff31e000
c:\test\dbg\xenautil.dll
ModLoad: 000006fb`7dbb0000 000006fb`7dbf4000
C:\WINDOWS.0\system32\iphlpapi.dl
l
ModLoad: 000006fb`73b60000 000006fb`73ba4000
C:\WINDOWS.0\system32\WS2_32.dll
ModLoad: 000006fb`73b40000 000006fb`73b5a000
C:\WINDOWS.0\system32\WS2HELP.dll

ModLoad: 00000000`5f800000 00000000`5fbe0000 c:\test\dbg\MFC42uD.DLL
ModLoad: 00000000`10200000 00000000`103e0000 c:\test\dbg\MSVCRTD.dll
ModLoad: 00000000`5f600000 00000000`5f628000
c:\test\dbg\MFCN42uD.DLL
ModLoad: 000006fb`73ac0000 000006fb`73ad0000
C:\WINDOWS.0\system32\WSOCK32.dll

ModLoad: 000006fb`7e410000 000006fb`7e7aa000
C:\WINDOWS.0\system32\OLEAUT32.dl
l
ModLoad: 00000000`10480000 00000000`1061a000
c:\test\dbg\MSVCP60D.dll
ModLoad: 000006fb`7cc70000 000006fb`7ce5e000
C:\WINDOWS.0\system32\SETUPAPI.dl
l
ModLoad: 000006fb`fefe0000 000006fb`ff2ee000
c:\test\dbg\MFCO42uD.DLL
ModLoad: 000006fb`792f0000 000006fb`79342000
C:\WINDOWS.0\system32\oledlg.dll
ModLoad: 000006fb`7c050000 000006fb`7c198000
C:\WINDOWS.0\system32\urlmon.dll
ModLoad: 000006fb`7eb30000 000006fb`7ebec000
C:\WINDOWS.0\system32\SHLWAPI.dll
ModLoad: 000006fb`7fa80000 000006fb`7fa98000
C:\WINDOWS.0\system32\VERSION.dll
ModLoad: 000006fb`7ed90000 000006fb`7fa0a000
C:\WINDOWS.0\system32\SHELL32.dll
ModLoad: 000006fb`7d670000 000006fb`7d6d2000
C:\WINDOWS.0\system32\ATL.DLL
--->Xenautil.dll Initializing!
ModLoad: 000006fb`72370000 000006fb`725a8000
C:\WINDOWS.0\WinSxS\ia64_Microsof
t.Windows.Common-Controls_6595b64144ccf1df_6.0.100.0_x-ww_B3722BAB\comctl32.
dll --->InitInstance
--->DllRegisterServer
--->About to call _Module.RegisterServer(FALSE)
ModLoad: 000006fb`7e1f0000 000006fb`7e338000
C:\WINDOWS.0\system32\CLBCatQ.DLL
ModLoad: 000006fb`7e340000 000006fb`7e40c000
C:\WINDOWS.0\system32\COMRes.dll

Dialog box pops up saying
DllRegisterServer in c:\test\dbg\xena.dll failed
Return code was : 0x80020009

Thanx and Regards,
Vijay Chegu
"Ivan Brugiolo [MSFT]" <iv******@online.microsoft.com> wrote in message

news:<#w**************@TK2MSFTNGP11.phx.gbl>...
the break below is the initial breakpoint on process startup.

Get the debugger package from the web (dor IA64)
http://www.microsoft.com/whdc/ddk/de...g/default.mspx
and set the symbols path as per the documentation.

Then run
c:\debuggers>start ntsd -g -G regsvr32.exe <FULL_PATH_TO_YOUR_DLL>

If everything is OK, the debugger will start and exit cleanly,
otherwise it will break for good. Please report the output of the
break-for-good.
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 16 '05 #6

P: n/a
Hi Ivan Brugiolo,

Following is my dllregisterserver function.
STDAPI DllRegisterServer(void)
{
OutputDebugString(_T("DllRegisterServer"));
OutputDebugString(_T("About to call
_Module.RegisterServer(FALSE)"));

HRESULT hr = _Module.RegisterServer(FALSE);

return hr;
}

I do not do any additional processing in this method.

I have installed 64bit native windbg on IA64bit machine.
This allows me to debug the regsvr32 xena.dll.

bcoz i do not have chkbuild IA64 OS, the debugger will continue in
assembly code. Advice me on how i can get to the root of the bug. If i
configure intenet symbol server for windbg will i be able to view more
information ?

Thanx a lot for the follow up.

Regards,
Vijay Chegu
"Ivan Brugiolo [MSFT]" <iv******@online.microsoft.com> wrote in message news:<ep*************@TK2MSFTNGP10.phx.gbl>...
You will have to debug the DllRegisterServer() till you get
to the point where the error 0x80020009 is generated.
There is nothing informative and no break below.
Looks like is coming from the SetErrorInfo wrapper offered by ATL.
Do you do anything special besides registry manipulation in your
RegisterServer ?

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Vijay Chegu" <vi********@indiatimes.com> wrote in message
news:68**************************@posting.google.c om...
I ran ntsd on IA64 machine. I have used debug build.
I have copied the MFC related debug files also in the directory.
Trace statments from my program are preceeded by --->.

The actual dll is xena.dll, which uses xenautil.dll which is also in
the local folder. dependency walker shows no problem when i open
xena.dll.

Here is the output.

c:\>start ntsd -g -G regsvr32.exe c:\test\dbg\xena.dll

Microsoft (R) Windows Debugger Version 5.2.3790.0
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: regsvr32.exe c:\test\dbg\xena.dll
The call to LoadLibrary(ext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(exts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(uext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(ntsdexts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
Symbol search path is: *** Invalid *** : Verify _NT_SYMBOL_PATH
setting
Executable search path is:
ModLoad: 00000000`01000000 00000000`01010000 regsvr32.exe
ModLoad: 00000000`77e70000 00000000`77ff4000 ntdll.dll
ModLoad: 00000000`77c90000 00000000`77e60000
C:\WINDOWS.0\system32\kernel32.dl
l
ModLoad: 000006fb`7faa0000 000006fb`7fb86000
C:\WINDOWS.0\system32\msvcrt.dll
ModLoad: 000006fb`7fe80000 000006fb`7ffe0000
C:\WINDOWS.0\system32\ADVAPI32.dl
l
ModLoad: 000006fb`7fc60000 000006fb`7fe74000
C:\WINDOWS.0\system32\RPCRT4.dll
ModLoad: 00000000`77b30000 00000000`77c8a000
C:\WINDOWS.0\system32\USER32.dll
ModLoad: 000006fb`7fb90000 000006fb`7fc5e000
C:\WINDOWS.0\system32\GDI32.dll
ModLoad: 000006fb`7e7b0000 000006fb`7eb20000
C:\WINDOWS.0\system32\ole32.dll
ModLoad: 00000000`10000000 00000000`100c4000 c:\test\dbg\xena.dll
ModLoad: 000006fb`ff320000 000006fb`ff3a8000 c:\test\dbg\xenapd.dll
ModLoad: 000006fb`ff2f0000 000006fb`ff31e000
c:\test\dbg\xenautil.dll
ModLoad: 000006fb`7dbb0000 000006fb`7dbf4000
C:\WINDOWS.0\system32\iphlpapi.dl
l
ModLoad: 000006fb`73b60000 000006fb`73ba4000
C:\WINDOWS.0\system32\WS2_32.dll
ModLoad: 000006fb`73b40000 000006fb`73b5a000
C:\WINDOWS.0\system32\WS2HELP.dll

ModLoad: 00000000`5f800000 00000000`5fbe0000 c:\test\dbg\MFC42uD.DLL
ModLoad: 00000000`10200000 00000000`103e0000 c:\test\dbg\MSVCRTD.dll
ModLoad: 00000000`5f600000 00000000`5f628000
c:\test\dbg\MFCN42uD.DLL
ModLoad: 000006fb`73ac0000 000006fb`73ad0000
C:\WINDOWS.0\system32\WSOCK32.dll

ModLoad: 000006fb`7e410000 000006fb`7e7aa000
C:\WINDOWS.0\system32\OLEAUT32.dl
l
ModLoad: 00000000`10480000 00000000`1061a000
c:\test\dbg\MSVCP60D.dll
ModLoad: 000006fb`7cc70000 000006fb`7ce5e000
C:\WINDOWS.0\system32\SETUPAPI.dl
l
ModLoad: 000006fb`fefe0000 000006fb`ff2ee000
c:\test\dbg\MFCO42uD.DLL
ModLoad: 000006fb`792f0000 000006fb`79342000
C:\WINDOWS.0\system32\oledlg.dll
ModLoad: 000006fb`7c050000 000006fb`7c198000
C:\WINDOWS.0\system32\urlmon.dll
ModLoad: 000006fb`7eb30000 000006fb`7ebec000
C:\WINDOWS.0\system32\SHLWAPI.dll
ModLoad: 000006fb`7fa80000 000006fb`7fa98000
C:\WINDOWS.0\system32\VERSION.dll
ModLoad: 000006fb`7ed90000 000006fb`7fa0a000
C:\WINDOWS.0\system32\SHELL32.dll
ModLoad: 000006fb`7d670000 000006fb`7d6d2000
C:\WINDOWS.0\system32\ATL.DLL
--->Xenautil.dll Initializing!
ModLoad: 000006fb`72370000 000006fb`725a8000
C:\WINDOWS.0\WinSxS\ia64_Microsof

t.Windows.Common-Controls_6595b64144ccf1df_6.0.100.0_x-ww_B3722BAB\comctl32.
dll
--->InitInstance
--->DllRegisterServer
--->About to call _Module.RegisterServer(FALSE)
ModLoad: 000006fb`7e1f0000 000006fb`7e338000
C:\WINDOWS.0\system32\CLBCatQ.DLL
ModLoad: 000006fb`7e340000 000006fb`7e40c000
C:\WINDOWS.0\system32\COMRes.dll

Dialog box pops up saying
DllRegisterServer in c:\test\dbg\xena.dll failed
Return code was : 0x80020009

Thanx and Regards,
Vijay Chegu
"Ivan Brugiolo [MSFT]" <iv******@online.microsoft.com> wrote in message

news:<#w**************@TK2MSFTNGP11.phx.gbl>...
the break below is the initial breakpoint on process startup.

Get the debugger package from the web (dor IA64)
http://www.microsoft.com/whdc/ddk/de...g/default.mspx
and set the symbols path as per the documentation.

Then run
c:\debuggers>start ntsd -g -G regsvr32.exe <FULL_PATH_TO_YOUR_DLL>

If everything is OK, the debugger will start and exit cleanly,
otherwise it will break for good. Please report the output of the
break-for-good.
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 16 '05 #7

P: n/a
Isn't ATL code supplied in all the major SDK/MSDN/Visual Studio packages ?
The ATL registration code takes it's "parameter" from a set of globals
that are filled in my a set of macro. This accounr the same generated code
to work
for scriptable com component, services, plain com component and few other
cases.

The symbols for WinDbg will not get you to the source code for ATL,
but if you have the source code for ATL you can use the .srcpath command
in Windbg/cdb/ntsd and then the 'lsa' command to see where you are.

In any case, you can follow the code flow without symbols.
the ia64 assembly uses 'br.<completer>.call' to make a call through the bX
branch registers,
and the return value from a call is stored in r8.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Vijay Chegu" <vi********@indiatimes.com> wrote in message
news:68**************************@posting.google.c om...
Hi Ivan Brugiolo,

Following is my dllregisterserver function.
STDAPI DllRegisterServer(void)
{
OutputDebugString(_T("DllRegisterServer"));
OutputDebugString(_T("About to call
_Module.RegisterServer(FALSE)"));

HRESULT hr = _Module.RegisterServer(FALSE);

return hr;
}

I do not do any additional processing in this method.

I have installed 64bit native windbg on IA64bit machine.
This allows me to debug the regsvr32 xena.dll.

bcoz i do not have chkbuild IA64 OS, the debugger will continue in
assembly code. Advice me on how i can get to the root of the bug. If i
configure intenet symbol server for windbg will i be able to view more
information ?

Thanx a lot for the follow up.

Regards,
Vijay Chegu
"Ivan Brugiolo [MSFT]" <iv******@online.microsoft.com> wrote in message

news:<ep*************@TK2MSFTNGP10.phx.gbl>...
You will have to debug the DllRegisterServer() till you get
to the point where the error 0x80020009 is generated.
There is nothing informative and no break below.
Looks like is coming from the SetErrorInfo wrapper offered by ATL.
Do you do anything special besides registry manipulation in your
RegisterServer ?

--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Vijay Chegu" <vi********@indiatimes.com> wrote in message
news:68**************************@posting.google.c om...
I ran ntsd on IA64 machine. I have used debug build.
I have copied the MFC related debug files also in the directory.
Trace statments from my program are preceeded by --->.

The actual dll is xena.dll, which uses xenautil.dll which is also in
the local folder. dependency walker shows no problem when i open
xena.dll.

Here is the output.

c:\>start ntsd -g -G regsvr32.exe c:\test\dbg\xena.dll

Microsoft (R) Windows Debugger Version 5.2.3790.0
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: regsvr32.exe c:\test\dbg\xena.dll
The call to LoadLibrary(ext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(exts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(uext) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(ntsdexts) failed, Win32 error 2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
Symbol search path is: *** Invalid *** : Verify _NT_SYMBOL_PATH
setting
Executable search path is:
ModLoad: 00000000`01000000 00000000`01010000 regsvr32.exe
ModLoad: 00000000`77e70000 00000000`77ff4000 ntdll.dll
ModLoad: 00000000`77c90000 00000000`77e60000
C:\WINDOWS.0\system32\kernel32.dl
l
ModLoad: 000006fb`7faa0000 000006fb`7fb86000
C:\WINDOWS.0\system32\msvcrt.dll
ModLoad: 000006fb`7fe80000 000006fb`7ffe0000
C:\WINDOWS.0\system32\ADVAPI32.dl
l
ModLoad: 000006fb`7fc60000 000006fb`7fe74000
C:\WINDOWS.0\system32\RPCRT4.dll
ModLoad: 00000000`77b30000 00000000`77c8a000
C:\WINDOWS.0\system32\USER32.dll
ModLoad: 000006fb`7fb90000 000006fb`7fc5e000
C:\WINDOWS.0\system32\GDI32.dll
ModLoad: 000006fb`7e7b0000 000006fb`7eb20000
C:\WINDOWS.0\system32\ole32.dll
ModLoad: 00000000`10000000 00000000`100c4000 c:\test\dbg\xena.dll
ModLoad: 000006fb`ff320000 000006fb`ff3a8000 c:\test\dbg\xenapd.dll
ModLoad: 000006fb`ff2f0000 000006fb`ff31e000
c:\test\dbg\xenautil.dll
ModLoad: 000006fb`7dbb0000 000006fb`7dbf4000
C:\WINDOWS.0\system32\iphlpapi.dl
l
ModLoad: 000006fb`73b60000 000006fb`73ba4000
C:\WINDOWS.0\system32\WS2_32.dll
ModLoad: 000006fb`73b40000 000006fb`73b5a000
C:\WINDOWS.0\system32\WS2HELP.dll

ModLoad: 00000000`5f800000 00000000`5fbe0000 c:\test\dbg\MFC42uD.DLL
ModLoad: 00000000`10200000 00000000`103e0000 c:\test\dbg\MSVCRTD.dll
ModLoad: 00000000`5f600000 00000000`5f628000
c:\test\dbg\MFCN42uD.DLL
ModLoad: 000006fb`73ac0000 000006fb`73ad0000
C:\WINDOWS.0\system32\WSOCK32.dll

ModLoad: 000006fb`7e410000 000006fb`7e7aa000
C:\WINDOWS.0\system32\OLEAUT32.dl
l
ModLoad: 00000000`10480000 00000000`1061a000
c:\test\dbg\MSVCP60D.dll
ModLoad: 000006fb`7cc70000 000006fb`7ce5e000
C:\WINDOWS.0\system32\SETUPAPI.dl
l
ModLoad: 000006fb`fefe0000 000006fb`ff2ee000
c:\test\dbg\MFCO42uD.DLL
ModLoad: 000006fb`792f0000 000006fb`79342000
C:\WINDOWS.0\system32\oledlg.dll
ModLoad: 000006fb`7c050000 000006fb`7c198000
C:\WINDOWS.0\system32\urlmon.dll
ModLoad: 000006fb`7eb30000 000006fb`7ebec000
C:\WINDOWS.0\system32\SHLWAPI.dll
ModLoad: 000006fb`7fa80000 000006fb`7fa98000
C:\WINDOWS.0\system32\VERSION.dll
ModLoad: 000006fb`7ed90000 000006fb`7fa0a000
C:\WINDOWS.0\system32\SHELL32.dll
ModLoad: 000006fb`7d670000 000006fb`7d6d2000
C:\WINDOWS.0\system32\ATL.DLL
--->Xenautil.dll Initializing!
ModLoad: 000006fb`72370000 000006fb`725a8000
C:\WINDOWS.0\WinSxS\ia64_Microsof

t.Windows.Common-Controls_6595b64144ccf1df_6.0.100.0_x-ww_B3722BAB\comctl32. dll
--->InitInstance
--->DllRegisterServer
--->About to call _Module.RegisterServer(FALSE)
ModLoad: 000006fb`7e1f0000 000006fb`7e338000
C:\WINDOWS.0\system32\CLBCatQ.DLL
ModLoad: 000006fb`7e340000 000006fb`7e40c000
C:\WINDOWS.0\system32\COMRes.dll

Dialog box pops up saying
DllRegisterServer in c:\test\dbg\xena.dll failed
Return code was : 0x80020009

Thanx and Regards,
Vijay Chegu
"Ivan Brugiolo [MSFT]" <iv******@online.microsoft.com> wrote in message
news:<#w**************@TK2MSFTNGP11.phx.gbl>...
> the break below is the initial breakpoint on process startup.
>
> Get the debugger package from the web (dor IA64)
> http://www.microsoft.com/whdc/ddk/de...g/default.mspx
> and set the symbols path as per the documentation.
>
> Then run
> c:\debuggers>start ntsd -g -G regsvr32.exe <FULL_PATH_TO_YOUR_DLL>
>
> If everything is OK, the debugger will start and exit cleanly,
> otherwise it will break for good. Please report the output of the
> break-for-good.
> --
> This posting is provided "AS IS" with no warranties, and confers no

rights.
> Use of any included script samples are subject to the terms

specified at > http://www.microsoft.com/info/cpyright.htm

Nov 16 '05 #8

P: n/a
what's the return value from xena!NetConfig::UpdateRegistry ?

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Vijay Chegu" <vi********@indiatimes.com> wrote in message
news:68**************************@posting.google.c om...
Hi Ivan Brugiolo,

I installed 64bit windbg. But the source file it opens and points when
i enter the method
HRESULT hr = _Module.RegisterServer(FALSE);

is a weird line in atlbase.h.

So i had to do a remote debugging and connect to 64bit-windbg on 64bit
machine from a 32bit machine+32bit windbg. Then it actually opened
correct method in atlbase.h on my 32bit machine. Ofcourse i have set
the path to correct 64bit files.

I trace i can see follwing methods are called while dllregisterserver
is executing.

1)xena!ATL::CComModule::RegisterServer:
2)xena!ATL::CComCoClass<NetConfig,&CLSID_NetConfig >::GetObjectDescription+0 3)xena!NetConfig::UpdateRegistry+0
4)xena!ATL::CComModule::RegisterServer+a0

after this i get the error ??
So can i assume the UpdateRegistry is causing problems ?

I have this line in source

DECLARE_REGISTRY_RESOURCEID(IDR_NETCONFIG)

Where IDR_NETCONFIG points to netconfig.rgs file which is as below.

HKCR
{
Notify.NetConfig.1 = s 'NetConfig Class'
{
CLSID = s '{DDD6B12C-0934-406A-9BCF-708C8342AD67}'
}
Notify.NetConfig = s 'NetConfig Class'
{
CLSID = s '{DDD6B12C-0934-406A-9BCF-708C8342AD67}'
CurVer = s 'Notify.NetConfig.1'
}
NoRemove CLSID
{
ForceRemove {DDD6B12C-0934-406A-9BCF-708C8342AD67} = s 'NetConfig
Class'
{
ProgID = s 'Notify.NetConfig.1'
VersionIndependentProgID = s 'Notify.NetConfig'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
val AppID = s '%APPID%'
'TypeLib' = s '{56A853D8-0644-47B5-8DBA-3793AFA47BFD}'
}
}
}
Is there any thing wrong here ?
This works perfectly fine in win32.

Followoing is the trace dump.

I am not able to figure out where the exception is happening.

ModLoad: 00000000`10000000 00000000`100c4000
Z:\s2io-64-2\bin\ia64\debug\xena.dll
ModLoad: 000006fb`ff320000 000006fb`ff3a8000
Z:\s2io-64-2\bin\ia64\debug\xenapd.dll
ModLoad: 000006fb`ff2f0000 000006fb`ff31e000
Z:\s2io-64-2\bin\ia64\debug\xenautil.dll
ModLoad: 000006fb`7dbb0000 000006fb`7dbf4000
C:\WINDOWS.0\system32\iphlpapi.dll
ModLoad: 000006fb`73b60000 000006fb`73ba4000
C:\WINDOWS.0\system32\WS2_32.dll
ModLoad: 000006fb`73b40000 000006fb`73b5a000
C:\WINDOWS.0\system32\WS2HELP.dll
ModLoad: 00000000`5f800000 00000000`5fbe0000
Z:\s2io-64-2\bin\ia64\debug\MFC42uD.DLL
ModLoad: 00000000`10200000 00000000`103e0000
Z:\s2io-64-2\bin\ia64\debug\MSVCRTD.dll
ModLoad: 00000000`5f600000 00000000`5f628000
Z:\s2io-64-2\bin\ia64\debug\MFCN42uD.DLL
ModLoad: 000006fb`73ac0000 000006fb`73ad0000
C:\WINDOWS.0\system32\WSOCK32.dll
ModLoad: 000006fb`7e410000 000006fb`7e7aa000
C:\WINDOWS.0\system32\OLEAUT32.dll
ModLoad: 00000000`10480000 00000000`1061a000
Z:\s2io-64-2\bin\ia64\debug\MSVCP60D.dll
ModLoad: 000006fb`7cc70000 000006fb`7ce5e000
C:\WINDOWS.0\system32\SETUPAPI.dll
ModLoad: 000006fb`fefe0000 000006fb`ff2ee000
Z:\s2io-64-2\bin\ia64\debug\MFCO42uD.DLL
ModLoad: 000006fb`792f0000 000006fb`79342000
C:\WINDOWS.0\system32\oledlg.dll
ModLoad: 000006fb`7c050000 000006fb`7c198000
C:\WINDOWS.0\system32\urlmon.dll
ModLoad: 000006fb`7eb30000 000006fb`7ebec000
C:\WINDOWS.0\system32\SHLWAPI.dll
ModLoad: 000006fb`7fa80000 000006fb`7fa98000
C:\WINDOWS.0\system32\VERSION.dll
ModLoad: 000006fb`7ed90000 000006fb`7fa0a000
C:\WINDOWS.0\system32\SHELL32.dll
ModLoad: 000006fb`7d670000 000006fb`7d6d2000
C:\WINDOWS.0\system32\ATL.DLL
Xenautil.dll Initializing!
ModLoad: 000006fb`72370000 000006fb`725a8000
C:\WINDOWS.0\WinSxS\ia64_Microsoft.Windows.Common-Controls_6595b64144ccf1df_
6.0.100.0_x-ww_B3722BAB\comctl32.dll NotifyApp::InitInstance
(e84.e88): Break instruction exception - code 80000003 (first chance)
ntdll!EtwpGetTraceBuffer+f4eb8:
00000000`77f6be58 break.i 80016

WARNING: Z:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include is not accessible
WARNING: Z:\s2io-64-2\xutil\IA64\Debug is not accessible
WARNING: Z:\s2io-64-2\Notify\IA64\Debug is not accessible
WARNING: Z:\s2io-64-2\data\IA64\Debug is not accessible
0:000> g
Breakpoint 2 hit
xena!DllRegisterServer+54:
00000000`10041234 addl r28=ffffffff`ffe01090, gp
0:000> t
xena!ATL::CComModule::RegisterServer:
00000000`100459c0 alloc r36=ar.pfs, 6, 0, 3, 0
0:000> t
xena!ATL::CComModule::RegisterServer+44:
00000000`10045a04 addl r25=ffffffff`ffe04050, gp
0:000> t
*** ERROR: Symbol file could not be found. Defaulted to export
symbols for C:\WINDOWS.0\system32\ATL.DLL -
ATL!Ordinal9+b2c0:
000006fb`7d67b2c0 alloc r42=ar.pfs, d, 0, 3, 0
0:000> p
ATL!Ordinal9+b2c4:
000006fb`7d67b2c4 mov r43=pr
0:000> p
ATL!Ordinal9+b2c8:
000006fb`7d67b2c8 adds ret0=0, r0

0:000> p
ATL!Ordinal9+b2d0:
000006fb`7d67b2d0 cmp.eq p0, p15=r0, r32
0:000> p
ATL!Ordinal9+b2d4:
000006fb`7d67b2d4 adds r44=0, gp
0:000> p
ATL!Ordinal9+b2d8:
000006fb`7d67b2d8 adds r35=0, r0 ;;

0:000> p
ATL!Ordinal9+b2e0:
000006fb`7d67b2e0 adds r47=20, r32
0:000> p
ATL!Ordinal9+b2e4:
000006fb`7d67b2e4 mov r41=rp
0:000> p
ATL!Ordinal9+b2e8:
000006fb`7d67b2e8 (p15=1)br.cond.dptk.many ATL!Ordinal9+b310
(000006fb`7d67b310) ;;

0:000> p
ATL!Ordinal9+b310:
000006fb`7d67b310 ld8 r40=[r47]
0:000> p
ATL!Ordinal9+b314:
000006fb`7d67b314 addl r37=b0, r0
0:000> p
ATL!Ordinal9+b318:
000006fb`7d67b318 addl r36=f8, r0 ;;

0:000> p
ATL!Ordinal9+b320:
000006fb`7d67b320 ld8.sa r46=[r40]
0:000> p
ATL!Ordinal9+b324:
000006fb`7d67b324 cmp.eq p15, p0=r0, r40
0:000> p
ATL!Ordinal9+b328:
000006fb`7d67b328 (p15=0)br.cond.dpnt.many ATL!Ordinal9+b520
(000006fb`7d67b520) ;;

0:000> p
ATL!Ordinal9+b330:
000006fb`7d67b330 ld8.c.clr r46=[r40]
0:000> p
ATL!Ordinal9+b334:
000006fb`7d67b334 cmp.eq p14, p0=r0, r46
0:000> p
ATL!Ordinal9+b338:
000006fb`7d67b338 (p14=0)br.cond.dpnt.many ATL!Ordinal9+b4e0
(000006fb`7d67b4e0) ;;

0:000> p
ATL!Ordinal9+b340:
000006fb`7d67b340 ld8.sa r31=[r40]
0:000> p
ATL!Ordinal9+b344:
000006fb`7d67b344 addl r47=10, r0
0:000> p
ATL!Ordinal9+b348:
000006fb`7d67b348 adds r45=0, r34

0:000> p
ATL!Ordinal9+b350:
000006fb`7d67b350 cmp.eq p0, p15=r0, r34
0:000> p
ATL!Ordinal9+b354:
000006fb`7d67b354 adds r30=30, r40
0:000> p
ATL!Ordinal9+b358:
000006fb`7d67b358 (p15=0)br.cond.dptk.many ATL!Ordinal9+b3c0
(000006fb`7d67b3c0) ;;

0:000> p
ATL!Ordinal9+b360:
000006fb`7d67b360 ld8 r29=[r30]
0:000> p
ATL!Ordinal9+b364:
000006fb`7d67b364 adds r38=8, r40 ;;
0:000> p
ATL!Ordinal9+b368:
000006fb`7d67b368 cmp.eq p14, p0=r0, r29

0:000> p
ATL!Ordinal9+b370:
000006fb`7d67b370 nop.m 0
0:000> p
ATL!Ordinal9+b374:
000006fb`7d67b374 nop.m 0
0:000> p
ATL!Ordinal9+b378:
000006fb`7d67b378 (p14=0)br.cond.dpnt.many ATL!Ordinal9+b3f0
(000006fb`7d67b3f0) ;;

0:000> p
ATL!Ordinal9+b380:
000006fb`7d67b380 ld8 r47=[r29], 8 ;;
0:000> p
ATL!Ordinal9+b384:
000006fb`7d67b384 ld8 gp=[r29]
0:000> p
ATL!Ordinal9+b388:
000006fb`7d67b388 mov b7=r47, +0

0:000> p
ATL!Ordinal9+b390:
000006fb`7d67b390 nop.m 0
0:000> p
ATL!Ordinal9+b394:
000006fb`7d67b394 nop.m 0
0:000> p
ATL!Ordinal9+b398:
000006fb`7d67b398 br.call.dptk.many rp=b7 ;; //
xena!ATL::CComCoClass<NetConfig,&CLSID_NetConfig>: :GetObjectDescription+0
(00000000`100413a0)

0:000> p
ATL!Ordinal9+b3a0:
000006fb`7d67b3a0 cmp.eq p0, p13=r0, ret0
0:000> p
ATL!Ordinal9+b3a4:
000006fb`7d67b3a4 adds gp=0, r44
0:000> p
ATL!Ordinal9+b3a8:
000006fb`7d67b3a8 nop.b 0

0:000> p
ATL!Ordinal9+b3b0:
000006fb`7d67b3b0 nop.m 0
0:000> p
ATL!Ordinal9+b3b4:
000006fb`7d67b3b4 (p13=0)br.cond.dptk.many ATL!Ordinal9+b4a0
(000006fb`7d67b4a0)
0:000> p
ATL!Ordinal9+b3b8:
000006fb`7d67b3b8 br.cond.sptk.many ATL!Ordinal9+b3f0
(000006fb`7d67b3f0) ;;

0:000> p
ATL!Ordinal9+b3f0:
000006fb`7d67b3f0 ld8 r31=[r38]
0:000> p
ATL!Ordinal9+b3f4:
000006fb`7d67b3f4 addl r45=1, r0
0:000> p
ATL!Ordinal9+b3f8:
000006fb`7d67b3f8 adds r38=38, r40 ;;

0:000> p
ATL!Ordinal9+b400:
000006fb`7d67b400 ld8 r47=[r31], 8 ;;
0:000> p
ATL!Ordinal9+b404:
000006fb`7d67b404 ld8 gp=[r31]
0:000> p
ATL!Ordinal9+b408:
000006fb`7d67b408 mov b7=r47, +0

0:000> p
ATL!Ordinal9+b410:
000006fb`7d67b410 nop.m 0
0:000> p
ATL!Ordinal9+b414:
000006fb`7d67b414 nop.m 0
0:000> p
ATL!Ordinal9+b418:
000006fb`7d67b418 br.call.dptk.many rp=b7 ;; //
xena!NetConfig::UpdateRegistry+0 (00000000`10040b80)

0:000> p
ModLoad: 000006fb`7e1f0000 000006fb`7e338000
C:\WINDOWS.0\system32\CLBCatQ.DLL
ModLoad: 000006fb`7e340000 000006fb`7e40c000
C:\WINDOWS.0\system32\COMRes.dll
ATL!Ordinal9+b420:
000006fb`7d67b420 ld4.sa r28=[r32]
0:000> p
ATL!Ordinal9+b424:
000006fb`7d67b424 adds r35=0, ret0
0:000> p
ATL!Ordinal9+b428:
000006fb`7d67b428 adds gp=0, r44

0:000> p
ATL!Ordinal9+b430:
000006fb`7d67b430 cmp4.lt p15, p0=ret0, r0
0:000> p
ATL!Ordinal9+b434:
000006fb`7d67b434 nop.m 0
0:000> p
ATL!Ordinal9+b438:
000006fb`7d67b438 (p15=1)br.cond.dpnt.many ATL!Ordinal9+b510
(000006fb`7d67b510) ;;

0:000> p
ATL!Ordinal9+b510:
000006fb`7d67b510 adds ret0=0, r35
0:000> p
ATL!Ordinal9+b514:
000006fb`7d67b514 mov rp=r41, +0 ;;
0:000> p
ATL!Ordinal9+b518:
000006fb`7d67b518 mov.i ar.pfs=r42 ;;

0:000> p
ATL!Ordinal9+b520:
000006fb`7d67b520 nop.m 0
0:000> p
ATL!Ordinal9+b524:
000006fb`7d67b524 mov pr=r43, ffffffff`ffff003e
0:000> p
ATL!Ordinal9+b528:
000006fb`7d67b528 br.ret.sptk.many rp ;; //
xena!ATL::CComModule::RegisterServer+a0 (00000000`10045a60)

0:000> p
xena!ATL::CComModule::RegisterServer+a0:
00000000`10045a60 adds r20=10, sp
0:000> t
xena!ATL::CComModule::RegisterServer+c0:
00000000`10045a80 adds sp=30, sp
0:000> p
xena!DllRegisterServer+70:
00000000`10041250 adds r27=14, sp
0:000> p
xena!DllRegisterServer+94:
00000000`10041274 adds r21=10, sp
0:000> p
xena!DllRegisterServer+a4:
00000000`10041284 adds sp=10, sp
0:000> p
regsvr32+4520:
00000000`01004520 st4 [r58]=ret0
0:000> p
regsvr32+4524:
00000000`01004524 adds gp=0, r74
0:000> p
regsvr32+4528:
00000000`01004528 nop.b 0 ;;

0:000> p
regsvr32+4530:
00000000`01004530 nop.m 0
0:000> p
regsvr32+4534:
00000000`01004534 nop.m 0
0:000> g @@masm(@$ra)

==> the error is shown here.
DllRegisterServer in xena.dll failed.
Return code was 0x80020009
Regards,
Vijay Chegu

-----------
"Ivan Brugiolo [MSFT]" <iv******@online.microsoft.com> wrote in message

news:<uX**************@tk2msftngp13.phx.gbl>...
Isn't ATL code supplied in all the major SDK/MSDN/Visual Studio packages ? The ATL registration code takes it's "parameter" from a set of globals
that are filled in my a set of macro. This accounr the same generated code to work
for scriptable com component, services, plain com component and few other cases.

The symbols for WinDbg will not get you to the source code for ATL,
but if you have the source code for ATL you can use the .srcpath command
in Windbg/cdb/ntsd and then the 'lsa' command to see where you are.

In any case, you can follow the code flow without symbols.
the ia64 assembly uses 'br.<completer>.call' to make a call through the bX branch registers,
and the return value from a call is stored in r8.

--

Nov 16 '05 #9

P: n/a
That's beyond my generic IA64 experties.
Looks a problem with Unicode/Ansi/UTF-8 resource file, that messes-up the
parser.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Vijay Chegu" <vi********@indiatimes.com> wrote in message
news:68**************************@posting.google.c om...
Hi Ivan Brugiolo,

The return value is 0x80020009.

This is a unicode DLL. I had problems debugging the atl code
dynamically linking to my dll. So did a static link of atl to my
xena.dll.

It exception happens in the follwoing function in file
<sdkpath>\include\win64\atl\statreg.h

inline HRESULT CRegParser::PreProcessBuffer(LPTSTR lpszReg, LPTSTR*
ppszReg)
{
USES_CONVERSION_EX;
ATLASSERT(lpszReg != NULL);
ATLASSERT(ppszReg != NULL);
if (lpszReg == NULL || ppszReg == NULL)
return E_POINTER;
*ppszReg = NULL;
int nSize = lstrlen(lpszReg)*2;
CParseBuffer pb(nSize);
if (pb.p == NULL)
return E_OUTOFMEMORY;
m_pchCur = lpszReg;
HRESULT hr = S_OK;

while (*m_pchCur != NULL) // look for end
{
if (*m_pchCur == _T('%'))
{
m_pchCur = CharNext(m_pchCur);
if (*m_pchCur == _T('%'))
pb.AddChar(m_pchCur);
else
{
LPTSTR lpszNext = StrChr(m_pchCur, _T('%'));
if (lpszNext == NULL)
{
ATLTRACE2(atlTraceRegistrar, 0, _T("Error no
closing % found\n"));
hr = GenerateError(E_ATL_UNEXPECTED_EOS);
break;
}
int nLength = int(lpszNext - m_pchCur);
if (nLength > 31)
{
hr = E_FAIL;
break;
}
TCHAR buf[32];
lstrcpyn(buf, m_pchCur, nLength+1);
LPCOLESTR lpszVar = m_pRegObj->StrFromMap(buf);
if (lpszVar == NULL)
{
hr = GenerateError(E_ATL_NOT_IN_MAP);//<====
_ERROR_ =====
break;
}
pb.AddString(lpszVar);
while (m_pchCur != lpszNext)
m_pchCur = CharNext(m_pchCur);
}
}
else
pb.AddChar(m_pchCur);
m_pchCur = CharNext(m_pchCur);
}
pb.AddChar(m_pchCur);
if (SUCCEEDED(hr))
*ppszReg = pb.Detach();
return hr;
}
Error occurs at the line shown above with <==== _ERROR_ =====

GenerateError(UINT) irrespective of input parameter always returns
DISP_E_EXCEPTION which is 0x80020009

When this happened the value of buf[] was
{0x41,0x50,0x50,0x49,0x44,0,0,0...}
when converted to string ")22;1"

It doesnt make any sense to me.

Below is the callstack.

xena!ATL::CRegParser::PreProcessBuffer(unsigned short* lpszReg =
000006fb`fef276b0 , unsigned short** ppszReg = 000006fb`ffe8ba30
)+0x7b0
xena!ATL::CRegParser::RegisterBuffer(unsigned short* szBuffer =
000006fb`fef276b0 , int bRegister = 1)+0xb0
xena!ATL::CRegObject::RegisterFromResource(unsigne d short*
bstrFileName = 000006fb`ffe8e0e0 , unsigned short* szID =
00000000`00000066 , unsigned short* szType = 00000000`100ab3d0 , int
bRegister = 1)+0xfe0
xena!ATL::CRegObject::ResourceRegister(unsigned short* szFileName =
000006fb`ffe8e0e0 , unsigned int nID = 0x66, unsigned short* szType =
00000000`100ab3d0 )+0x150
xena!ATL::CComModule::UpdateRegistryFromResourceS( unsigned int nResID
= 0x66, int bRegister = 1, ATL::_ATL_REGMAP_ENTRY* pMapEntries =
00000000`00000000 )+0x6f0
xena!NetConfig::UpdateRegistry(int bRegister = 1)+0x50
xena!ATL::AtlModuleRegisterServer(ATL::_ATL_MODULE * pM =
00000000`100d3160 , int bRegTypeLib = 0, _GUID* pCLSID =
00000000`00000000 )+0x530
xena!ATL::CComModule::RegisterServer(int bRegTypeLib = 0, _GUID*
pCLSID = 00000000`00000000 )+0x70
xena!DllRegisterServer( void )+0x70
regsvr32+0x4520
regsvr32+0x51e0
kernel32!GetDateFormatW+0x70180

Regards,
Vijay Chegu

"Ivan Brugiolo [MSFT]" <iv******@online.microsoft.com> wrote in message

news:<eL**************@TK2MSFTNGP11.phx.gbl>...
what's the return value from xena!NetConfig::UpdateRegistry ?

--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 16 '05 #10

P: n/a
Found the problem atlast.
Sorry for the delayed response.

In the associated rgs file we have a line
val AppID = s '%APPID%'

have to remove this line for the dll to register.

Created a project in VC6 and migrated it to VC7 which didnt had this line.
So after removing this one single line, every thing worked fine.

Can some body tell me what is it so special about this line ?

Where as in VC7 generated com projects we have this line and still the dll works.

Thanx to u all for tracking this thread and helping me out.
Regards,
Vijay Chegu

"Ivan Brugiolo [MSFT]" <iv******@online.microsoft.com> wrote in message news:<eg**************@TK2MSFTNGP12.phx.gbl>...
That's beyond my generic IA64 experties.
Looks a problem with Unicode/Ansi/UTF-8 resource file, that messes-up the
parser.

Nov 16 '05 #11

P: n/a
"Vijay Chegu" <vi********@indiatimes.com> wrote in message
news:68**************************@posting.google.c om...
Found the problem atlast.
Sorry for the delayed response.

In the associated rgs file we have a line
val AppID = s '%APPID%'

have to remove this line for the dll to register.

Created a project in VC6 and migrated it to VC7 which didnt had this line. So after removing this one single line, every thing worked fine.


VC7 has a special handling for %APPID% placeholder - see
DECLARE_REGISTRY_APPID_RESOURCEID. VC6 does not, so the registration
fails upon encountering an unrecognized placeholder. For information on
adding your own replacements in VC6, see

http://msdn.microsoft.com/library/en...ocessor.29.asp

--
With best wishes,
Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
Nov 16 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.