C callbacks getting a value of 0! Bug in D?
Johnson Jones via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Aug 27 19:17:33 PDT 2017
Looking at the assembly shows something like this:
0041ea98 push 0x0
0041ea9a push 0x0
0041ea9c push 0x0
0041ea9e push dword 0x100
0041eaa3 mov ecx, [typeid(PaStreamParameters)+0xe36fc (0x80d4cc)]
0041eaa9 mov eax, [fs:0x2c]
0041eaaf mov edx, [eax+ecx*4]
0041eab2 push dword [edx+0x1c]
0041eab8 push dword [edx+0x18]
0041eabe push dword [ebp-0x54]
0041eac1 push dword [ebp-0x5c]
0041eac4 mov ebx, PA.stream (0x823f30)
0041eac9 push ebx
0041eaca call dword near [Pa_OpenStream (0x823f18)]
I noticed that those 0's were the values being fed in to the
function.
I remember converting c_ulong's to ulong's and that they were
probably uint's in D. Converting those fixed the problem and the
callback is now called! I converted all the ulongs to uint's but
there were a few longs and I don't know if they are c_longs or
d_longs...
Anyways, At least I'm on the right track.
More information about the Digitalmars-d-learn
mailing list