Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / The Matrix1Utils plugins collection

Author
Message
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 2nd Jan 2011 19:09
Quote: "Could we have a way to add arguments one at a time to a function call?"

I have thought about doing that as a complement to the arglist functions, but never got around to it. I'll take a look.

Quote: "Find exported functions in a dll"

I'll take a look at that too.

Quote: "Get function format command?"

I'll take a look at that for DBPro functions, but I'm not too sure how doable it is either. In fact, aren't you the expert there? Didn't you need that kind of thing for your debugger? (What happened to that BTW?)

For other DLL's, it's pretty much not possible unless the functions are cdecl and C++ decorated names, and I'm pretty sure I don't want to go to that much trouble (handling pointers/references and by-value structures would mess the whole thing up anyway).

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 2nd Jan 2011 19:27 Edited at: 2nd Jan 2011 19:28
Quote: "Didn't you need that kind of thing for your debugger?"


Ah, but I had the advantage of being able to read the .dbm file I think you're the expert on what information goes into the actual executable!

I might go back to work on the debugger one day. The problem is that it's trying to get precise information from something that's effectively a log file of what the compiler's doing! It uses the line numbers in the .dbm file matched against how many instructions are in the .dbm file to convert between instructions and line numbers, but the line numbers in the .dbm file can seem almost random at times! (Just open it when you've compiled a large project)

Combined with the anomalies of the DBPro compiler (each function parameter actually has TWO addresses reserved for it in the stack, but only one is used...) it was just too unstable to use on large projects. (Which it would be most useful for)

[b]
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 4th Jan 2011 03:04 Edited at: 4th Jan 2011 03:07
Quote: "I'm not too sure how doable it is either."


OK, I've found a way to do it, although it may not be the easiest.

The .exb file which is embedded in the .exe contains a list of all DBPro functions in the form <name>:<ordinal>:<format>. The problem is that 'format' includes the types of all the variables used in the function. Luckily, the return type followed by the parameter types are always the first letters in the format string, so the question is just how many parameters are there?

Looking through the .dbm file, I noticed that every function starts with this code:


Where A and B are useful numbers. Essentially, B*4-A gives the number of bytes of parameter data plus the number of bytes of return data.

Once you have the number of bytes you can loop through the format string, and subtract the size of each type from this number as you go. Once the number reaches zero, you can just ignore the rest of the format string.

Also, if a function doesn't return a value, DBPro treats it exactly as if it returned an integer.

[b]
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Jan 2011 23:10
That doesn't appear to work.

Here's the disassembly of a simple function I wrote:


It has one integer parameter, one float local, and returns nothing.
B = 2, A = 16, params = (Bx4)-A = (2x4)-16 = -8

Even if the sign is wrong, the value itself says that there should be 2 parameters. There is a pattern there somewhere though - I'll just try a few combinations to work it out.

