Recent Posts

Pages: [1] 2 3 ... 10
1
Questions & Answers / Re: RE $PP
« Last post by MrBcx on Today at 01:17:45 PM »
JC,

Is your note in response to my recent entry in Bcx_To_Do_List.Txt ?

In 32-bit land, STDCALL and CDECL are not the same in a number of ways, chief among them,
the leading underscore in symbols and the calling convention ( who cleans up the stack ).  If
that changed (universally) in Windows 64-bit land, I'll need to read up on it.

You are correct that C++ decorates various symbols with datasizes and other things, well beyond
the topic of an underscore character.

My point to the $PP entry was to simplify and unify the creation of all DLL files with BCX.
Considering your example, it seems perhaps MSVC is looking for symbols with and without
the underscore and is overriding cdecl with stdcall behind the scenes? 

Dunno ... that's all for another day ...

 
2
Questions & Answers / RE $PP
« Last post by jcfuller on Today at 12:46:57 PM »
Kevin,
  Re $PP
I think I may have fiddled with this a bit prior to my original bc9 and decided it would not work for a number of items I wanted to implement.

It's been awhile .....
Calling convention is moot with 64bit isn't it?
I thought dll functions created with c++ source were decorated?
I just did a quick test and it seems no with (64bit).
The help file for $DLL assumes 32bit.
James

=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
A 64 bit dll calls back to the exe
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
DLL
Code: [Select]
'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
'vc_dll_64.bas
'------------------------------------------------------------------------------
'MyDllFunction is a  function that calls a function in the caller
'------------------------------------------------------------------------------
'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
$CPP
$DLL
'$ONEXIT "VSCPP.BAT $FILE$ -m64 dll"
$TYPEDEF BOOL (*foo)(int,char*)
'==============================================================================
FUNCTION MyDllFunction(x$,fooptr as foo ) AS BOOL EXPORT
    DIM z$
    z$ = UCASE$(x$)
    IF fooptr(1, z$) THEN
        MSGBOX "foo is true"
        FUNCTION = TRUE
    ELSE
        MSGBOX "foo is false"
        FUNCTION = FALSE
END IF
END FUNCTION

=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

Test code

Code: [Select]

'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
'test1_cdll_64.bas
' test a 64bit dll function call with a 64bit callback
'dll -> vc_dll_64.dll
'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

$CPP
$NOMAIN
'$ONEXIT "VSCPP.BAT $FILE$ -m64 con"
$HEADER
  #pragma comment(lib,"vc_dll_64.lib")
$HEADER
$TYPEDEF BOOL (*foo)(int,char*)
C_DECLARE FUNCTION MyDllFunction(A$,f As foo)AS BOOL
Sub main()
    Dim rv As BOOL
    rv = MyDllFunction ("little lamb", MyFoo)
    PRINT "I'm Back and waiting"
    PAUSE
End Sub
'==============================================================================
'callback function called from vc_dll_64.dll
'------------------------------------------------------------------------------
FUNCTION MyFoo(a%, cc$) AS BOOL
    PRINT a%, " ", cc$
    FUNCTION = TRUE
END FUNCTION

3
Announcements / BCX Help Version 7.4.9, July 10 2020
« Last post by Robert on July 10, 2020, 07:05:00 PM »
BCX Help Version 7.4.9, July 10 2020

is available as BCXHelp Version 7.4.9 20200710.zip
in the Announcements section of the BCX forum at

https://bcxbasiccoders.com/smf/index.php

Changes include
 
Robert Wishlaw

... resizing the dimension values of the GUI examples to properly display on Windows 10.

Advance not, retard?

Advance, not retard!
4
Announcements / Bcx 7.4.9 Available for Download
« Last post by MrBcx on July 10, 2020, 02:42:33 PM »
Happy Friday!

This is a MINOR update.

https://bcxbasiccoders.com/archives/YahooGroups/Bcx_Files_New/Bcx749.zip

Code: [Select]
*******************************************************************************************
2020/07/10    : Changes in 7.4.9 from 7.4.8
*******************************************************************************************
Kevin Diggins : Changed CHR$ arguments to unsigned char to overcome conversion warnings
5
Announcements / BCX Help Version 7.4.8, July 9 2020
« Last post by Robert on July 09, 2020, 11:43:21 PM »
BCX Help Version 7.4.8, July 9 2020

