I don't know if this is a bug but it's certainly something that worked before 4.40
---------------------------
PureBasic
---------------------------
Line 6701: Bad parameter type, number expected instead of string.
---------------------------
OK
---------------------------
That's from a CallCFunction() call.
I see this in the changelog : " Changed: Call(C)Function(Fast) parameters have been changed from 'Any' to 'Integer'."\
What does that mean exactly? The documentation is exactly the same as far as I can tell. The function(s) I'm calling needs a string parameter passed in.
CallFunction with PB4.40
CallFunction with PB4.40
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Re: CallFunction with PB4.40
use @mystring.s or @"bla"
or better, don't use callfunction, use prototypes
or better, don't use callfunction, use prototypes
Re: CallFunction with PB4.40
I try not to fix things that aren't (or weren't) broken 
Guess I'll be switching. Kind of wish this was documented!
Guess I'll be switching. Kind of wish this was documented!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Re: CallFunction with PB4.40
Did you try pointers with it?
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
Re: CallFunction with PB4.40
Pointers it was!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Re: CallFunction with PB4.40
Many of us posted this as a bug or a question, myself included
It was in the list of changes IIRC though... 
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: CallFunction with PB4.40
this a pointers with the @, i think my english is to badts-soft wrote:use @mystring.s or @"bla"
Re: CallFunction with PB4.40
Thomas, I use the @-thing....why is better to use prototypes? Any problems with the @-thing?ts-soft wrote:use @mystring.s or @"bla"
or better, don't use callfunction, use prototypes
PureBasic for Windows
Re: CallFunction with PB4.40
OK, but couldn't our PB compiler make it for us ? I mean when we pass a string to a DLL, it passes the pointer instead (like it has been so far). It's BASIC after all. Maybe, are there any other problems ?
Re: CallFunction with PB4.40
Because I think then you can call the function name directly in your code once you set up the prototype correctly, instead of CallFunctionFast() etc, etc.Marco2007 wrote:why is better to use prototypes?




