LB Booster
« struct type ptr »

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



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 2 3 4  Notify Send Topic Print
 veryhotthread  Author  Topic: struct type ptr  (Read 3376 times)
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 2 3 4  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

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