Click here to Skip to main content
16,004,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to use QUERY_CHANGES_VIRTUAL_DISK_RANGE when HyperV backup Pin
DingHuaming18-Jul-24 17:04
DingHuaming18-Jul-24 17:04 
GeneralRe: How to use QUERY_CHANGES_VIRTUAL_DISK_RANGE when HyperV backup Pin
Dave Kreskowiak18-Jul-24 17:25
mveDave Kreskowiak18-Jul-24 17:25 
GeneralRe: How to use QUERY_CHANGES_VIRTUAL_DISK_RANGE when HyperV backup Pin
DingHuaming18-Jul-24 19:48
DingHuaming18-Jul-24 19:48 
QuestionCode change request (From Linux To Windows) Pin
Member 1614369414-Jul-24 21:30
Member 1614369414-Jul-24 21:30 
AnswerRe: Code change request (From Linux To Windows) Pin
Maximilien15-Jul-24 8:00
Maximilien15-Jul-24 8:00 
GeneralRe: Code change request (From Linux To Windows) Pin
Member 1614369416-Jul-24 22:08
Member 1614369416-Jul-24 22:08 
GeneralRe: Code change request (From Linux To Windows) Pin
Richard Deeming16-Jul-24 22:16
mveRichard Deeming16-Jul-24 22:16 
QuestionC++ DLL Debugging - Visual Studio 2022 Pin
PaulS_UK9-Jul-24 8:20
PaulS_UK9-Jul-24 8:20 
Can someone please tell me how I can debug a C++ DLL from within Tradestation 10 by attaching VS2022 to the Tradestation process?

I can compile a DLL successfully and call a function from it for display within a Tradestation workspace. After a LOT of time spent browsing around on various MicroSoft learning pages etc etc, I have arrived at the following method but cannot get Visual Studio 2022 to load symbols or recognize the required .PDB file(s).

To complicate matters the DLL must be a release version and reside in the Tradestation system file for it to work with Tradestation.  It is my understanding that this is ok so long as the relevent .pdb files are available to enable debugging.  Here is my methodology so far:

1. Compile the C++ DLL in Visual Studio 2022 in RELEASE mode as specified for use in tradestation.
2. Set post build to copy MyDLL.dll and MyDLL.pdb to C:\Program Files (x86)\TradeStation 10.0\Program
3. Indicator using function from MyDLL.dll plots ok - great!
4. Set breakpoint in C++ code within function in Visual Studio 2022: breakpoint shows no errors.
5. Attempt to debug in release mode in VS 2022 by attaching Tradestation process using indicator/MyDLL to be debugged: Debug -> Attach to Process... -> ORPlat.exe

++++ Now things do not go to plan ++++++++

6. MyDLL.dll not listed in Modules window
7. Numerous messages appear in the Modules window such as:
ORPlat.exe C:\Program Files (x86)\TradeStation 10.0\Program\ORPlat.exe Cannot find or open the PDB file.
8. MyDLL.dll shows up as being loaded ok using DebugView

Compiler settings in VS2022 are:

/ifcOutput "Release\" /GS /GL /analyze- /W3 /Gy /Zc:wchar_t /Zi /Gm- /Od /Fd"Release\vc143.pdb" /Zc:inline /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "GLOBALVARIABLE23_EXPORTS" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Gd /Oy- /Oi /MT /FC /Fa"Release\" /EHsc /nologo /Fo"Release\" /Ot /Fp"Release\Future DLL.pch" /diagnostics:column 

Am I flogging a dead horse here? Is it impossible to debug MyDLL.dll from within Visual Studio by attaching it to the Tradestation process (ORPlat.exe)? If it is not possible (such as debugging only from within Tradestation; how do you attempt serious debugging in complex C++ code within your MyDLL.dll functions?

Any help on this greatly appreciated!

Cheers

AnswerRe: C++ DLL Debugging - Visual Studio 2022 Pin
Richard Andrew x649-Jul-24 10:27
professionalRichard Andrew x649-Jul-24 10:27 
AnswerRe: C++ DLL Debugging - Visual Studio 2022 Pin
jschell10-Jul-24 14:58
jschell10-Jul-24 14:58 
QuestionTextBox File Open Pin
Robert Johnson 20237-Jul-24 21:42
Robert Johnson 20237-Jul-24 21:42 
AnswerRe: TextBox File Open Pin
Richard MacCutchan7-Jul-24 22:55
mveRichard MacCutchan7-Jul-24 22:55 
Questiontimer does not start Pin
etechX226-Jun-24 20:20
etechX226-Jun-24 20:20 
AnswerRe: timer does not start Pin
Victor Nijegorodov26-Jun-24 22:12
Victor Nijegorodov26-Jun-24 22:12 
GeneralRe: timer does not start Pin
etechX227-Jun-24 18:57
etechX227-Jun-24 18:57 
AnswerRe: timer does not start Pin
Richard Andrew x643-Jul-24 9:13
professionalRichard Andrew x643-Jul-24 9:13 
GeneralRe: timer does not start Pin
etechX25-Jul-24 16:01
etechX25-Jul-24 16:01 
GeneralRe: timer does not start Pin
jeron16-Jul-24 9:04
jeron16-Jul-24 9:04 
GeneralRe: timer does not start Pin
Richard Andrew x646-Jul-24 9:48
professionalRichard Andrew x646-Jul-24 9:48 
QuestionAfxRegisterWndClass crashes when called again Pin
etechX212-Jun-24 20:07
etechX212-Jun-24 20:07 
AnswerRe: AfxRegisterWndClass crashes when called again Pin
Victor Nijegorodov12-Jun-24 20:24
Victor Nijegorodov12-Jun-24 20:24 
GeneralRe: AfxRegisterWndClass crashes when called again Pin
etechX212-Jun-24 21:58
etechX212-Jun-24 21:58 
GeneralRe: AfxRegisterWndClass crashes when called again Pin
Victor Nijegorodov13-Jun-24 5:17
Victor Nijegorodov13-Jun-24 5:17 
GeneralRe: AfxRegisterWndClass crashes when called again Pin
etechX213-Jun-24 18:40
etechX213-Jun-24 18:40 
GeneralRe: AfxRegisterWndClass crashes when called again Pin
Victor Nijegorodov13-Jun-24 19:59
Victor Nijegorodov13-Jun-24 19:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.