Unfortunately, there doesn't seem to be a way to work out whether the function returns a value unless you actually disassemble right down to the RET statement - that's a lot of work for not too much gain. Still, I'll continue to look into it.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 5th Jan 2011 00:15 Edited at: 5th Jan 2011 00:28
Sorry I got the sign wrong (It's actually A-B*4), but the rest is exactly as I said.

DBPro functions which don't return a value behave as if they return an integer, they even have 4 bytes of space reserved for it, and an initial 'L' in the format string, hence the total of 8 bytes of parameter + return data.

TBH, I can't see as situatation in which it matters whether a function returns an integer or nothing. If you always treat it as though it returns an integer, the worst you will get is 4 bytes of nonsense. Since at some point, some outer code must know whether to expect a return value, this will simply be discarded.

edit:
BTW, what do you know about the .exb file? I know that it's stored in the .exe, but I don't know how to access it, or what its format is.

[b]
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Jan 2011 02:01 Edited at: 8th Jan 2011 02:20
I don't believe this

I just spent an hour tracing back the data containing the function formats. I eventually succeeded in finding "g_pStructPatternsPtr" in the core dll which points to it. I scrolled down a few lines and found out that the dbpro command "get type pattern$" already allows you to access this data and works on functions.

*FACE PALM*

Oh well, at least now I can test out my parameter count theory!

edit:
Got a working example!


It still treats functions which don't return a value as returning an integer, but DBPro seems to treat them identically.

[b]
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 18th Jan 2011 17:25
About the find free resource() commands... I have recently started contributing to the OpenFPS project, and they have made their own resource allocating functions. (I usually use yours)

The difference is that when using the OpenFPS resource allocation, you don't need to use the resourceNum immediately, it is still reserved and will not be returned again if you request another ID of the same type.

So you would be able to do this:

A and B would still different ID's even if you haven't used a Make Object command in between the calls.

However you would still need to call RES_Free(ID, RES_Type) to free up that ID. (So you need to free the ID when a user deletes a resource)
Just thought it might be cool to have that sort of resource allocation in matrix1 where you don't have to create the resource immediately.

Here is the module_resource.dba file from the OpenFPS project incase you wanna take a quick look.



IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Jan 2011 20:10
Quote: "Just thought it might be cool to have that sort of resource allocation in matrix1 where you don't have to create the resource immediately."


You know what? You're right ... oh, hang on



Although you can use the FIND FREE XXXX functions, there's nothing to stop you writing your own using the FREELIST functions I've included into the plug-ins - they use exactly the same code as my own functions, so they're just as fast, and just as tight on memory usage.

But you are right though - I'll see about adding a new pair of functions for each resource type (how does GET FREE RESOURCE strike you?)

enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 19th Jan 2011 07:51
It strikes me very well...

I gather you mean like this?


And nice contribution to the OpenFPS code... TYVM...

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Jan 2011 18:07
Yes, that's what I mean. It will be kind of like what OpenFPS has right now, except that the release of the resource id will happen automatically when you delete it.

Here's the equivalence I'm aiming for:


enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 20th Jan 2011 09:47
Possibly you should make a free object id(num) function so that if you end up not using the ID you can free it again...

Don't really know if this would ever happen(not if you know what you're doing), but still... might be a good idea.

Either that or atleast put in a check when using delete object(num) so that it frees the ID and then checks if there is really an object before trying to delete...

Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 20th Jan 2011 12:45
In the meantime, the ability to reserve a number out of the freelist functions is a good solution to dealing with dlls that require you to keep a number for the dll to use. I think it's Sparky's collision that admonishes you to keep clear of mesh number 255 because the dll plans to use it. Similarly, Blitz Terrain wants you to provide an object number that it will later ascribe to an object that will be used to detect collision with the ground, because the terrain itself won't appear in the DBPro object list. The freelist gives you the best of both worlds, allowing you to reserve numbers in the rare case where you must, and not worry about them otherwise.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Jan 2011 19:22 Edited at: 21st Jan 2011 19:29
I'm getting a crash from one of your dlls when I exit my program. It may be my fault, but I haven't worked out what's causing it yet

Stack trace:


The exception is:
Quote: "Unhandled exception at 0x01d81d13 (matrix1util_22.dll) in Operative.exe: 0xC0000005: Access violation reading location 0x6c642e6d."


The program is ~5000 lines long though, and the error seems to have come about with no changes to the code (But I'm using lua, and there were changes to the script, and changes to the lua plugin, I'm just seeing if these were the problem now)

edit:
NVM, writing this out made me think of something. I was using "close file" instead of "close datafile". Still, it would be useful if it showed an error message rather than just crashing when I close the program!

[b]
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st Jan 2011 20:57
I thought I'd fixed that problem - it happens when the plug-in attempts to close all open file handles during shutdown.

Note to self - don't use an iterator you've just invalidated!

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 22nd Jan 2011 22:40
I have a request:
The Basic3DDebug dll contains a command
?AnglesFromMatrix@@YAXPAUD3DXMATRIX@@PAUD3DXVECTOR3@@@Z

To find the angles from a matrix (and store them in a vector3). Would it be possible to add this command to the 3D math dll?

