|
-
January 21st, 2013, 07:21 PM
#17
Re: How to call Dialog window (formed as resource) from a .DLL
Here it is:
1) Rebuild the DLL, making sure that debugging is turned on (both compiler and linker settings).
For compiler it should be Ok:
Compiler_Debug.JPG
For linker also:
Linker_Debug.JPG
2) Start the CAD program. Make sure that your CAD program is using that same DLL you built. If the CAD program is using some other DLL that happens to have the same name, then of course you won't be able to debug the one you just built. Using Process Explorer from sysinternals.com shows you what DLL's are loaded when the program is running.
This is checked in point 4 (you will see). When the CAD starts some process, called "elaboration", it loads specified .DLL, that is specified in project conf. file. The name of the .DLL is displayed in the CAD console window
3) Set a breakpoint in the DLL function in Visual Studio.
Set_BreakPoint.JPG
4) Attach to the CAD program. Then do something in the CAD program that invokes the DLL function you set a breakpoint in.
Attach_to_Process.JPG
Now what's hapenned with breakpoint:
Break_Point_postattach.JPG
Here is VS output window:
Code:
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\vish.exe', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files\AVAST Software\Avast\snxhk.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\tk84.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\comdlg32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\tcl84.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\imagehlp.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\reg1.1\tclreg11.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\ABBYY Lingvo x5\LvHook.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\ABBYY Lingvo x5\Detoured.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\itcl3.2\itcl32.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\Img1.3\img1384.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\png.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\zlib.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\itk3.2\itk32.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\tkdnd\libtkdnd.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Windows\SysWOW64\nlaapi.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\NapiNSP.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\pnrpnsp.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\mswsock.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\dnsapi.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\winrnr.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\Bonjour\mdnsNSP.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\winnsi.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\wshbth.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\Tclxml2.6\Tclxml26.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Program Files (x86)\QuestaSim_SE_10b\win32\Tclexpat2.6\Tclexpat26.dll', Binary was not built with debug information.
'vish.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\propsys.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\ntmarta.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\Wldap32.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\EhStorShell.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\Microsoft Office\Office14\GROOVEEX.DLL', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.atl_1fc8b3b9a1e18e3b_9.0.30729.6161_none_51cd0a7abbe4e19b\ATL90.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\Cultures\OFFICE.ODF', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Program Files (x86)\Microsoft Office\Office14\1033\GrooveIntlResource.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\ntshrui.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\srvcli.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\cscapi.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\slc.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\FWPUCLNT.DLL', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\rasadhlp.dll', Cannot find or open the PDB file
'vish.exe': Loaded 'C:\Windows\SysWOW64\WSHTCPIP.DLL', Cannot find or open the PDB file
The thread 'Win32 Thread' (0xff4) has exited with code 0 (0x0).
Now I elaborate design (action, that provokes loading of .DLL. Here is output of the CAD console:
Sorry I exceeded the limit of uploaded images (will be in the next post)
Regards.
Pavel.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|