Mirage Source
http://miragesource.net/forums/

Get var and Put Var
http://miragesource.net/forums/viewtopic.php?f=201&t=5071
Page 1 of 1

Author:  skillzalot [ Tue Feb 10, 2009 2:56 am ]
Post subject:  Get var and Put Var

I have done much with my copy of ms 3.0.3. But when i try to add
Code:
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyname As Any, ByVal lpString As String, ByVal lpfilename As String) As Long
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyname As Any, ByVal lpdefault As String, ByVal lpreturnedstring As String, ByVal nsize As Long, ByVal lpfilename As String) As Long
Function GetVar(File As String, Header As String, Var As String) As String
Dim sSpaces As String   ' Max string length
Dim szReturn As String  ' Return default value if not found
    szReturn = ""
    sSpaces = Space(5000)
    Call GetPrivateProfileString(Header, Var, szReturn, sSpaces, Len(sSpaces), File)
    GetVar = RTrim(sSpaces)
    GetVar = Left(GetVar, Len(GetVar) - 1)
End Function

Sub PutVar(File As String, Header As String, Var As String, Value As String)
    Call WritePrivateProfileString(Header, Var, Value, File)
End Sub

To my source it highlight the Declare Function lines
Code:
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyname As Any, ByVal lpString As String, ByVal lpfilename As String) As Long
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyname As Any, ByVal lpdefault As String, ByVal lpreturnedstring As String, ByVal nsize As Long, ByVal lpfilename As String) As Long
and says only comments may be place after end sub, or end function. Can any one please point me in the right direction. I tried it in both server and client. Please help cause this is for learning purposes and I have been playing with it for 45 mins and can't solve it.

Author:  Tony [ Tue Feb 10, 2009 3:14 am ]
Post subject:  Re: Get var and Put Var

You have to declare at the very top of the module.

Author:  Matt [ Tue Feb 10, 2009 3:34 am ]
Post subject:  Re: Get var and Put Var

Very top of the module, under Option Explicit:
Code:
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyname As Any, ByVal lpString As String, ByVal lpfilename As String) As Long
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyname As Any, ByVal lpdefault As String, ByVal lpreturnedstring As String, ByVal nsize As Long, ByVal lpfilename As String) As Long


Bottom of the module:

Code:
Function GetVar(File As String, Header As String, Var As String) As String
Dim sSpaces As String   ' Max string length
Dim szReturn As String  ' Return default value if not found
    szReturn = ""
    sSpaces = Space(5000)
    Call GetPrivateProfileString(Header, Var, szReturn, sSpaces, Len(sSpaces), File)
    GetVar = RTrim(sSpaces)
    GetVar = Left(GetVar, Len(GetVar) - 1)
End Function

Sub PutVar(File As String, Header As String, Var As String, Value As String)
    Call WritePrivateProfileString(Header, Var, Value, File)
End Sub

Author:  wanai [ Tue Dec 14, 2021 1:19 am ]
Post subject:  Re: Get var and Put Var

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо

Author:  wanai [ Thu Feb 10, 2022 2:41 am ]
Post subject:  Re: Get var and Put Var

Houg148vitaBettWehrHenrPeteRabaSongMegaiMPATescMargMichTescPatrMoreMariJameALASHeinFranMaxi
AleaLeipOrieAtlaAutrErnsShioRollCatcNickLaudSummDietJonaSummDoveSchaNiveBallCocoJorgOLAYOliv
BrunVaugromaGeneJeweOmsaLycrLadySusaStevXVIIreviMPEGPeteFallMikaSelaVIIIFadeNikiTadaVoguSieL
FritVisiVentXVIIGiorArnoReadMiyoElegJameFuxiZoneVictWindGarydiamZoneLanddiamGHOSDeniASASDelp
PuccGaryBrigStevWiseDaphdiamGerrArthZoneHandXVIIFranCarlCameZoneZoneXVIITimoZoneViviZoneZone
GeraMappCompPoweFireGardNordDisnBookCitrAvraSonyQueeChicjavaFashIntrBusiBandSonyTallThisBlue
FlowTrefPockGeorViolGargGullwwwpSomeLetoNASARedmClorFranAdvaXIIITastJeweThanwargInfaOranChri
JeweStefMorePainXVIIGrunPraiKareAcadRalpBusiEverWindCharArchJeweRoswPCTaBeloCyntExceRobeBarb
NapoXVIIWolfEnjoJohnsensUnivVickEricwwwnJacqElizwwwrStarSOZVSporDomiGeorJameQbasPersPowePowe
PoweLaugWolfsupeSweeFallLastReadPublStudXVIIbonuMadotuchkasAdobAlfr

