| View previous topic :: View next topic |
| Author |
Message |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Aug 11, 2003 5:27 am Post subject: Too many arguments @LIB function |
|
|
This WAS an attempt I had made to create XP styled Multiline Balloon Tool Tips in VDS
But you get an error :
Error: Too many arguments at line: 16 in file: Tool_tip\Tip.dsc
What is the maximum number of parameters that can be passed to @LIB function ?
If it exceeds then what can be done ?
I have heard of a freeware dll which can pass upto 32 parameters to a function.
That could be interfaced but if using dll becomes a necessity then one could as well write the entire balloon tip routine into a dll which may be more easy to call.
Is there a pure VDS solution ?
| Code: |
DIALOG CREATE,New Dialog,-1,0,240,160,Class Tipwin
DIALOG ADD,BUTTON,BUTTON1,108,84,81,30,BUTTON1,,MOUSEOVER
DIALOG SHOW
LOADLIB USER32
:EVLOOP
WAIT EVENT
GOTO @EVENT()
:BUTTON1BUTTON
%H = @STRDEL(@WINEXISTS(#Tipwin),1,1)
%I = @LIB(USER32,GetWindowLongA,INT:,%H,-6)
%T = $80000000
%A = @LIB(USER32,CreateWindowExA,INT:,0,tooltips_class32,0,0,%T,%T,%T,%T,0,0,%I,0)
GOTO EVLOOP
:BUTTON1ENTER
GOTO EVLOOP
:BUTTON1LEAVE
GOTO EVLOOP
:CLOSE
FREELIB USER32
EXIT
|
NB: I asked this question ONLY to provoke a thought what could be done in such a situation. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Aug 11, 2003 10:56 am Post subject: |
|
|
| Quote: | | What is the maximum number of parameters that can be passed to @LIB function ? |
8 arguments can be passed to the DLL function. That doesn't include the arguments to the @LIB function itself.
What API call needs more arguments than this? _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Aug 11, 2003 11:01 am Post subject: |
|
|
| Quote: | | What API call needs more arguments than this? |
Oops, didn't notice there was an example off the bottom of the screen. Eugh! 12 arguments. I was thinking this could be fixed in the update, but there is quite a big overhead for each number of arguments that is supported as a separate block of code is needed for each. Anyone know what the longest API call actually is? _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon Aug 11, 2003 12:49 pm Post subject: |
|
|
Well guys you could always use Gadget which does not have this limitation... It does have a limitation but that limitation is the same for C/C++ which is 127 arguments for a function Hehehehehehe.. Have fun... The new version of Gadget is on it's way... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Aug 11, 2003 1:41 pm Post subject: |
|
|
| mindpower wrote: | | The new version of Gadget is on it's way... |
And what will be New in the next Gadget version ??
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Aug 11, 2003 1:55 pm Post subject: |
|
|
I would think it would be possible to use it in VDS 5, and maybe a new
syntax I think. Honestly I don't know, I'm just going on what I think I've
read.
Mindpower is really the one who would be able to say. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Aug 11, 2003 1:57 pm Post subject: |
|
|
| jules wrote: | | Quote: | | What is the maximum number of parameters that can be passed to @LIB function ? |
8 arguments can be passed to the DLL function. That doesn't include the arguments to the @LIB function itself.
What API call needs more arguments than this? |
Why is there that 8 argument limit? Is it a real limitation of Delphi or
a limitation such as the one where only a few DLLs could be loaded at
a time? _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Mon Aug 11, 2003 2:29 pm Post subject: |
|
|
| Julian mentioned that each new argument allowed would require a huge block of code within the vds source to be added, thus they just limited it to 8 since most api's don't require more then 8. |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Aug 11, 2003 2:33 pm Post subject: |
|
|
No ... I had a couple of codes which need more than 8 arguments and hence could not run some API and some calling a non VDS non system dll.
I have deleted them
I do understand that a small / minority of VDS users use API functions and among them a few will encounter this. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Aug 11, 2003 3:20 pm Post subject: |
|
|
| PGWARE wrote: | | Julian mentioned that each new argument allowed would require a huge block of code within the vds source to be added, thus they just limited it to 8 since most api's don't require more then 8. |
Oops I missed that.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Aug 11, 2003 4:30 pm Post subject: |
|
|
| jules wrote: | | Anyone know what the longest API call actually is? |
The maximum number of arguments in this list is 17. I don't remember seeing any larger number atleast in API IMHO.
As one can see from a small list I compiled below the number of API's having > 8 arguments are significant.
The functions that got affected I remember were like
Controlling security
Various API draw functions
Creating custom dialogs using API(inluding multiline balloon help)
NT security control
Running VDS app as a simple NT service
RPC - (not sure whether it was this problem)
Just a thought. Would it reduce the code overhead for more arguments if the API/calling non vds dlls is included into a SEPERATE DLL like webbrowser. This may also provide ability to give option of more variables and types of variables (compared to VDS typeless varaibles for the ease of majority of routine users) without conflicting native VDS variables. Also then could it be possible to give functions to define a stucture and array more easily and abilty to define array in a structure more easily.
| Code: |
AllocateAndInitializeSid 10
AcquireCredentialsHandle 9
AcquireCredentialsHandle 9
AddAuditAccessObjectAce 9
AllocateAndInitializeSid 11
AlphaBlend 11
Arc 9
Arc To 9
BuildSecurityDescriptor 9
ChangeServiceConfig 11
CheckBitmapBits 9
Chord 9
CoInitializeSecurity 9
CommitUrlCacheEntry 9
ClusterControl 9
cmc_logon 9
CMCheckRGBs 9
CreateFont 14
CreateMDIWindow 10
CreateProcess 10
CreateService 13
CreateTable 10
CreateToolbarEx 13
CreateUpDownControl 12
CreateWaitEvent 10
CryptDecodeMessage 13
CryptRetrieveObjectByUrl 9
CryptSignCertificate 9
DhcpRequestParams 9
DrawDibDraw 13
DsReplicaModify 9
EnumServicesStatusEx 10
CreateProcessAsUser 11
ChangeServiceConfig 11
CITextToFullTreeEx 9
GetAddressByName 10
GetStringsFromBlob 9
GrayString 9
HlinkNavigateToStringReference 9
LsaLogonUser 14
CoGetClassObjectFromURL 10
FCICreate 13
NetAuditRead 11
NetAccessEnum 9
NetErrorLogRead 11
NetFileEnum 9
NetServerEnum 9
NetSessionEnum 9
ObjectOpenAuditAlarm 12
OleCreateFromDataEx 12
OleCreateFromFileEx 13
OleCreateLinkEx 12
OleCreateLinkEx 13
OleCreateLinkFromFile 10
OleCreateLinkToFileEx 12
OleCreatePropertyFrame 11
PdhEnumObjectItems 9
PlgBlt 10
Pie 9
RegQueryInfoKey 12
ReportEvent 9
RtmCreateRouteEnum 9
SaslInitializeSecurityContext 12
SetDIBitsToDevice 12
SetupQueueCopy 9
SQLColumnPrivileges 9
SQLSetDescRec 10
SQLStatistics 9
SQLTables 9
StackWalk64 9
ScriptApplyLogicalWidth 9
ScriptCPtoX 9
ScriptPlace 9
ScriptShape 10
ScriptStringAnalyse 13
StretchBlt 11
StretchDIBits 13
TransparentBlt 11
TreeResetNamedSecurityInfo 11
AcceptSecurityContext 9
AccessCheckByType 11
AccessCheckByTypeAndAuditAlarm 16
AccessCheckByTypeResultList 11
AccessCheckByTypeResultListAndAuditAlarm 16
AccessCheckByTypeResultListAndAuditAlarmByHandle 17
WSARecvFrom 9
WSASendTo 9
|
_________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
|