Search found 277 matches

by marpon
Feb 12, 2019 9:21
Forum: Libraries
Topic: libs 32/64 windows only to execute exe/dll from memory not from disk
Replies: 7
Views: 346

Re: libs 32/64 windows only to execute exe/dll from memory not from disk

V4 version of static libs with very simple encrypt/decrypt feature ( just to validate it is easy to do it)

see files on github V4 , example of use...

i put also an encoder gui source and decoder gui source just to simplify the job

remarks will be welcome...
by marpon
Feb 11, 2019 12:23
Forum: Tips and Tricks
Topic: IncFile() and IncArray() macros [Updated 22-1-2009]
Replies: 88
Views: 40385

Re: IncFile() and IncArray() macros [Updated 22-1-2009]

VANYA, tested your code it does work at least on win 10 32 or 64 gas or gcc but if you ask optimization -gen gcc -O 2 or -gen gcc -O 3 it is blocked -gen gcc -O 0 or -gen gcc -O 1 it is okay with my code even with -gen gcc -O 2 or -gen gcc -O 3 it is working why? sorry too litle competencies on asm ...
by marpon
Feb 10, 2019 17:36
Forum: Tips and Tricks
Topic: IncFile() and IncArray() macros [Updated 22-1-2009]
Replies: 88
Views: 40385

Re: IncFile() and IncArray() macros [Updated 22-1-2009]

I've recently reviewed these macros, they were not working not only on 64bis but also on the recent fbc version, still work fine on fbc 0.24 so i've done some evolution #Macro Macro_IncCommunEx(label , file , sectionName) dim label##_data as UByte Ptr dim label##_size as ULong #If __FB_DEBUG__ asm j...
by marpon
Feb 08, 2019 12:07
Forum: Beginners
Topic: Matrix to string
Replies: 15
Views: 207

Re: Matrix to string

made a test to check speed #include "crt/string.bi" 'needed for memcpy #define K_VALUE 10000 'can be increased for more speed function clip_string_uni_matrix(z() as double) as string ' converts matrix to clips string variable, which is global ' terminate with crlf, also the last line dim a...
by marpon
Feb 08, 2019 11:18
Forum: Beginners
Topic: Matrix to string
Replies: 15
Views: 207

Re: Matrix to string

elaborated solution with pointer i put it in a function to return the needed string dont need shared string inside, if you want a sub convert it and use the shared string. #include "crt/string.bi" 'needed for memcpy function #define K_VALUE 10000 'can be increased for more speed function c...
by marpon
Feb 08, 2019 10:33
Forum: Beginners
Topic: Matrix to string
Replies: 15
Views: 207

Re: Matrix to string

better to use pointers and memcpy! preallocate zstring ptr with a big size ex 10000 or more check if enough space to copy if yes : memcpy the strptr( Str(Z(i,j)) to the rigth position and length,in that zstring ptr if not : the allocated size is not enougth, reallocate the zstring ptr with the doubl...
by marpon
Feb 08, 2019 9:53
Forum: Libraries
Topic: libs 32/64 windows only to execute exe/dll from memory not from disk
Replies: 7
Views: 346

Re: libs 32/64 windows only to execute exe/dll from memory not from disk

Not difficult! first, you have to prepare to pre-encrypt the exe/dll (with any crypt solution you want ) and use these encrypted files before the compilation of the resulting executable because incbin will embeed a file without any action. On your code you have to put the relevant code to decrypt, u...
by marpon
Feb 07, 2019 14:27
Forum: Libraries
Topic: libs 32/64 windows only to execute exe/dll from memory not from disk
Replies: 7
Views: 346

Re: libs 32/64 windows only to execute exe/dll from memory not from disk

Another exemple of use
to create static lib from dll , in fact the static lib includes the dll and use it from memory

here the explanation and links
https://www.freebasic.net/forum/viewtopic.php?f=6&t=27380&p=258054#p258054
by marpon
Feb 07, 2019 14:22
Forum: Windows
Topic: [some OT] questions on DLL(Dynamic library)
Replies: 7
Views: 282

Dll to static lib work-arround

To continue the subject dll2lib here are the elements to make tests under 32 or 64 bits 2 dlls as example to use (any else can be used) calendrier.dll for 32 my_dll64.dll for 64 2 needed static libs , i've coded in c to manage dll from memory, (difficult to translate to fb) libMemDll_32.a libMemDll_...
by marpon
Feb 05, 2019 16:19
Forum: Libraries
Topic: libs 32/64 windows only to execute exe/dll from memory not from disk
Replies: 7
Views: 346

Re: libs 32/64 windows only to execute exe/dll from memory not from disk

version 2 available on github

better execution from memory, simplified version of the libs

i noticed false virus detection with 5 tests of virus total when executing exe from memory, probably the same way some virus doing...

but seems ok with dll from memory

nobody has tested ?
by marpon
Jan 28, 2019 9:41
Forum: Windows
Topic: [some OT] questions on DLL(Dynamic library)
Replies: 7
Views: 282

Re: [some OT] questions on DLL(Dynamic library)

Some year ago i've also tried to convert dll to static lib on an attempt to provide unly 1 executable file not with dll(s) around, with the risk of not using the right version, missing dll etc... but dll2lib was not working well, so i've changed direction i've embedded all the dlls i needed into my ...
by marpon
Jan 23, 2019 16:49
Forum: Libraries
Topic: libs 32/64 windows only to execute exe/dll from memory not from disk
Replies: 7
Views: 346

libs 32/64 windows only to execute exe/dll from memory not from disk

can execute embedded exe from memory not from disk can use embedded dll export functions from memory not from disk 1 test .bas file can be found here : https://github.com/marpon/mem_exe_dll the zip package also there (to simplify the compilation let all files in the same folder) includes : the bas f...
by marpon
Dec 14, 2018 16:52
Forum: Tips and Tricks
Topic: Insert/Replace String procedures
Replies: 38
Views: 1078

Re: Insert/Replace String procedures

again my last comparaison ( in fact i like string functions as you can see...) for speed it is always good to have a look on the c functions, they have been optimized after more than 2 decades so they are generaly very fast. incorcorating the last MrSwiss adaptation and cumulative as dodicat has don...
by marpon
Dec 14, 2018 12:53
Forum: Tips and Tricks
Topic: Insert/Replace String procedures
Replies: 38
Views: 1078

Re: Insert/Replace String procedures

@dodicat

with optimisation -0 2 in windows -gen gcc 32 or 64 or gas 32 the compiler don't care of your code it understand is nothing to do

but without optimisation with any or 0 or no value is similar time...
by marpon
Dec 14, 2018 12:21
Forum: Tips and Tricks
Topic: Insert/Replace String procedures
Replies: 38
Views: 1078

Re: Insert/Replace String procedures

added a missing test in marpon and marpon2 , if not found patern return original string modified test with randomized string construct, to check with longer strings and adapt the nb of occurances to find... ' #include "crt.bi" ' *** compile as 32- or 64-bit *** #INCLUDE ONCE "crt/stri...

Go to advanced search