|
Post by (X) on Apr 30, 2024 18:04:12 GMT 1
I was checking an API function result with:
trace waveInGetDevCaps(ItemData, VarPtr(Caps), Len(Caps))
This worked fine when run from the IDE. But... And it's big but...
When I tried to run the compiled version, my heart sank when I saw the compiled version could not "see" that I had a microphone.
Then I thought maybe the Trace command is fouling up the works because Trace does not work in compiled environment? ( See next post for why this might not be the case. Hint: It depends on how you configure the Assert & Trace Level options in the Properties menu->Compiler tab)
That was it! The following alteration got everything back on track!
~waveInGetDevCaps(ItemData, VarPtr(Caps), Len(Caps))
Phew! I thought I was gonna have to dig hard to find a fix for that.
|
|
|
Post by dragonjim on May 1, 2024 18:29:50 GMT 1
That's very interesting.
If you open Extra -> Properties then select the Compiler tab, what is the option selected under Assert & Trace Level? Is it the default 'In IDE and Gll'? If so, could you try changing it to 'In IDE, Exe, Lg32 and Gll', compile again and see if you still get the same bug?
|
|
|
Post by (X) on May 2, 2024 10:28:37 GMT 1
That's very interesting. If you open Extra -> Properties then select the Compiler tab, what is the option selected under Assert & Trace Level? Is it the default 'In IDE and Gll'? If so, could you try changing it to 'In IDE, Exe, Lg32 and Gll', compile again and see if you still get the same bug? Hi dragonjim! You're right!
As can be seen in the Extra->Properties->Compiler menu, the first and second "Assert & Trace Level" options exclude Exe (compiled) files from using ASSERT & TRACE. Wow! That blew my mind!
dragonjim's suggestion is spot on and elegantly addresses the issue. Thanks!
|
|