Search found 16 matches

by A.I
Wed Feb 08, 2006 12:57 pm
Forum: General Discussion
Topic: Question to PB4.0 beta2
Replies: 9
Views: 2434

Please notice that quite a few bugs have been reported every single day since the release of Beta1. Luckily Fred and Freak have been able to kill most of them. But the rate is, however, continuous. I would prefer to wait a little longer to get better Beta2 than something that still has reported bugs ...
by A.I
Sat Nov 26, 2005 1:51 pm
Forum: Coding Questions
Topic: Creating PB Userlibraries in C++
Replies: 8
Views: 4139

Tutorial

This is a simple tutorial on how to create a simple Userlib in Microsoft Visual C++ 6.0. We'll make a DLL that has only one function: HelloWorld(), which takes one integer parameter and returns it double back to PureBasic. For example, if you passed integer 6 it would return 12 and so on ...
by A.I
Fri Nov 25, 2005 11:24 pm
Forum: Coding Questions
Topic: Creating PB Userlibraries in C++
Replies: 8
Views: 4139

All done, but I still can't get this to work if the debugger is ON. I keep getting this error every time I hit F5 and debug enabled:

POLINK: warning: Multiple '.data' sections found with different flags (0xc0000040 and 0x60000040).
POLINK: error: Unresolved external symbol '_PB_SampleCFunction ...
by A.I
Fri Nov 25, 2005 7:32 pm
Forum: Coding Questions
Topic: Creating PB Userlibraries in C++
Replies: 8
Views: 4139

Noticed something...

1) Do not put .def-file for the project
2) Build the DLL in VC++
3) VC++ now generates a .OBJ file - not .LIB
4) Use LibraryMaker.exe
5) The library will be made, reset PB Compiler or IDE

And tadaa.. it works.. but only if the debugger is disabled. Any advice on that?
by A.I
Fri Nov 25, 2005 6:09 pm
Forum: Coding Questions
Topic: Creating PB Userlibraries in C++
Replies: 8
Views: 4139

OK, did some further tests. I decided to go even simplier. Here's the C-code (ignore stdafx.h):

#include "stdafx.h"

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}


extern "C" int _stdcall PB_SampleCFunction()
{
return 1234 ...
by A.I
Fri Nov 25, 2005 2:30 pm
Forum: Coding Questions
Topic: Creating PB Userlibraries in C++
Replies: 8
Views: 4139

Creating PB Userlibraries in C++

This subject is so old, but still active. Despite my many attempts, I just fail finding a good and clear tutorial on how to extend PureBasic with C++ code. Of course I first used the forum search, but found only one topic that could provide actual help:

http://forums.purebasic.com/english/viewtopic ...
by A.I
Thu Nov 24, 2005 5:46 pm
Forum: Coding Questions
Topic: Middle mouse close TAB
Replies: 5
Views: 1488

Wow, this seems to work exactly as I want :D
It works even if there's more tabs than fit to window and they're scrolled.

Many thanks.

Cheers.
by A.I
Thu Nov 24, 2005 4:32 pm
Forum: Coding Questions
Topic: Middle mouse close TAB
Replies: 5
Views: 1488

OK, I can now retrieve the X-coordinate of the click:

Structure HDHITTESTINFO
pt.POINT
flags.l
iItem.l
EndStructure

TestHit.HDHITTESTINFO
GetCursorPos_(Hit\pt)
ScreenToClient_(GadgetID(#GADGET_PANEL), Hit\pt)
Debug Hit\pt\x

Now I need to know what's the size of panel items in order to ...
by A.I
Thu Nov 24, 2005 3:19 pm
Forum: Coding Questions
Topic: Middle mouse close TAB
Replies: 5
Views: 1488

Thanks for your example, but it really didn't bring anything new to my attempts.

EDIT:

Seems that EventlParam() returns different kind of values on every click. It also seems related to cursor position. May be that's a lead.

Debug Str(EventlParam())
by A.I
Thu Nov 24, 2005 1:08 pm
Forum: Coding Questions
Topic: Middle mouse close TAB
Replies: 5
Views: 1488

Middle mouse close TAB

Tried to search for this, but couldn't find the answer.

You Opera and Firefox users must be familiar with the feature that allows you to close a panel tab via mouse middle click. Now i'd like to implement this feature to one of my programs, but I don't know how to retrieve to "point of hit ...
by A.I
Thu Nov 24, 2005 1:00 pm
Forum: General Discussion
Topic: Banners/Affilates/Money ETC.
Replies: 52
Views: 10032

Umm..

I believe they have this kind of system implemented in Dark Basic Professional. They offer a special USB dongle for purchase which acts as "verifier". But of course, this can also be bypassed by cracking the executable.

As far as I know, the crackers simply need to locate THE If-statement in ...
by A.I
Thu Nov 24, 2005 12:24 pm
Forum: General Discussion
Topic: Banners/Affilates/Money ETC.
Replies: 52
Views: 10032

I've been here on background silently and read this topic with interest.

You all state on that the copy protection system should exist in the application itself - through some kind of executable fingerprint profile. As mentioned before, every single one copy protection has been cracked. And those ...
by A.I
Wed Nov 23, 2005 11:29 am
Forum: Tricks 'n' Tips
Topic: Owner drawn menus - UPDATED.
Replies: 12
Views: 4322

Can anybody confirm this works on Win9x/Me?
Just curious.

I only have XP systems here, and seems to work like a dream.
by A.I
Sun Sep 25, 2005 9:03 pm
Forum: Feature Requests and Wishlists
Topic: Wishlist for PureBasic v4.0
Replies: 232
Views: 69446

I would like to see register variables like in C++

Register variables are much faster than normal variables because they use one processor memory slot and lack the need to transfer between main memory. Using register variables as loop counter can speed the execution up to 15%.

Also, as mentioned ...
by A.I
Fri Aug 26, 2005 9:21 pm
Forum: Coding Questions
Topic: How to Jump to a memory address using ASM
Replies: 3
Views: 1185

What?! The answer was that simple. *put his hand on his forehead*

Thankyou very much.