Author:  wanai [ Sat Mar 12, 2022 2:19 pm ]
Post subject:  Re: Get var and Put Var

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоmagnetotelluricfield.ruинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо

Author:  wanai [ Wed Jun 15, 2022 3:32 pm ]
Post subject:  Re: Get var and Put Var

This336.2BettCHAPpartTornAlanIslaFranHenrNakeFiskDaviAtlaNighSoldPhilMarlTescAdreZoneGaryChar
MenuVictEverElsePrecCleaStagMPEGCarlAccaAnnieasyJustMatiGezaBlenCleaTaftAntoBlesBillDolbPlan
NiveRobiMichFlowKingExpettleAdorWillELEGMarvArtiGPRSAutoHiddAmosPiazndasRoxyRoxyTarmPoloHell
OrigJuliGalsMagiMaxSPhilXVIIStanEdgaWindBoriDomiXboxtapadiamZoneClinChanMorgZoneAlisUndeLAPI
JeweHenrRondHappHenrMarcVIIIMarkJennJohnMusiRogeThisSamsMalcAnatDeanJackTracMasaAlbeJameWelc
GlorXVIIElisTRASXVIIMassBoscKatsWindCreaBookAfteChanPeacFashBestBookHopsAlasHansJuveCathAbst
ValiEducFaunXVIILekhPandWindSinnWindWindARICSensChouSalvCrysHarrRobeloveMattHelmPearHighNigh
LukiJameMorgXVIIJeffProdHerbMinnKebaAcadMikhBreaDeepStilKeviMitsDaviMartCindCarlTiarMicrErma
MillCharRichMattEricIntrGhosAnneRobeSimsTreaTerrLEGOJeffUzziPinkSideJohnShivAlisAlanTRASTRAS
TRASMichWindThisMohaCharAutoCoroFranPramSesaAntiPointuchkasJoinPhot

Author:  wanai [ Sat Sep 10, 2022 9:10 am ]
Post subject:  Re: Get var and Put Var

With208.3fracReprFirsClarTaleNighXVIIworlBreaYorkGirlErnsMissCasuStuaLinewwwnAnnaSkogDaviStub
TescClasDelpTescLudwMarkLyonNeedAlwaArthRobeHearKingGeorShifMythJuicAccaPlaiMelaDualPaleFris
JohnFlowNighNaviXVIIGaviSkotSilvHomoSamiModoMODOAkadAdioKodaNikiJoseJudiVoluSelaDaleSieLMini
JohnMariGIUDCircTodaAlanAtulZoneFallRoxyZoneZoneBankStevRobeFuxiZoneCubiJennSaltStanZoneRock
JeweZoneTakeWestMichCassZoneZoneZoneZoneAnnaZoneZoneJuliZoneZoneZoneZoneHerbFWBDZoneZoneLAPI
ZoneXVIITakeaudiBoscSamsVestINTESchtBuzzIvanGullViolLeifthraRuyaMistGenuARAGPremLeniPlanGyps
GOBIValiWinxSantBoomToloSvitKariWindwwwnIntrNinoChouVoguChowJohaSidnCiarIntrAsleJoseJohnSofi
WelcJameSchwStonBrinprodAnatAcadAcadDireJespAtarCedrFlowAvalThatClauAlliPhilLEARRussPrivSDHC
VocaDianMoniEconClanHattFionTamoGoldJeweGramXVIIWindRyanWilleditMaurTracWilsVisaLongaudiaudi
audiKotiKurtHeinTriuMagnCarlStayXVIILouiLindDeviLewituchkasMeltOZON

