| View previous topic :: View next topic |
| Author |
Message |
Shadhi Newbie

Joined: 07 Aug 2004 Posts: 2
|
Posted: Sat Aug 07, 2004 7:16 pm Post subject: Any way to use Callback functions in SB? |
|
|
Hi everyone!
I am working on a small project to see if I can implement Win32 API calls within OO.o Basic (StarBasic?). Some of the function calls require callback functions. I know that MSOffice's VBA and Visual Studio's VB both support the AddressOf operator but apparently AddressOf is not a recognized keyword, nor have I found even a single "hit" on any searches of this site.
Is there any way, within OpenOffice, to get the address of a function?
If not, is there any other way to get callback functions to work in OpenOffice?
Any help would be much appreciated!
Shadhi  |
|
| Back to top |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
Posted: Mon Aug 09, 2004 8:49 am Post subject: |
|
|
I don't think there is an answer to your problem, the way you are describing it.
If you are making Win32 calls, then these are non-portable anyway. Why not write some (or all?) of your code in VB?
Alternately, write a COM object in VB and register it. Then you can instantiate your VB object from OOo Basic and call its methods. _________________ Want to make OOo Drawings like the colored flower design to the left? |
|
| Back to top |
|
 |
Shadhi Newbie

Joined: 07 Aug 2004 Posts: 2
|
Posted: Mon Aug 09, 2004 4:49 pm Post subject: AddressOf (address of a function), for callback functions |
|
|
If only it were as simple as using VB... Unfortunately, I don't have the money to buy Visual Studio, or even MS Office. Maybe I'll be able to get the "express" version of VB, or even Visual Studio...
Still, it seems to me there should be a way to get the address of a function. This is a feature most languages support, isn't it?
Shadhi |
|
| Back to top |
|
 |
Cybb20 Super User


Joined: 02 Mar 2004 Posts: 1569 Location: Frankfurt, Germany
|
Posted: Mon Aug 09, 2004 7:24 pm Post subject: |
|
|
Shadhi forget VB, Python is way better.
And if you need to program on Windows do it in C#, it has nice OO features.
Besides: Think of it, Python costs absolutely nothing and is way much more powerful than VB.
Christian _________________ - Knowledge is Power - |
|
| Back to top |
|
 |
|