You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constMyStruct=RefStruct({a: 'int',b:'int'});constPtrMyStruct=ref.refType(MyStruct);constMyLib=ffi.Library('mylib.dll',{setCB:['void',['pointer']],//...other things});letmyCB=ffi.Callback('void',[PtrMyStruct]],(ptrInCallback)=>{letstruct=prtInCallback.deref();// now, I got a js object, everything is ok));MyLib.setCB(myCB);
here is my fastcall codes
constlib=fastcall.Library('mylib.dll')lib.struct('struct MyStruct{int a; int b}'lib.declare('void (*CB)( MyStruct * ptrInCallback)'lib.function('void setCB(CB)')lib.interface.setCB((ptrInCallback)=>{letstruct=prtInCallback.deref();//Error!!!, value of ptrInCallback is uint8array[0]})
Thank you!
The text was updated successfully, but these errors were encountered:
as title says,
this works in ffi mode
here is my fastcall codes
Thank you!
The text was updated successfully, but these errors were encountered: