It seems that PB destroys the ecx register if you compile with /THREAD (aka: Create threadsafe executable)
Now i wonder if PB also destroys other registers besides eax (automatic variable initialization) at the start.
Example:
CompilerIf #PB_Compiler_Thread = 0
Debug "You must compile with ...
Search found 27 matches
- Fri May 23, 2014 7:15 pm
- Forum: Coding Questions
- Topic: 5.22 LTS - Register Destruction Threadsafe
- Replies: 9
- Views: 1864
- Tue Dec 31, 2013 4:06 pm
- Forum: Tricks 'n' Tips
- Topic: AsmLib - Optimized C Library
- Replies: 8
- Views: 4188
AsmLib - Optimized C Library
Asmlib is a function library to call from C or C++ and now PB for all x86 and x86-64 platforms. It is not
intended to be a complete function library, but contains mainly:
• Faster versions of several standard C functions
• Useful functions that are difficult to find elsewhere
• Functions that are ...
intended to be a complete function library, but contains mainly:
• Faster versions of several standard C functions
• Useful functions that are difficult to find elsewhere
• Functions that are ...
- Thu Aug 01, 2013 2:00 pm
- Forum: Feature Requests and Wishlists
- Topic: Unsigned variables
- Replies: 19
- Views: 7405
Re: Unsigned variables
+1
There's quite a few C/C++ libraries that use unsigned long/int, using those libs in PB could cause unforeseen results.
There's quite a few C/C++ libraries that use unsigned long/int, using those libs in PB could cause unforeseen results.
- Sun Jul 28, 2013 10:41 pm
- Forum: Feature Requests and Wishlists
- Topic: Calling convention "fastcall"
- Replies: 2
- Views: 1480
Re: Calling convention "fastcall"
+1
would also be great if PB added __thiscall calling convention, making it easier to interface with c++ code.
Shouldn't be too hard to add it since it's the same has __stdcall + mov ecx, *this
ProcedureThis
ProcedureThisDLL
PrototypeThis <- force & check for *this parameter
CallThisFunction ...
would also be great if PB added __thiscall calling convention, making it easier to interface with c++ code.
Shouldn't be too hard to add it since it's the same has __stdcall + mov ecx, *this
ProcedureThis
ProcedureThisDLL
PrototypeThis <- force & check for *this parameter
CallThisFunction ...
- Wed Jun 19, 2013 8:59 pm
- Forum: Tricks 'n' Tips
- Topic: Protection process
- Replies: 14
- Views: 9305
Re: Protection process
would be nice to have unsigned integers in pb. I agree.
I requested about this, but there is no answer. :( :(
http://www.purebasic.fr/english/viewtopic.php?p=414638#p414638
http://www.purebasic.fr/english/viewtopic.php?f=3&t=54966
If it's not added i may try to do a compiler hack and add it ...
I requested about this, but there is no answer. :( :(
http://www.purebasic.fr/english/viewtopic.php?p=414638#p414638
http://www.purebasic.fr/english/viewtopic.php?f=3&t=54966
If it's not added i may try to do a compiler hack and add it ...
- Wed Jun 19, 2013 8:49 pm
- Forum: Feature Requests and Wishlists
- Topic: Unsigned pointer
- Replies: 2
- Views: 2268
Re: Unsigned pointer
I have needed unsigned integers in 2 projects already.
+1
+1
- Wed Jun 19, 2013 8:19 pm
- Forum: Tricks 'n' Tips
- Topic: Protection process
- Replies: 14
- Views: 9305
Re: Protection process
nice work
It may come in handy in a near future.
would be nice to have unsigned integers in pb.
It may come in handy in a near future.
Code: Select all
!JBE newntopenprocess__m1- Mon Mar 11, 2013 9:19 pm
- Forum: General Discussion
- Topic: PB Tools Update
- Replies: 0
- Views: 915
PB Tools Update
It seems that several purebasic 3rd party tools are outdated.
Current: fasm (1.69.35) - Latest: 1.70.03 - http://flatassembler.net/
Current: polib (6.00.1) - Latest: 7.00.0 - http://www.smorgasbordet.com/pellesc/
Current: polink (5.00.1) - Latest: 7.00.3
Current: porc (7.00.3) - Latest: 7.00.15 ...
Current: fasm (1.69.35) - Latest: 1.70.03 - http://flatassembler.net/
Current: polib (6.00.1) - Latest: 7.00.0 - http://www.smorgasbordet.com/pellesc/
Current: polink (5.00.1) - Latest: 7.00.3
Current: porc (7.00.3) - Latest: 7.00.15 ...
- Mon Mar 04, 2013 7:18 pm
- Forum: Coding Questions
- Topic: Use a C++ DLL
- Replies: 27
- Views: 6575
Re: Use a C++ DLL
Here's an example:
SBSDKTypes.pbi
CompilerIf Defined(_SBSDKTYPES_H, #PB_Constant) = 0
#_SBSDKTYPES_H = 1
#SBSDK_REG_ID = 1
#SBSDK2_REG_ID = 2
#SBSDK_NON_PROJECTED_RANGE = 4096
; Model numbers
#SB_MODEL_SC4 = $80 ;SC4 (byte 4)
#SB_MODEL_SC5 = $81 ;SC5 (byte 4)
#SB_MODEL_SC6 = $82 ;SC6 (byte 4 ...
SBSDKTypes.pbi
CompilerIf Defined(_SBSDKTYPES_H, #PB_Constant) = 0
#_SBSDKTYPES_H = 1
#SBSDK_REG_ID = 1
#SBSDK2_REG_ID = 2
#SBSDK_NON_PROJECTED_RANGE = 4096
; Model numbers
#SB_MODEL_SC4 = $80 ;SC4 (byte 4)
#SB_MODEL_SC5 = $81 ;SC5 (byte 4)
#SB_MODEL_SC6 = $82 ;SC6 (byte 4 ...
- Mon Mar 04, 2013 4:18 pm
- Forum: Feature Requests and Wishlists
- Topic: Double-quotes in strings
- Replies: 48
- Views: 9689
- Mon Mar 04, 2013 4:13 pm
- Forum: Tricks 'n' Tips
- Topic: Interfacing with C++ DLLs
- Replies: 5
- Views: 5065
Interfacing with C++ DLLs
Used tools:
CFF Explorer VIII: http://www.ntcore.com/
PureBasic 5.11 beta 1 (x86)
Visual Studio 2010 Ultimate (x86)
Zip file with the source: http://www.filedropper.com/interfacingwithcdlls
Warnning : This is not meant to be a tutorial!
This is how i demangle C++ symbols:
http://i.imgur ...
CFF Explorer VIII: http://www.ntcore.com/
PureBasic 5.11 beta 1 (x86)
Visual Studio 2010 Ultimate (x86)
Zip file with the source: http://www.filedropper.com/interfacingwithcdlls
Warnning : This is not meant to be a tutorial!
This is how i demangle C++ symbols:
http://i.imgur ...
- Sun Mar 03, 2013 11:37 pm
- Forum: Tricks 'n' Tips
- Topic: PureBasic Windows SDK - 7.1
- Replies: 13
- Views: 4978
Re: PureBasic Windows SDK - 7.1
I am using a mix of methods manually parse, regex replace, PB Header Converter and PB Interface Importer.Danilo wrote:I did not look at your approach yet. Do you also parse header files, or do you extract structures by hand?Toni6 wrote:You are right, my bad PROCESSENTRY32 is properly aligned in (x86, x64).
- Sun Mar 03, 2013 11:34 pm
- Forum: Tricks 'n' Tips
- Topic: PureBasic Windows SDK - 7.1
- Replies: 13
- Views: 4978
Re: PureBasic Windows SDK - 7.1
Edit: MODULEENTRY32 is not properly aligned in x64, changed example.
MODULEENTRY32 is also correct here. It is your own "_BAD" structure that is not correct.
Structure MODULEENTRY32_BAD ; <- default pb
dwSize.l
th32ModuleID.l
th32ProcessID.l
GlblcntUsage.l
ProccntUsage.l
*modBaseAddr ...
MODULEENTRY32 is also correct here. It is your own "_BAD" structure that is not correct.
Structure MODULEENTRY32_BAD ; <- default pb
dwSize.l
th32ModuleID.l
th32ProcessID.l
GlblcntUsage.l
ProccntUsage.l
*modBaseAddr ...
- Sun Mar 03, 2013 9:28 pm
- Forum: Coding Questions
- Topic: Use a C++ DLL
- Replies: 27
- Views: 6575
Re: Use a C++ DLL
Any chance a skilled c++ programmer could write a wrapper for this c++ dll? Even if it's just one function, to get me started?
I could do it, but it's not easy cos you have to know the function calling convention, the vTable structure, etc...
It would probably be something this: http://www ...
I could do it, but it's not easy cos you have to know the function calling convention, the vTable structure, etc...
It would probably be something this: http://www ...
- Sun Mar 03, 2013 8:59 pm
- Forum: Tricks 'n' Tips
- Topic: PureBasic Windows SDK - 7.1
- Replies: 13
- Views: 4978
Re: PureBasic Windows SDK - 7.1
The point of my project is to provide an up-to-date and correct , windows sdk for PureBasic.
This is the default PROCESSENTRY32 structure in PureBasic 5.11 beta 1 (x86), which has the wrong structure alignment.
Structure PROCESSENTRY32
dwSize.l
cntUsage.l
th32ProcessID.l
th32DefaultHeapID.i ...
This is the default PROCESSENTRY32 structure in PureBasic 5.11 beta 1 (x86), which has the wrong structure alignment.
Structure PROCESSENTRY32
dwSize.l
cntUsage.l
th32ProcessID.l
th32DefaultHeapID.i ...