is available as BCXHelp Version 7.4.8 20200709.zip
in the Announcements section of the BCX forum at

https://bcxbasiccoders.com/smf/index.php

Changes include
 
Robert Wishlaw
... BCX Twentieth Anniversary Issue
6
Announcements / Re: Bcx 7.4.8 Available for Download
« Last post by MrBcx on July 09, 2020, 08:54:29 PM »


Thank you for this, MrBCX. Lots of good changes in 7.4.8 and it will take some time to digest but, more likely than not, as usual, users will not notice any difference and no code will be broken.

Is today the 20th anniversary of the formation of the BCX Yahoo Forum?

Twenty years ??? WOW, it seems like yesterday.

Thanks Robert,

20 years to the day!  On Sunday July 9, 2000, my first post was

"Okay ... here it is.  Start Posting!"

Actually, at that time, our forum was on EGROUPS, which was acquired by Yahoo sometime after the BCX group was created.
Fortunately, the transition from EGROUPS to Yahoo! went smoothly and all of our EGROUPS content was imported into Yahoo's system.
7
Announcements / Re: Bcx 7.4.8 Available for Download
« Last post by Robert on July 09, 2020, 08:10:25 PM »
Hello friends,

This is a MAJOR update.  Please refer to the BCX_Revisions.Txt

I've done all the testing that I can and I'm very pleased with this version, so hopefully v748 will not break anything.

https://bcxbasiccoders.com/archives/YahooGroups/Bcx_Files_New/Bcx748.zip

Code: [Select]

**********************************************************************************************
2020/07/08    : Changes in 7.4.8 from 7.4.7
**********************************************************************************************
Kevin Diggins : Removed (all?) shadowed variables by renaming MANY local and global variables.
Kevin Diggins : Corrected the most serious warnings reported by various compilers.
Kevin Diggins : Removed unused/undocumented BCX_MAX_VAR_SIZE conditional code
Kevin Diggins : Removed unused/undocumented EmptyTmpStr() and simplified BCX_TmpStr()
Kevin Diggins : Reduced arbitrary padding from 256 bytes down to 1 in BCX_TmpStr()
Kevin Diggins : Removed arbitrary 256 byte padding in all calloc function calls
Kevin Diggins : Removed str_cmp() and replaced with standard library strcmp()
Kevin Diggins : Removed _strstr_() and replaced with standard library strstr()
Kevin Diggins : Moved BCXTmpStrSize to the CONST's section of the C/C++ output     
Kevin Diggins : Removed deprecated "GetversionEx()" from built-in OSVERSION function
Kevin Diggins : Removed deprecated "Getversion()" from FindFirstInstance() and modified
                FindFirstInstance() to only work on NT-class (32/64) operating systems.