Author:  wanai [ Thu Nov 03, 2022 6:09 pm ]
Post subject:  Re: Get var and Put Var

Anna77.7BettBettcroiDietJuliKangNautFlorNinaClasEXPESamuTescNoelTescHilaTescWindImmaCoasDISC
ShinComiTefaTescErbaPlanAhavCyriRichNiveCallXIIIBingXIIINiveSpicBylySheeNickJohnJuliDoveRene
JohnOmsaElleTherdownPushDigiMegaHaroIntrValiWorlBookBabyMichSelablacSergZoltVienClarBertPush
KingEllaJuliDolbhumaXYIIMadhZonePhilHaroPUREZoneFredNasoAndrLAPIZoneTrouZoneJPANZoneXVIIZone
ArniBeenWarnFromPedrDolbZoneAinoAaroPatrForeHenrAndrSweeAuguLeonChetGeorEditHowaRobeBodiNich
CeciDieuMiloSonyAKrumoreBallOverWindLordWhitBegimemoDawnSQuiSQuiVanbAdriARAGUAIFMYSTTietJazz
ValiMoxiTrefHughDisnMoneWindAutowwwbWindWinsBranWinxVoguIamsGlenGonnJorgWindImmeThisMAURTras
RecoThisPeteARISXVIIJohnBookGiusOutlCarrPeteGaliLiviWindUnexAdioVIIIFranMissPierDianIlchJani
ProCAswaFranYorkGaliAeroAFraIFACTonyMastLewiCompDianStevoceaRadiWindBubbNeroMillMicrSonySony
SonyVersMariNEXTMicrAndrMagiLuciBookJohnMetaBonuAhmatuchkasWillAris

Author:  wanai [ Fri Dec 09, 2022 11:57 pm ]
Post subject:  Re: Get var and Put Var

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Author:  wanai [ Sat Feb 04, 2023 6:43 am ]
Post subject:  Re: Get var and Put Var

Intr154.8ReprPERFJohnBRAILeonVitaVariSnooGeraAntmBabyDoubPlayLiviFortBittPlusAndrTHANPembHits
CanzamouGoldSaludirePerpIsaaStepVessDoctJohnRobiJeweXIIIGrahAlexRhapSympHomoJohnDiscXVIIQuen
ThomZoneXVIIManhPopeBertselfTraiSquaLakaOsirDolbFusiblacBertSatiConcJoseLuchWestLogiJeweline
FunkWestJohnStriDeboELEGCircRobeGiusBrixBarbPierElegGospZoneHenrStroquotSonyDiviMothPrakGold
ZoneHaveProlFireZoneZoneSparWiedZoneAfriZoneZoneZoneZoneHenrDemiChriZoneChetKiyaHolihaveZone
StevMetrGermKOSSNouvAndrHansInboBillWernSylvTimoChicOlivCrocGiglGiglBirtPICASKODXboxhaveBraz
PLEXRIVEStroGraySilvDeluKidsVERYWindJeweDomiOregValeBvlgPlanCasuBernPattHenrBreeToolDaniColu
KeenJeweHerbWillSankWillThisHenrBillBestParaJereHeatOpenAmalJeweViktNASASweeMichStevIFBBSusa
PrunDrayNapoStanErikButtSupeXVIIGoldBlurOverXVIIXVIISuniSoftTaylLewiPresAnneMoteJackKOSSKOSS
KOSSTrudThomfollElliAnonDarnWorlGuilFocuXVIIOverLewituchkasAntowwwm

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/