Forum > General

dll call fails, how to check the specific reason, so as to solve the problem

(1/3) > >>

Jzhen:
The dll written by myself can be called successfully, but when the dll that needs to be used is called, an error is reported.


Access violation at address 011D9C34 in module 'xxx.dll' Read of address 3F7FFFF8.


Is my parameter type not written correctly, or what


TRon:

--- Quote from: Jzhen on February 06, 2023, 07:36:25 am ---The dll written by myself can be called successfully, but when the dll that needs to be used is called, an error is reported.

--- End quote ---
"DLL that needs to be used" as in 3th party DLL ?


--- Quote ---Is my parameter type not written correctly, or what

--- End quote ---
How are we suppose to tell if we do not know /what/ library you are using that caused that error and in what programming language the DLL was programmed in/for, what function you called and what the original parameter declaration is, what parameter declaration you have used and what parameters you have passed ?

More information required please !

Jzhen:
function MTAW(filename: string; AmplitudeTh, BarrierValueForAutoLoc, coff_TimediffBetweensta, Va, xp, xk, yp, yk, zp, zk: single; SensorForLocation: Tpindex): TMTAWSOLUTION; stdcall; external 'F:\wz_work\DelphiWork\hello word\MTAWDll.dll';




try
    MTAW('E:\\evt origin\\2021-06-29 08.21.31.evt', 1, 3, 1, 2, 2, 2, 2, 2, 2, 2, ti);

  except
    on E: Exception do
      ShowMessage(E.ClassName + ' error raised, with message : ' + E.Message);

  end;

Jzhen:
I don't know what language the specific three-party library is. I got this result based on an incomplete document and decompilation。

TRon:

--- Quote from: Jzhen on February 06, 2023, 07:52:42 am ---I don't know what language the specific three-party library is. I got this result based on an incomplete document and decompilation。

--- End quote ---
What is the name of the library and/or where can I obtain more information about the library ? (yes, I know you wrote the exact filename "MTAWdll.dll" but what does the abbreviation MTAW mean or what did the author named the DLL ?)

If it is a 3th party library that is distributed then there usually is an accompanied header file so that you know what functions (and their declaration) are present in the library and how the parameters are suppose to be used.

If you are truly decompiling a library that is not intended to be shared (closed/undocumented library) then you are basically on your own. There are some tools available that are able to obtain some valuable information about executables and DLL's but unfortunately my Windows days are long gone (e.g. I have no idea what tools to use these days).

You could always patch the library (overtake the original functions, show the passed parameters and call the original function) in order to obtain more information or run things through a debugger (olly comes to mind if that still exists)

Navigation

[0] Message Index

[#] Next page

Go to full version