Search found 27 matches

by piccaso
Jun 03, 2007 21:00
Forum: General
Topic: Shared sections in fb only?
Replies: 4
Views: 1764

thanks for the link, i'll keep that in mind.
by piccaso
Jun 03, 2007 14:09
Forum: General
Topic: Shared sections in fb only?
Replies: 4
Views: 1764

that's a nice trick :)
as long as it compiles with only fb installed i'm happy.

Thank you.
by piccaso
Jun 03, 2007 3:19
Forum: General
Topic: smallest .exe file sizes
Replies: 16
Views: 4879

~71k ? are you sure? i dont know which platform you prefer but here is 6kb hello world for windows :) ' Compile: ' fbc -c hello.bas ' fbc -s console hello.o #Include Once "crt.bi" Function WinMain Alias "WinMain" (hInstance As Any ptr, _ hPrevInstance As Any ptr, _ lpCmdLine ...
by piccaso
Jun 03, 2007 0:23
Forum: General
Topic: Shared sections in fb only?
Replies: 4
Views: 1764

Shared sections in fb only?

is it possible to have a shared section without the help of gcc? Right now i do the following: shared.c // Compile me with: gcc -c shared.c int g_iRunning __attribute__((section ("shared"), shared)) = 0; main.bas ' Compile me with: fbc -s console main.bas shared.o Extern g_iRunning Alias "g_iRu...
by piccaso
Jun 01, 2007 20:51
Forum: Tips and Tricks
Topic: Loading a dll from memory
Replies: 7
Views: 3691

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 windows' api's dont know what to do with it... And there is no magic inside so COM will never work with this :) but there are some alternatives you cou...
by piccaso
May 31, 2007 1:21
Forum: Projects
Topic: Process wide API Hooking (windows)
Replies: 5
Views: 3215

and your non childish way of doing things like that is?
by piccaso
May 30, 2007 23:55
Forum: Projects
Topic: Process wide API Hooking (windows)
Replies: 5
Views: 3215

Well in my case... A closed source interpreter which can load/call dlls but cant do 'everything freebasic can' so i can hook loadlibrary and getprocaddress and add my own features... Or scite for example calls ShellExecute twice in some situations. its a known bug, and nobody fixes it and i dont wan...
by piccaso
May 29, 2007 23:32
Forum: Projects
Topic: Process wide API Hooking (windows)
Replies: 5
Views: 3215

Process wide API Hooking (windows)

After getting sick of only having c/c++ library's which do stuff like this i decided to write my own :) It has 2 Methods of hooking, the first one is pretty simple so i called it 'Simple' and it should work on every windows platform. But i tested it only on XP and Wine 0.9.17. On Vista you probably ...
by piccaso
May 07, 2007 23:15
Forum: Tips and Tricks
Topic: Loading a dll from memory
Replies: 7
Views: 3691

Loading a dll from memory

By using this library. I've compiled the c library into a static lib because i'm not good in porting things, but its probably possible in fbc too. Here is an easy example which shows how it's done. #Include Once "MemoryModule/libMemoryModule.bi" ' Created by v1ctor's bin2bas, original Sour...
by piccaso
Mar 12, 2007 18:01
Forum: Beginners
Topic: translating c
Replies: 9
Views: 2320

thanks for all the info :)
by piccaso
Mar 12, 2007 2:00
Forum: Beginners
Topic: translating c
Replies: 9
Views: 2320

translating c

is this translated correctly? '#define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8)) '#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8)) '#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8)) '#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8)...
by piccaso
Nov 28, 2006 22:03
Forum: General
Topic: crt
Replies: 3
Views: 1372

Fragmeister wrote:is there a reason for not using fb's internal file functions?

no.
i'm just to stupid :)

v1ctor wrote:It should be "Dim hFile As FILE ptr", FILE is an abstract type.

Also remove the pointer derefs from *fopen() and *fread().

thank you
by piccaso
Nov 28, 2006 0:49
Forum: General
Topic: crt
Replies: 3
Views: 1372

crt

please help me make this crt functions work... (look for comment 'here') or help me use the inbuilt features to read a file :) #Include "windows.bi" #Include "win\winsock2.bi" #Include "crt.bi" Dim Shared sgFile As String Dim Shared hgSocket As SOCKET Declare Sub Thread...
by piccaso
Oct 08, 2006 20:29
Forum: Beginners
Topic: Stream mixup...
Replies: 2
Views: 1014

oops...

looks like 0 is the filehandle that connects print to stdout :)

thank you
by piccaso
Oct 08, 2006 19:55
Forum: Beginners
Topic: Stream mixup...
Replies: 2
Views: 1014

Stream mixup...

Dim As String sTempfile,sOut Dim As Integer hFile sOut = "........asdasd......................." sTempfile = "~12345.tmp" Open sTempfile For Output Shared As #hFile Put #hFile,,sOut Close #hFile Print "something" If Not Kill(sTempfile) Then Print "Cant Del...

Go to advanced search