Cheers!
Sven B

Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 1st Feb 2011 17:03 Edited at: 4th Feb 2011 13:30
The help files for some of the socket utility conversion functions present the syntax somewhat backwards. E.g. the command shown in the help files as "Net To Long Format()" only works if typed "Net Format To Long()". Also, you might consider moving some to the General section because they are generally useful for inspecting and parsing files which use big-endian, e.g. midi files. That's what I'm using them for.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Feb 2011 12:45 Edited at: 4th Feb 2011 12:47
There seems to be a problem with call function name - it returns zero instead of the correct function value. On the other hand call function ptr seems to work correctly.

Try this snippet:



Edit Forgot to add that I'm using the latest version of Matrix1 (23Dec2010).
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Feb 2011 15:20
My list of 'things to do' is getting longer ... I'll do some work on it over the next week or so.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Feb 2011 16:32
I know the feeling. What makes matters worse is that I keep getting distracted by something more puzzling than my latest project.

Anyway, just to add to your woes here's a demo which narrows down a problem with your pointer functions.

This version works:



This version may fail to evaluate correctly but more often hangs the editor/compiler:



This version fails to compile:



The version which works assigns the return value to a variable. The versions which fail all try to use the return value directly as if it were a float.

Hope this helps.

The "exact" value given is the result you would get using elementary calculus. It should differ slightly from the numerical estimate given by the function "test".

Apart from this bug (which can be worked around) this is a nice addition to the language. I wish I'd been aware of it before today.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 4th Feb 2011 19:15
I suspect that the second issue you pointed out is not solvable. The compiler cannot know at compile time what type of value the function will return, and so it cannot know what code to generate.

[b]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Feb 2011 22:31
In that case why does it work at all?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Feb 2011 22:54 Edited at: 4th Feb 2011 22:59
DBPro returns all 4-byte values (including strings) in the EAX register, double integer goes into EDX:EAX, and double float is the top value in the floating point stack known as ST(0).

What's probably happening for the named function call is that I'm trashing the EAX register somewhere along the line, which is very easy to do in C++ without knowing it. However, it's fairly easy to trace, simply by getting the compiler to output the assembly code to another file so that I can read it.

As for the other problems, they are caused by exactly the reason Diggsey has said. The plug-in functions have a return type of 'X' (as do the native CALL DLL functions too), which instructs the compiler to simply take the returned value and write it directly into the variable without any conversion or interpretation taking place.

This code shows this, and that the bit patterns stored in the variables are the same, no matter what type you store the value in:


(That little trick with poking a float to memory and peeking a dword is also what the CAST FLOAT TO DWORD function does.)

What I suggest is that instead of using the CALL FUNCTION PTR functions directly, is that you wrap the call within another function that sanitises the argument types and the return types.



[edit]
Quote: "In that case why does it work at all? "

It shouldn't. For example, the following code won't compile, even though the parameter type of the INT function is known:


For some reason, Lee didn't restrict it in expressions though.

I'm not sure what 'type' it believes the return value is though (and I don't really need to know - it's incorrect code, even though the compiler accepts it).

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Feb 2011 00:24
Thanks for the explanations and suggestion.

Sounds like some sort of warning is needed in your Help docs to point out that such function calls need to be assigned to variables rather than used in various expressions directly.

Quote: "edit]

Quote: "In that case why does it work at all? "
It shouldn't. For example, the following code won't compile, even though the parameter type of the INT function is known:
"


No, you missed my meaning. I was unaware of the essential difference between



and



In other words why does the first work whereas the second doesn't? I haven't yet come across variations of the second which work. They all either hang, give incorrect results or don't compile.

But you've already explained the difference now. Thanks.

Is there any way of getting the compiler to throw out all the problem cases so that things don't get as far as hanging? At the moment some are detected some aren't. Perhaps it can't be done?

Quote: "and I don't really need to know - it's incorrect code,"


Maybe you and Diggsey know, but how does the average user know it's incorrect? I certainly didn't know and I doubt many others without a C++ background would know either.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 5th Feb 2011 01:17 Edited at: 5th Feb 2011 01:18
Quote: "Maybe you and Diggsey know, but how does the average user know it's incorrect? I certainly didn't know and I doubt many others without a C++ background would know either."


