[Solved] PokeS(,,#PB_Ascii)

Just starting out? Need help? Post your questions and find answers here.
User avatar
majikeyric
Enthusiast
Enthusiast
Posts: 187
Joined: Mon Oct 21, 2013 5:21 pm
Location: France
Contact:

[Solved] PokeS(,,#PB_Ascii)

Post by majikeyric »

Shouldn't the string stored in memory as an ASCII string ? this is not the case....

Code: Select all

*MemoireID = AllocateMemory(5000)
If *MemoireID
	PokeS(*MemoireID, "PureBasic" ,#PB_Ascii)
	ShowMemoryViewer(*MemoireID, 256)
	FreeMemory(*MemoireID)  
EndIf
Last edited by majikeyric on Wed Feb 17, 2021 10:16 am, edited 2 times in total.
User avatar
STARGÅTE
Addict
Addict
Posts: 2228
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: PokeS(,,#PB_Ascii) Bug 5.73

Post by STARGÅTE »

Please read the manual first!
The parameters of PokeS are PokeS(*MemoryBuffer, Text$ [, Length [, Flags]])

Code: Select all

*MemoireID = AllocateMemory(5000)
If *MemoireID
   PokeS(*MemoireID, "PureBasic", -1, #PB_Ascii)
   ShowMemoryViewer(*MemoireID, 256)
   FreeMemory(*MemoireID) 
EndIf
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
sq4
User
User
Posts: 98
Joined: Wed Feb 26, 2014 3:16 pm
Contact:

Re: PokeS(,,#PB_Ascii) Bug 5.73

Post by sq4 »

You are using #PB_Ascii as length...

(Oops, STARGATE beat me)
User avatar
majikeyric
Enthusiast
Enthusiast
Posts: 187
Joined: Mon Oct 21, 2013 5:21 pm
Location: France
Contact:

Re: [Solved] PokeS(,,#PB_Ascii)

Post by majikeyric »

I'm probably drunk this morning :lol: , thanks guys!
Post Reply