Search found 8 matches

by ToniPB
Tue Sep 27, 2016 10:49 am
Forum: Coding Questions
Topic: Run procedure from pointer?
Replies: 6
Views: 2310

Re: Run procedure from pointer?

This should work

Code: Select all

Prototype p_callback()

Procedure myCallback()
  Debug "Hello"
EndProcedure

Procedure Test(callback.p_callback)
  callback()
EndProcedure

Test(@myCallback())
by ToniPB
Mon Jun 27, 2016 6:30 pm
Forum: Feature Requests and Wishlists
Topic: GetThreadContext - x64
Replies: 5
Views: 2375

Re: GetThreadContext Bug - x64

Fred wrote:It's not a bug, moved to feature and request.
The API doesn't work properly in 64-bit, so it's clearly a bug or at least a compiler deficiency.

If we don't have the BAlign Parameter then the compiler should handle cases like this automatically.
by ToniPB
Mon Jun 27, 2016 5:18 pm
Forum: Feature Requests and Wishlists
Topic: GetThreadContext - x64
Replies: 5
Views: 2375

GetThreadContext - x64

In AMD64 the CONTEXT structure must start at a 16-bit boundary, otherwise the call fails.

Unfortunately PB can't perform boundary alignment outside of structures.

We need another optional parameter like this:

Structure CONTEXT Align #PB_Structure_AlignC BAlign 16
any.l
EndStructure
BAligin ...
by ToniPB
Sat Dec 26, 2015 6:17 am
Forum: Coding Questions
Topic: C++ to PB
Replies: 8
Views: 2387

Re: C++ to PB

My Problem is, I don't understand what Convs[ i ] = new CDSPBlockConvolver() means
What ist Convs[ i ] in this case?
Is it possible to translate this to PB?

Converting C++ code to PB without understating the C++ code itself, is not gonna work well.

I took a quick look at the library you posted ...
by ToniPB
Thu Dec 03, 2015 3:04 am
Forum: Coding Questions
Topic: Steam integration? Or howto call c++ stuff?
Replies: 8
Views: 8259

Re: Steam integration? Or howto call c++ stuff?

You can call C++ directly but requires a bit more work.

You could always write a parser that reads the headers and generates all this stuff.

More info here: http://www.purebasic.fr/english/viewtopic.php?f=12&t=53808

Here's a crude working example:
EnableExplicit

CompilerIf #PB_Compiler ...
by ToniPB
Thu Dec 03, 2015 2:11 am
Forum: Assembly and C Programming in PureBasic
Topic: diStorm 3.3 - Powerful Disassembler Library For Intel/AMD64
Replies: 3
Views: 5895

diStorm 3.3 - Powerful Disassembler Library For Intel/AMD64

Powerful Disassembler Library For AMD64

A lightweight, Easy-to-Use and Fast Disassembler/Decomposer Library for x86/AMD64.

A Decomposer means that you get a binary structure that describes an instruction rather than textual representation.

diStorm3 includes the following new features:
Access ...
by ToniPB
Sun Dec 28, 2014 2:56 pm
Forum: Tricks 'n' Tips
Topic: Protection process
Replies: 14
Views: 8862

Re: Protection process

This is not gonna work in x64 without patching Patch Guard (KPP).

Patch Guard (KPP) = http://msdn.microsoft.com/en-us/library/windows/hardware/dn613955%28v=vs.85%29.aspx

The best way to do this in x64 without patching Patch Guard is using ObRegisterCallback, which is what most Firewalls, Internet ...
by ToniPB
Tue Dec 16, 2014 5:07 am
Forum: Tricks 'n' Tips
Topic: UDT - UDP-based Data Transfer Protocol
Replies: 0
Views: 2939

UDT - UDP-based Data Transfer Protocol

UDP-based Data Transfer Protocol (UDT), is a high performance data transfer protocol designed for transferring large volumetric datasets over high speed wide area networks.
Such settings are typically disadvantageous for the more common TCP protocol.

Initial versions were developed and tested on ...