LB Booster
« struct type ptr »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:58am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1 ... 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: struct type ptr  (Read 3392 times)
SarmedNafi
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 93
xx Re: struct type ptr
« Reply #40 on: Nov 23rd, 2015, 12:06pm »




Alyce, Richard, Anatoly, and Pnlawrence, thank you very much.

All the best,
Sarmed
User IP Logged

joker
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 157
xx Re: struct type ptr
« Reply #41 on: Nov 23rd, 2015, 1:18pm »

on Nov 23rd, 2015, 12:06pm, SarmedNafi wrote:
Alyce, Richard, Anatoly, and Pnlawrence, thank you very much.


Sarmed, my FUNCTION example only shows about saving a string, and as Richard says, string saving is so inefficient ... more than 2 to 1 inefficient. So, as Richard neatly posted above, there are so many other and better reasons to use this method. I am probably going to combine both API methods, because I have several types of variables in my project's INI file.
« Last Edit: Nov 23rd, 2015, 1:19pm by joker » User IP Logged

SarmedNafi
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 93
xx Re: struct type ptr
« Reply #42 on: Nov 24th, 2015, 01:53am »

Yes Paul,

Thank you for the hint.
Hope I wrote a correct name.

Sarmed
« Last Edit: Nov 24th, 2015, 01:56am by SarmedNafi » User IP Logged

SarmedNafi
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 93
xx Re: struct type ptr
« Reply #43 on: Nov 24th, 2015, 02:20am »

Quote:
I'm not even allowed to read the LB Forum, let alone post there; I can't even see what guests, who have never joined, are allowed to see.


I wonder, If we suppose that one day say Anatoly used Russian language and wrote some Booster or simulator for Liberty Basic.
Is he going to be banned?
Why Richard banned? Is that because Richards TIMER was not broken, or work better than Carls TIMER?
I Just wonder?
Richard fond of LB syntax which created by Carl.
Is he make a crime because of that?
We still all of us purchase licence for LB as necessary. Richard and his booster don't prevent us from that.
Whey then??
« Last Edit: Nov 24th, 2015, 02:22am by SarmedNafi » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: struct type ptr
« Reply #44 on: Nov 24th, 2015, 08:30am »

on Nov 24th, 2015, 02:20am, SarmedNafi wrote:
We still all of us purchase licence for LB as necessary. Richard and his booster don't prevent us from that.

There seems to be an assumption in some quarters that the existence of LBB necessarily operates against Carl's interests, for example by taking away paying customers. But that isn't always the case; I know of people who have stuck with Liberty BASIC - and therefore continue to promote and support it - solely because of LBB. If LBB had not existed they would have abandoned the language altogether because of its bugs and limitations.

Richard.
User IP Logged

joker
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 157
xx Re: struct type ptr
« Reply #45 on: Nov 24th, 2015, 4:32pm »

The following are the two functions that I ended up working with. They don't just return one key.

Your mileage may vary! :D

Code:
function WriteINIStruct(SectionName$,KeyName$,inifile$)
    ' Returns true (1) if nothing wrong or false (0) if a problem
    'code by Richard Russell
    size = len(theStruct.struct) 
    calldll #kernel32, "WritePrivateProfileStructA", _ 
    SectionName$ as ptr, _  ' Section name 
    KeyName$ as ptr, _    ' Key name 
    theStruct as struct, _   ' Structure 
    size as ulong, _      ' Size of structure 
    inifile$ as ptr, ret as long
    WriteINItheStruct = ret
end function

function GetINIStruct(SectionName$,KeyName$,inifile$)
    ' Returns true (1) if nothing wrong or false (0) if a problem
    'code by Richard Russell
    size = len(theStruct.struct) 
    calldll #kernel32, "GetPrivateProfileStructA", _ 
    SectionName$ as ptr, _  ' Section name 
    KeyName$ as ptr, _    ' Key name 
    theStruct as struct, _   ' Structure 
    size as ulong, _      ' Size of structure 
    inifile$ as ptr, ret as long
    GetINIStruct = ret
end function

 
User IP Logged

Pages: 1 ... 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls