How to get function params from a dll?



How to get function params from a dll?..

Answer / Himanshu Chaurasia

To get function parameters from a DLL in Delphi, you need to use GetProcAddress() and PtrToInt() functions:nType MyDLLFunction = procedure of object;var FunctionAddr: Pointer;nBeginn FunctionAddr := GetProcAddress(GetModuleHandle(''MyDLL.dll''), 'MyDLLProcedureName');n if Assigned(FunctionAddr) thenn MyDLLFunction(PtrToInt(FunctionAddr))n end;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Delphi Interview Questions

How to Change the papersize of a print job ?

1 Answers  


Where is TReport in Delphi 6?

1 Answers  


How to Make the drop-down list appear faster?

1 Answers  


How to Print a web page using the HTML control?

1 Answers  


How to determine the names of the installed comm ports?

1 Answers  


How to tell if a form has been created (or any object)?

1 Answers  


Do we need Local InterBase on the client machines along with my BDE application?

1 Answers  


How does one change the default directory that Delphi uses to save projects?

1 Answers  


How to test if a given string contains a valid number?

1 Answers  


What is the procedure to access the database from delphi?

1 Answers  


'Interface mismatch. Engine version different' . what does this error indicates?

1 Answers  


How to Limit the amount of text entered in a TEdit?

1 Answers  


Categories