Optionals parameters in DLL. How to?

Blitz3D Forums/Blitz3D Programming/Optionals parameters in DLL. How to?

ZJP(Posted 2010) [#1]
Hi,

How to send optionals parameters to a Dll from Blitz3D?
Someone has an example in Vc + +? (With a .Decls ;) )
This is for my last w.i.p stuff here :
http://www.blitzbasic.com/Community/posts.php?topic=89484

Thx

JP


_PJ_(Posted 2010) [#2]
I thinmk that there are some restrictions on parameters, that optional ones cannot be used. All parameters must be entered. Maybe two different calls need to be made to allow for the right effect?

Presumably the actual blitz usage of the decls might wrap the 'offending' function and deal with the optional parameter instead.

Then again, I may totally have misunderstood and be way wrong ... >.>

anyway, here's an example of what I mean:

Function BlitzWrappingFunction(Normal_Param,Optional_Param=False)
If (Optional_Param) Then DLL_Function_OPTIONAL_TRUE(Normal_Param)
If (Not(Optional_Param)) Then DLL_Function_OPTIONAL_FALSE(Normal_Param)
End Function


I really hope this can help and that it makes some kidna sense!


GIB3D(Posted 2010) [#3]
http://blitzbasic.com/sdkspecs/sdkspecs.php
http://blitzbasic.com/sdkspecs/sdkspecs/userlibs_specs.txt

* No default parameter values are allowed.



ZJP(Posted 2010) [#4]
I thought so. :(
Hard to swallow. ;)

I really hope this can help and that it makes some kidna sense!

Problem is :I've one to four possibles parameters and a lot of functions. But this gives me an idea. ;)

Thx all

JP