Search found 499 matches

by voodooattack
Oct 28, 2008 10:20
Forum: Tips and Tricks
Topic: Loading a dll from memory
Replies: 7
Views: 3377

I remember I ported this before: http://www.freebasic.net/forum/viewtopic.php?p=104948#104948 I never put it up in Tips & Tricks though.. :) since the os isnt aware of the module there are many things can that go wrong. Like the HINSTANCE passed to DllMain is just an address in memory and window...
by voodooattack
Oct 06, 2008 21:33
Forum: Tips and Tricks
Topic: IncFile() and IncArray() macros [Updated 22-1-2009]
Replies: 88
Views: 41898

Yes but... asm mov dword Ptr [label##_len], __##label##__len it doesn't need OFFSET operator... why? The second value resolves to a constant value, same as if you had put a literal number in there.. asm mov dword ptr [myvar], 5 Hello, Yesterday I created a thread about adding images to my EXE file ...
by voodooattack
Oct 04, 2008 19:37
Forum: Tips and Tricks
Topic: IncFile() and IncArray() macros [Updated 22-1-2009]
Replies: 88
Views: 41898

As for the preprocessor stuff, I wrote this for FB v0.18 or something around that if I remember correctly, and it was (and probably still) full of quirks.. The correct answer is that those were mostly work-arounds for issues that got fixed later, or stuff that I forgot to change/remove after revisin...
by voodooattack
Oct 03, 2008 16:16
Forum: General
Topic: doubt about "asm" statement use
Replies: 18
Views: 3504

Those are gAS symbols, you declare them implicitly when you assign them, think of it more like QB:

Code: Select all

a! = 10
print a!


It's a gnu AS feature.
by voodooattack
Oct 03, 2008 16:10
Forum: Tips and Tricks
Topic: IncFile() and IncArray() macros [Updated 22-1-2009]
Replies: 88
Views: 41898

I'm trying to undertand how it works... I'm reading asm stuff on http://www... But I'm having problems to find documentation on google because google search omits terms like "##" or "_#" or "__##"... Ok, on freebasic "##" creates a new token by concatenating the texts at both sides of it.... Yep, t...
by voodooattack
Oct 03, 2008 15:35
Forum: General
Topic: doubt about "asm" statement use
Replies: 18
Views: 3504

Hey :) Sorry for not being around much nowadays, I just graduated and I've been busy looking for a job, so let me wrap this up.. When using inline asm, you'll be dealing with 3 layers of preprocessing: Layer one would be the FB/GCC preprocessor (high-level preprocessor that gets expanded BEFORE comp...
by voodooattack
Sep 20, 2008 18:09
Forum: General
Topic: Make "dim shared" the default?
Replies: 5
Views: 1257

Code: Select all

Static Shared sndWin As Mix_Chunk Ptr = NULL                                                        /' Winning sound. '/


There ya go, the initializer has to be a constant value though. (good practice with module-level static arrays)
by voodooattack
Sep 12, 2008 12:43
Forum: Libraries
Topic: LZMA SDK 4.60
Replies: 4
Views: 2401

cha0s wrote:Great job. =) LZMA is a great compression algo. Could we include this in the FB distro?


Sure! that would be awesome. :)
by voodooattack
Sep 09, 2008 22:16
Forum: Libraries
Topic: LZMA SDK 4.60
Replies: 4
Views: 2401

LZMA SDK 4.60

I've translated the headers for the new LZMA SDK, version 4.60 to FB. The new SDK offers a newly rewritten ANSI-C code-base (which is a complete implementation now - the C++ code wraps around it instead), No more wrappers around C++ code to use LZMA in FB, just pure C interfaces. I compiled this ver...
by voodooattack
Sep 06, 2008 17:58
Forum: Community Discussion
Topic: Default type results in operations
Replies: 17
Views: 3074

so why not just use the C___ family? Dim a As Ubyte = 90 Dim b As Uinteger = 100 Print CINT(a - b) Sleep I think that conforms to what you're talking about, forcing the compiler to use an explicitly specified return type, and I do believe that the C___ family exists for that very reason.. =)
by voodooattack
Sep 01, 2008 18:52
Forum: Community Discussion
Topic: Mumbling about RAD
Replies: 26
Views: 5864

I think that the real reason stalling such projects is the absence of a fully functional OOP model. I for one, attempted writing multiple GUI libraries for FB, but what stopped me every time was the lack of inheritance/virtual methods (or at least delegates). Of course I made my own work-arounds to ...
by voodooattack
Aug 26, 2008 19:17
Forum: General
Topic: Segfault Problem
Replies: 23
Views: 2946

The operator for the type of course, to make this clear, I wrote you some code examples. Here's a complete implementation of this concept: '#define OBJECT_NOCOPY ' Define this to disable the copy constructor '#define MULTI_THREADED ' Define this to allow multi-threading capability type myObject_Ctx ...
by voodooattack
Aug 26, 2008 17:44
Forum: Community Discussion
Topic: GIRLS WANTED!
Replies: 55
Views: 9120

BastetFurry wrote:We had Z!re, but she left.


Z!ire is a dude.
by voodooattack
Aug 26, 2008 17:27
Forum: General
Topic: FreeBASIC cross compiling to Windows CE
Replies: 7
Views: 1845

Once the C emitter is stable enough, it won't matter at all, FB will be capable of compiling your code for all the platforms and architectures GCC supports (Including WinCE/ARM). of course there would be still work to do porting GFx/RTLib over to the new platforms, but I don't think that's a big pro...
by voodooattack
Aug 26, 2008 17:11
Forum: General
Topic: Segfault Problem
Replies: 23
Views: 2946

This problem occurs because your objects are created on the stack. Once the function returns, the memory is invalid (and mostly corrupt), since the stack pointer gets decremented. (but in most cases, your application will not crash by reading the pointers, because it's still readable as far as the O...

Go to advanced search