I agree, I was just explaining it in case you wanted to know

The options are to either have a warning in the help files, to have versions of the command specific to the different return types. (ie. call dword function ptr, etc.) or have a separate command to get the return value:


[b]
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 5th Feb 2011 03:04
the point of knowing if something works or not is important

it's one thing to make a programing mistake

but if a command it is based on dose not work
then you think that it's you that made the mistake

making any program no matter what it is programed in is hard

I've found code for earlier versions of DBP
and had to rework peaces to get them to work
on in one of my latest cases

I have to find a new spot memory ware the old one dose not
work like it use too

for some of the things I got in mind I;m going to have to combine
things from several programing example and I know
there is going to be a lot of reworking to see my vision of
my idea

test then retest and test again and test again
the bug that never gets completely solved

DBP has been easier for me to understand I'm not read for
the other types .. way over my head even though 2 of them
have more options than DBP Dose

If a thought is Just a thought ~ so whats the main thought ?
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Feb 2011 13:34
Quote: "I was just explaining it in case you wanted to know"


I did - and it's quite clear now thanks to you and IanM. I guessed it was something to do with return types but just didn't know the details.

Now that I know how to use those pointer commands I can see they are a powerful extension to the language.

I guess the reason the DBPro compiler doesn't always detect the problem cases is that it wouldn't arise using pure DBPro commands and functions so there was no point coding the checks in.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Feb 2011 20:32
There's nothing I can do to get the compiler to catch the problem - that's what I was pointing out earlier in my last snippet.

I've added the following wording to the help for both the CALL FUNCTION PTR and CALL FUNCTION NAME commands/functions:
Quote: "If your called function returns a value, and you need this value, you must store the results directly into a variable to ensure that the returned value is interpreted correct.

In addition, any parameters you pass must be of the correct type expected by your called function (ie, you must pass a float if the function expects a float, and it will not convert an integer for you)."


Good enough? Needs more?

Also, I agree with what you have said - Because I know and understand how DBPro's existing CALL FUNCTION commands work (and mine are modelled on those), I kind-of expected everyone to know, which, as this was discovered through educated guesses and investigation rather than documentation, is a silly stance for me to have taken.

I have started to add functions for return results as suggested by Diggsey, but do any of you have a better function name than his 'get dword result'? It doesn't really relate by name to the function ptr commands and if I use something like 'get function dword result' ... well, 4 words seems a little too much for something that should be so simple. Is 'returned dword' good enough?

Any suggestions?

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Feb 2011 23:19
Quote: "There's nothing I can do to get the compiler to catch the problem - that's what I was pointing out earlier in my last snippet."


You've lost me again now.

You said earlier:

Quote: "For some reason, Lee didn't restrict it in expressions though.

I'm not sure what 'type' it believes the return value is though (and I don't really need to know - it's incorrect code, even though the compiler accepts it)."


You seem now to be saying that Lee in fact had no choice.

Quote: "Good enough? Needs more?"


That covers it. Thanks.

Quote: "Is 'returned dword' good enough?"


Sounds simple enough to me.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Feb 2011 23:45
No, just showing that the compiler doesn't forbid it within expressions, while it does if used as a parameter.

It could forbid it in expressions where the return type isn't known, but it doesn't.
It could allow it as a parameter where the return type could be inferred from the parameter type, but it doesn't.

It's basically an oversight in the compiler. It's never been corrected, because almost no-one uses the few commands that have an 'X' return type in the vanilla language in this way.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 6th Feb 2011 01:15
Having "returned dword()" would match up nicely with the ability to push parameters one at a time too

[b]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Feb 2011 02:05
Quote: "It's basically an oversight in the compiler. It's never been corrected, because almost no-one uses the few commands that have an 'X' return type in the vanilla language in this way."


Fair enough - so it can be done if it was considered worthwhile. That's what I thought you meant originally.
Admiral MH
13
Years of Service
User Offline
Joined: 10th Feb 2011
Location: TX, USA
Posted: 11th Feb 2011 20:38
IanM,

