Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 05-03-2018, 06:44 PM
FreakaZoid2 FreakaZoid2 is offline
Senior Member
 
Join Date: Jul 2009
Posts: 330
Default dynamic loaded dll function parameter

how would i go about checking inside the dll if a parameter was passed to it or not or could i use the override option (dont know much about it)
i have a function in the dll
function myFunc(aVar1, aVar2, aVar3: pAnsichar): integer; stdcall;
now i need to add a new var to it...
function myFunc(aVar1, aVar2, aVar3, aVar4: pAnsichar): integer; stdcall;

now in the calling programs, after loading the dll, i call it with 3 vars and it is working but i now have a need to add a 4th var to it. if the 4th var is passed in i want to send info back thru it. How do I modify the dll to test/know if the 4th var has been passed in or not. or should i learn how to use override inside of dll?
  #2  
Old 05-04-2018, 03:24 PM
rojam rojam is offline
Senior Member
 
Join Date: Jun 2015
Posts: 191
Default

I assume you actually mean overload, not override. Overload allows two (or more) functions/procedures to have the same name but having different signatures (parameter list). A DLL exports its functions by name, so simply using an overload will not solve your problem.
Reading this reply on Stack Overflow may help.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 04:49 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.