I'd like to install PB on an USB key
Is there a way to store PB setup parameters in an INI file (in PB directory) instead of in registry?
Thanks for your reply
PB parameters in .ini file in PB dir...
Re: PB parameters in .ini file in PB dir...
Take a look on the help: Commandline options for the IDE
There is a special commandline parameter for that: /PORTABLE
There is a special commandline parameter for that: /PORTABLE
-
- User
- Posts: 81
- Joined: Thu Sep 23, 2010 4:22 am
Re: PB parameters in .ini file in PB dir...
I wrote a code to do this, can i post the code here?
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
-
- User
- Posts: 81
- Joined: Thu Sep 23, 2010 4:22 am
Re: PB parameters in .ini file in PB dir...
I'm trying to receive strings from "kernel32dll" using a Unicode executable and aways fail. Someone can help-me?
Edit- Now work like should.
Code: Select all
Prototype.l pWritePrivateProfileString(lpApplicationName.p-unicode, lpKeyName.p-unicode, lpString.p-unicode, lpFileName.p-unicode)
Prototype.l pGetPrivateProfileString(lpApplicationName.p-unicode, lpKeyName.p-unicode, lpDefault.p-unicode, lpReturnString.p-unicode, nSize.l ,lpFileName.p-unicode)
Procedure.s GetINI (iniDatei.s, sSection.s, sKeyName.s, sDefault.s)
Protected.s sReturn
sReturn = Space(255)
OpenLibrary(0,"kernel32.dll")
GetPrivateProfileString.pGetPrivateProfileString = GetFunction(0, "GetPrivateProfileStringW")
sReturn = Left(sReturn, GetPrivateProfileString(sSection, sKeyName, sDefault, sReturn, Len(sReturn), iniDatei))
CloseLibrary(0)
ProcedureReturn sReturn
EndProcedure
Procedure WriteINI (iniDatei.s, sSection.s, sKeyName.s, sNewString.s)
OpenLibrary(0,"kernel32.dll")
WritePrivateProfileString.pWritePrivateProfileString = GetFunction(0, "WritePrivateProfileStringW")
WritePrivateProfileString(sSection, sKeyName, sNewString, iniDatei)
CloseLibrary(0)
EndProcedure
Last edited by Vitor_Boss® on Mon Oct 11, 2010 8:16 am, edited 1 time in total.
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
-
- Addict
- Posts: 2344
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Re: PB parameters in .ini file in PB dir...
GetPrivateProfileStringA -> GetPrivateProfileStringWVitor_Boss® wrote:I'm trying to receive strings from "kernel32dll" using a Unicode executable and aways fail. Someone can help-me?
[...]
The problem is when I compile using Unicode flag, always return a lot of "?". What i must do to fix this?
WritePrivateProfileStringA -> WritePrivateProfileStringW
W is widechar for 16-bit unicode. And then rename all p-ascii to p-unicode.
bye,
Daniel
Daniel
-
- User
- Posts: 81
- Joined: Thu Sep 23, 2010 4:22 am
Re: PB parameters in .ini file in PB dir...
Work very fine. I don't think in that.
Thank you.
Thank you.
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.