I would really like to thank you for you awesome plugin, with all the functionality, this really make's DBPro much more flexible in what I can use it to program.

Also I wanted to tell you about some bugs I found. Your 'Fast' commands (Fast Len,Fast Left,ect...) are actually slower than DBPro version. Maybe with all the updates DBPro has had, improved the speed of the commands. Here are my PC averages.



I have included the program for you to test yourself.

Attachments

Login to view attachments
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 12th Feb 2011 00:54
This might have been answered already ( didn't wanna read all 29 pages ), but can you use matrix1 with DarkGDK somehow or is there a DarkGDK version?

I'm thinking of switching to DarkGDK, but I have gotten used to some of the matrix1 commands by now (use hitimer() all the time).
It would be sad to lose all those useful commands because of switching to C++ (which is supposed to be faster) ...

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Feb 2011 21:45
No, there's no GDK version. I have been asked about doing this before, but TBH, I never got far enough into using the GDK to make it worth my own while.

That's the key to this whole set of plug-ins: If I think it'll be useful to me, I code it and release it for everyone else to use too.

gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 1st Mar 2011 01:21
if I am not mistaken can't Dark GDK use DBP DLL'S ?

There might be a bit of tweaking to get things going

If a thought is Just a thought ~ so whats the main thought ?
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 1st Mar 2011 01:26
No you have to compile to a static library for GDK and you also need to change how you import built in commands for use by the plugin. Then there's also the need to change all string returning commands to remove the redundant first parameter, and depending on how Ian does it, it may break the way he overrides certain built in commands. Then there's the fact that you can no longer rely the constructor, destructor and globstruct receiver functions as GDK doesn't call them.

[b]
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Mar 2011 23:27 Edited at: 13th Mar 2011 23:28
Lookup Tables and Hash MD5 commands

Can you confirm that what I'm doing isn't possible:

1. Create an Ini File, with a hash value as one of the keys
2. Import as a Lookup Table
3. Generate the hash key by iterating through the lookup table
4. Save

5. Read the Ini table back in
6. Check the hash key using exactly the same routine
7. It fails

My only guess is that the Lookup table order isn't always the same.

Reading the Lookup table, checking and generating the hash key:



and the GenLookupHash() function:



IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Mar 2011 23:54
No, because it is possible - the lookup was designed to always visit the keys in ascii order.

What's wrong is that you are using "system/hash" in one part of your code, but "misc/hash" in another. That kind of problem is why constants were invented



BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Mar 2011 12:38
Doh! Thanks Ian. That'll teach me to throw a bit of code in, in a rush.

noturno
13
Years of Service
User Offline
Joined: 9th Mar 2011
Location:
Posted: 21st Mar 2011 17:36
Hi IanM! First of all, thanks for mainteining that incredible plugin pack.

Unfortunatelly, though, I can not use anything from MaxUtils18 without crashing DBP. If I run any command, get any expression, in reaally any source code, DBP crashes.

I am using DBP 1.74 in a Windows 7 64 bits. I send attached a picture listing all plugins I have activated (including STYX). Crashes always show the following error signature:


Name of the problem event: APPCRASH
Name of application: dbp_program.exe
Name of the fail module: StackHash_0a9e
Versão do Módulo de Falhas: 0.0.0.0
Carimbo de Data/Hora do Módulo de Falhas: 00000000
Local id: 1046
Additional information 1: 0a9e
Additional information 2: 0a9e372d3b4ad19135b953a78882e789
Additional information 3: 0a9e
Additional information 4: 0a9e372d3b4ad19135b953a78882e789

Attachments

Login to view attachments
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Mar 2011 23:20
noturno:
it seems a few commands in MaxUtils are duplicate commands
a lot of such commands are part of DBP now or have similar naming
but do different things

some ware in the forum there are always work around
I've found functions for some things that work better than dll's

If a thought is Just a thought ~ so whats the main thought ?
freight hopper
20
Years of Service
User Offline
Joined: 26th Dec 2003
Location: Just beyond the Dunsmuir yard limits
Posted: 22nd Mar 2011 05:25
OK, dumb question after spending half an hour looking -- is there any way that matrix1 works with DarkGDK?

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Mar 2011 16:18
No, nothing for GDK.

@noturno,

Quote: "I am using DBP 1.74 in a Windows 7 64 bits."

I am too.

The problem you are having is caused by you moving the other plug-ins to one side. Plug-in 18 depends upon plug-in number 01. It should fail to run cleanly rather than crash, so I'll look into that. In the meantime, move the plug-ins back.

@Resourceful,

Quote: "I've found functions for some things that work better than dll's"

For instance? I'd love to see these commands - they'll be great to add into my plug-ins if they exist.

The only commands I have provided that collide with other plug-ins that I'm aware of are the STYX string functions (although technically they collide with mine, being as I wrote and gave away mine first), and TBH, mine run far faster (100's of times faster in some cases).

