IDE Tool: Display MS PlatformSDK help for API commands

Working on new editor enhancements?
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

Hi,

I've found a way to use the original code in Windows 98 almost unchanged.

These are the needed changes:

Code: Select all

*Buffer = AllocateMemory(0, 1000)

;change with:

  *Buffer = VirtualAllocEx_(ProcessHandle, #NULL, 4096, #MEM_COMMIT, #PAGE_READWRITE)

;and, some lines after:

FreeMemory(0)

;change with:

    VirtualFreeEx_(ProcessHandle, *Buffer, 0, #MEM_RELEASE)
And make ProcessHandle global at the begining of the code, that's all, it works here :) (don't know if this would work in XP, but you only would need to check OSVersion instead of using an entire different version). Sorry for not finding out this before your 2nd code.
El_Choni
freak
PureBasic Team
PureBasic Team
Posts: 5950
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

This is indeed interesting.

I've added this now to the PureBasicIDE for the next version. And
there are no such hacks needed, as it's all the same app.
This test was just intended to check, if the main function works with
other PCs than mine. (And of course as a workaround till the next version)

In the future, the ide will try Win32.hlp, and if that is not avaiable, try the
PSDK. This way, everybody can choose which to use.

Timo
quidquid Latine dictum sit altum videtur
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

ok

Post by NoahPhense »

El_Choni wrote:You won't regret installing it, unless you have little HD room left. Apart from the huge help docs, it includes some tiny but useful tools and all the C headers you may need:

(image removed)
Ok, you're making me drool.. I used to have MSDN Library installed, but
sold that with my old language.

Very kewl, thanks.. Will be installing. So, does it do API as well? Because
I currently have 2 win32.hlp files.. one is older than the other, but I keep
them both around in the event one has data that the other might not.

- np
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

You mean, API functions, apart from flags? Yes, it's mostly that, and C examples, and info on each issue (looks like I'm selling it or what? ;))
El_Choni
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

..

Post by NoahPhense »

El_Choni wrote:You mean, API functions, apart from flags? Yes, it's mostly that, and C examples, and info on each issue (looks like I'm selling it or what? ;))
lol.. yeah i'll buy it.. ;)

Yeah API functions..

I think a lot of people could use/need it. I appreciate all the info and this
thread will probably assist others in making their decisions on wether or
not to install it.

- np
spongehammer
User
User
Posts: 84
Joined: Sat Jul 19, 2003 6:45 pm
Location: UK

Post by spongehammer »

Hi,

I tried this tool, which works fine with the original PB editor, but i got an error message (about not finding the PB editor window) when i tried it with jaPBe. I changed the line to detect whether it was the PureBasic Window to look for the jaPBe window. Now i dont get the message but it doesnt work.
I am sure its something very simple, but as u probably guessed by now my skills are a bit weak at the moment. :?

Thanks
I looked up 'paranoid' in the dictionary this morning.
It said, 'what do you want to know that for?'
freak
PureBasic Team
PureBasic Team
Posts: 5950
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

This tool only works with the ide, because of the way, the selected word is received.
Get the newest jaPBe update, it is allready in there.

Timo
quidquid Latine dictum sit altum videtur
spongehammer
User
User
Posts: 84
Joined: Sat Jul 19, 2003 6:45 pm
Location: UK

Post by spongehammer »

Hi Freak,

Thanks for that. Great tool too :D

Chris
I looked up 'paranoid' in the dictionary this morning.
It said, 'what do you want to know that for?'
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Re: IDE Tool: Display MS PlatformSDK help for API commands

Post by NoahPhense »

Do you care to release the source for this tool? Se I can make it work
with 3.94 .. I thought this feature was supposed to be in 3.94 built in?


- np
freak
PureBasic Team
PureBasic Team
Posts: 5950
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Sorry, i know i promised you to make it work for 3.94, but then got cought up
in all the other stuff i am working on right now and forgot again.

here is the source:
http://freak.purearea.net/tools/PSDKHelp.zip

It should actually be quite simple. The 3.94 IDE has the %WORD token for tools,
which is replaced with the word under the cursor, so you can cut all the
code that gets the text from the RichEdit and extracts the word, and just use the
commandline for that instead.

This is probably also the reason why it no longer works. Now it is Scintilla
and no longer RichEdit.

If you make it work with 3.94, please post the code somewhere for others
to use it too.
quidquid Latine dictum sit altum videtur
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

Sure thing, thanks Timo..

I'll create a new announcement, once it is finished.

- np
Post Reply