Kevin Diggins : BCX now automatically appends its ISO build date to BCX Version$.
Kevin Diggins : More changes improving the formatting of the C/C++ output file.
Kevin Diggins : Added memicmp to _memicmp in transformations
Kevin Diggins : Added the following warning block for MSVC (I'm using warning level -W3)
                #if (_MSC_VER >= 1900) // earlier versions untested
                  #pragma warning(disable: 4244) // conversion from type1 to type2 warnings
                  #pragma warning(disable: 4267) // conversion from type1 to type2 warnings
                  #pragma warning(disable: 4800) // forcing value to bool warnings
                #endif
Kevin Diggins : Added the following warning block for Pelles(I'm using warning level -W2)
                #if defined (__POCC__)"
                  #pragma warn(disable: 2248) // optional args not portable warnings 
                  #pragma warn(disable: 2215) // conversion from type1 to type2 warnings 
                  #pragma warn(disable: 2805) // possible anti-aliasing violation warnings 
                  #pragma warn(disable: 2118) // unreferenced argument warnings 
                  #pragma warn(disable: 2810) // potential realloc warnings
                #endif

Thank you for this, MrBCX. Lots of good changes in 7.4.8 and it will take some time to digest but, more likely than not, as usual, users will not notice any difference and no code will be broken.

Is today the 20th anniversary of the formation of the BCX Yahoo Forum?

Twenty years ??? WOW, it seems like yesterday.
8
Announcements / Bcx 7.4.8 Available for Download
« Last post by MrBcx on July 09, 2020, 07:55:51 PM »
Hello friends,

This is a MAJOR update.  Please refer to the BCX_Revisions.Txt

I've done all the testing that I can and I'm very pleased with this version, so hopefully v748 will not break anything.

https://bcxbasiccoders.com/archives/YahooGroups/Bcx_Files_New/Bcx748.zip

Code: [Select]
**********************************************************************************************
2020/07/08    : Changes in 7.4.8 from 7.4.7
**********************************************************************************************
Kevin Diggins : Removed (all?) shadowed variables by renaming MANY local and global variables.
Kevin Diggins : Corrected the most serious warnings reported by various compilers.
Kevin Diggins : Removed unused/undocumented BCX_MAX_VAR_SIZE conditional code
Kevin Diggins : Removed unused/undocumented EmptyTmpStr() and simplified BCX_TmpStr()
Kevin Diggins : Reduced arbitrary padding from 256 bytes down to 1 in BCX_TmpStr()
Kevin Diggins : Removed arbitrary 256 byte padding in all calloc function calls
Kevin Diggins : Removed str_cmp() and replaced with standard library strcmp()
Kevin Diggins : Removed _strstr_() and replaced with standard library strstr()
Kevin Diggins : Moved BCXTmpStrSize to the CONST's section of the C/C++ output     
Kevin Diggins : Removed deprecated "GetversionEx()" from built-in OSVERSION function
Kevin Diggins : Removed deprecated "Getversion()" from FindFirstInstance() and modified
                FindFirstInstance() to only work on NT-class (32/64) operating systems.
Kevin Diggins : BCX now automatically appends its ISO build date to BCX Version$.
Kevin Diggins : More changes improving the formatting of the C/C++ output file.
Kevin Diggins : Added memicmp to _memicmp in transformations
Kevin Diggins : Added the following warning block for MSVC (I'm using warning level -W3)
                #if (_MSC_VER >= 1900) // earlier versions untested
                  #pragma warning(disable: 4244) // conversion from type1 to type2 warnings
                  #pragma warning(disable: 4267) // conversion from type1 to type2 warnings
                  #pragma warning(disable: 4800) // forcing value to bool warnings
                #endif
Kevin Diggins : Added the following warning block for Pelles(I'm using warning level -W2)
                #if defined (__POCC__)"
                  #pragma warn(disable: 2248) // optional args not portable warnings 
                  #pragma warn(disable: 2215) // conversion from type1 to type2 warnings 
                  #pragma warn(disable: 2805) // possible anti-aliasing violation warnings 
                  #pragma warn(disable: 2118) // unreferenced argument warnings 
                  #pragma warn(disable: 2810) // potential realloc warnings
                #endif
9
User Contributions / PBcodec For BCX (Updated)
« Last post by MrBcx on July 09, 2020, 11:43:02 AM »
UPDATED 7/9/2020:  The first version I uploaded was based on v1.3 source code.
This one is based on v1.6 and provides more options via an easy to use interface.
I find using the Courier New font in Notepad improves formatting.



Anyone familiar with the PowerBasic community probably has heard of and maybe even used a program called PBcodec by Borje Hagsten, et al.  For the rest of you, PBCodec is basically a poorman's XREF tool.

It very easily builds a report file (filenameLOG.txt) of all the (used and unused) SUBS, FUNCTIONS, global and local variables, and more.  It reports their line numbers and how many times a SUB or FUNCTION is called which is handy for identifying areas of your projects that you might want to scrutinize.

I made a couple of small changes to the program which allows it to also work with BCX programs.  I was able to build a report using BC.Bas source code (about 32,000 lines of code) in just a couple of seconds.

As stated in the source code, this is in the public domain.

I compiled this version using the PowerBasic Compiler v10.
10
Off-Topic Discussions / Re: SMF Forum Version
« Last post by MrBcx on July 06, 2020, 03:07:26 PM »
Thanks - I'll let Jeff know.
Pages: [1] 2 3 ... 10