However if STYX is required for a project, then only 1 of my plug-ins needs to be moved aside (plug-in number 16).

noturno
13
Years of Service
User Offline
Joined: 9th Mar 2011
Location:
Posted: 23rd Mar 2011 07:30
Hi IanM! Thanks for the fast reply.

It seems that you were very right: now plugin 18 seems to work properly. I was not using plugin 1 and just adding solved the issu with plugin 18 so far.

Thank you really very much. Working without some of your plugins just as the 18 just decrease a lot the ready capabilities of DBP.

Cheers!
miso
14
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 30th Mar 2011 03:38
Hello IanM!

I have a humble question. Are your winsock commands IPv6 capable?

I have darknet, and it is, but I would like to create my own low level package management for UDP fitting my needs.

Using Barnsky's winsock at the moment, and your plugin is the other one that allows me to send datagram using memory adress and buffer size.

No place like 127.0.0.1 .
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Mar 2011 15:17
No it's not, because I didn't (and still don't) have an environment to test it in - my ISP is ipv4, so is my ADSL router, and I have only recently got a second ipv6 windows system.

I have thought about how I could implement it without changing the commands in that plug-in, but that's as far as I've gone.

miso
14
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 30th Mar 2011 16:49
Thanks for your reply. Its not so urgent, considering that most ISP is not ipv6 capable at the moment. My ISP is, so I was just thinking about the coming future.

No place like 127.0.0.1 .
Non Sequitur M
16
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 31st Mar 2011 05:26
Hi, Ian.

I've got a problem. Wwhen I was trying to mess around with your INI commands, I was getting all kinds of errors and null data. I decided to create an INI file using your commands, and I noticed that your plugin creates a section header in the look up, and below that was a value with no property ID followed by the last intended property ID and value!!!

This is my code:


Your commands created this:


This is the intended effect:


So, I tried to eliminate the property names and got this result:


Why does it only make section headers followed by values with no property IDs? The 3rd code tag is how an INI file should look. Is your DLL supposed to only allow a single value per section with no property ID, or is it an error? Sorry if I come across the wrong way, I'm just frustrated with INI editing. I tried to code my own INI checker today. Long story short, BIG fail!

If life were like a box of chocolates, I'd know what I would get... The one that got dropped on the floor and put back in the box.

Iye nehvur yoose spehl chehk, ahn mie tippyng izz fiyne.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Mar 2011 14:58
You're trying to make it too hard.

With the following ini segment:


When loaded from an ini file into a lookup, will create a key of 'tree/size', with a value of 1.

If you have a key of 'tree/position/x' and a value of 123, then when saved it will write out:


Basically the key is split into two parts - the first part is up to the last slash in the key, and the second part is everything after that.

Also, NEXT LOOKUP doesn't do what you think it does either.

Your code above would look like this:


I'll post a few more examples later when I get home.

Non Sequitur M
16
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 31st Mar 2011 19:05
Okay. Thank you! I was reading the syntax description on your help page, and got lost a little, but now it makes sense.

If life were like a box of chocolates, I'd know what I would get... The one that got dropped on the floor and put back in the box.

Iye nehvur yoose spehl chehk, ahn mie tippyng izz fiyne.

Login to post a reply

Server time is: 2024-11-23 08:24:20
Your offset time is: 2024-11-23 08:24:20